lycheedev 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/native/windows-amd64/lycheedev.exe +0 -0
- package/package.json +1 -1
- package/payload/addon/Bridge/ActivityView.lua +1 -1
- package/payload/addon/Bridge/InputSignal.lua +36 -0
- package/payload/addon/Bridge/InputState.lua +61 -13
- package/payload/addon/Bridge/SlotProtocol.lua +16 -9
- package/payload/addon/Bridge/SlotRuntime.lua +34 -15
- package/payload/addon/Core/Compat.lua +10 -1
- package/payload/addon/Core/Runtime.lua +1 -1
- package/payload/addon/Lychee Dev.toc +2 -1
- package/payload/skill/SKILL.md +89 -148
- package/payload/skill/agents/openai.yaml +2 -2
- package/payload/skill/references/asset-export.md +17 -1
- package/payload/skill/references/commands.md +26 -26
- package/payload/skill/references/data-hotfix.md +112 -0
- package/payload/skill/references/data-investigation.md +74 -320
- package/payload/skill/references/data-recovery.md +55 -0
- package/payload/skill/references/data-tables.md +170 -0
- package/payload/skill/references/data-targets.md +93 -0
- package/payload/skill/references/error-diagnosis.md +2 -2
- package/payload/skill/references/installation.md +15 -1
- package/payload/skill/references/live-investigation.md +46 -267
- package/payload/skill/references/live-probes.md +160 -0
- package/payload/skill/references/live-recovery.md +190 -0
- package/payload/skill/references/live-startup.md +26 -28
- package/payload/skill/references/runtime-investigations.md +17 -3
- package/payload/skill/references/source-preparation.md +58 -0
- package/payload/skill/references/source-relations.md +51 -0
- package/payload/skill/references/source-research.md +66 -162
- package/payload/skill/references/source-value-flow.md +48 -0
- package/release.json +93 -43
|
@@ -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.
|
|
@@ -15,13 +15,13 @@ observation. It does not claim to capture every addon error. Provider unavailabl
|
|
|
15
15
|
partial fields, zero rows and incomplete coverage remain distinct. Native bugs
|
|
16
16
|
completes verified result persistence and release; inspect `report.ok` and the
|
|
17
17
|
snapshot's own status, then require `complete: true` and `cleanup: complete`.
|
|
18
|
-
Do not add legacy ACK/finish/hide commands.
|
|
18
|
+
Do not add legacy ACK/finish/hide commands. Use [recovery](live-recovery.md) on interruption, retaining the same CON.
|
|
19
19
|
Use a question-specific probe only when the retained error snapshot cannot
|
|
20
20
|
distinguish the hypotheses. Follow [live-investigation.md](live-investigation.md)
|
|
21
21
|
and keep sampling, output and async lifetime bounded.
|
|
22
22
|
|
|
23
23
|
For secret-value or secure-taint errors, connect the relevant fixed source path
|
|
24
|
-
to [live hypothesis testing](live-
|
|
24
|
+
to [live hypothesis testing](live-probes.md#test-source-hypotheses).
|
|
25
25
|
Use runtime observations to distinguish the remaining source hypotheses, then
|
|
26
26
|
return to those locations to explain the result; an error snapshot alone need
|
|
27
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
|
|
@@ -84,9 +91,16 @@ or LuaLS on the target machine.
|
|
|
84
91
|
Before updating a managed installation, finish current operations and disconnect
|
|
85
92
|
your own native CON connections. The installer refuses unresolved host ownership;
|
|
86
93
|
do not clear a foreign project's claim. Deploy through the managed installer,
|
|
87
|
-
then activate the selected process using the startup workflow. All
|
|
94
|
+
then activate the selected process using the startup workflow. All 200 slot-v2 files
|
|
88
95
|
are part of the managed installation. An installed CLI or Skill does not update
|
|
89
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.
|
|
90
104
|
If the authorized task includes using the running client, follow
|
|
91
105
|
[live-startup.md](live-startup.md) after deployment. Activation precedes a
|
|
92
106
|
bridge session when the addon is not running; do not require that session as
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
# Live investigation
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
Use live work to resolve a question about the running client that existing source,
|
|
4
|
+
data or retained reports cannot answer. Keep those evidence types distinct: source
|
|
5
|
+
explains possible behavior, data supplies versioned records, and a live observation
|
|
6
|
+
establishes what happened on the selected client. Carry exact source/data pins into
|
|
7
|
+
the experiment; a data build selection does not select a game process.
|
|
8
|
+
|
|
9
|
+
1. Existing CON: read status and retained results first. Resume unfinished work
|
|
10
|
+
through [recovery](live-recovery.md). If it is idle and still matches the
|
|
11
|
+
authorized target, reuse it for the next distinct task.
|
|
12
|
+
2. New live task without a CON: select and connect below. Read [startup](live-startup.md)
|
|
13
|
+
only for installation, activation or contact without a usable runtime.
|
|
14
|
+
3. Need new evidence: use [probe design](live-probes.md), [retained errors](error-diagnosis.md)
|
|
15
|
+
or [performance measurement](runtime-investigations.md) according to the question.
|
|
16
|
+
4. Inspect the verified report, finish cleanup, and disconnect when done.
|
|
17
|
+
|
|
18
|
+
The CLI owns native input, memory/optical observation, slot coordination and
|
|
19
|
+
recovery. Agents do not send keys, decode colors or manipulate slot/claim files.
|
|
20
|
+
Keep the invoking project's `.lycheedev/live` evidence directory together.
|
|
20
21
|
|
|
21
22
|
## Select and connect
|
|
22
23
|
|
|
@@ -24,7 +25,8 @@ Use `live instances --passive` for window inventory without input. Connect direc
|
|
|
24
25
|
when installation/PID are known; never choose a different character to bypass a
|
|
25
26
|
busy or unavailable target. The selected process creation identity and actor remain
|
|
26
27
|
fixed throughout recovery. One process has one logical connection and one active
|
|
27
|
-
CLI driver
|
|
28
|
+
CLI driver. Same-build instances still have separate PID/CON/request identities;
|
|
29
|
+
shared installation files do not make them interchangeable. A foreign project's durable claim is not an expired timeout.
|
|
28
30
|
|
|
29
31
|
If several candidates match and the task does not choose one, show their known
|
|
30
32
|
product/build, character/realm and PID (unknown identity stays unknown), then ask
|
|
@@ -53,7 +55,11 @@ Use `--probe <immutable-PRB-revision>` instead of a file for registered source.
|
|
|
53
55
|
`--budget-seconds` bounds the addon probe (1..120); `--wait-seconds` bounds this
|
|
54
56
|
CLI invocation (1..600, default 120), including scans and recovery. A longer host
|
|
55
57
|
wait does not extend probe execution. The CLI performs prepare/commit, strict
|
|
56
|
-
|
|
58
|
+
result verification, durable storage and runtime release.
|
|
59
|
+
|
|
60
|
+
Recovery has persistent deadlines; resume does not reset them. A CLI timeout
|
|
61
|
+
ends the host call, not the Lua probe. Read [budget and evidence rules](live-recovery.md#durable-evidence-and-older-journals)
|
|
62
|
+
when recovery is interrupted or exhausted.
|
|
57
63
|
|
|
58
64
|
Choose `observation` only when repeating the whole probe after a confirmed new
|
|
59
65
|
runtime is safe. Use the default `opaque` for state-changing or uncertain code.
|
|
@@ -67,277 +73,50 @@ A native complete result needs no ACK/finish/hide command. Original result bytes
|
|
|
67
73
|
remain in the project even after the game exits. Repeat the same request to read
|
|
68
74
|
it without executing again, including after later operations on that connection.
|
|
69
75
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
original `resourcesReleased: false` is preserved. It is distinct from a normal
|
|
73
|
-
release acknowledgement. Journal segments rotate only at idle boundaries and
|
|
74
|
-
remain linked under the connection's `.jsonl.history` directory; preserve these
|
|
75
|
-
alongside the active log. A missing segment must not be worked around by issuing
|
|
76
|
-
a new request key.
|
|
76
|
+
A verified report with pending cleanup is usable evidence plus a recovery
|
|
77
|
+
obligation. Keep it and follow [recovery](live-recovery.md), without rerunning Lua.
|
|
77
78
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
state why the original transient scene cannot be reproduced. The input shield is
|
|
82
|
-
released before business code. Ordinary queries, event listeners and async waits
|
|
83
|
-
do not lock input: the click-through Lychee says `Agent 运行中` / `Agent running`.
|
|
84
|
-
Only an actual input-protection phase says `Agent 接管中` / `Agent in control`.
|
|
85
|
-
Neither label is proof of result retrieval.
|
|
79
|
+
The CLI may reload at a quiescent capacity boundary, so probes must reconstruct
|
|
80
|
+
scene prerequisites or declare them unreproducible. Ordinary probes do not lock
|
|
81
|
+
input; activity labels do not prove acceptance or result retrieval.
|
|
86
82
|
|
|
87
83
|
```text
|
|
88
84
|
lycheedev live disconnect <CON-id> --project <project-directory> --wait-seconds 120 --format json
|
|
89
85
|
```
|
|
90
86
|
|
|
91
87
|
Disconnect at the end of the authorized investigation unless continued use is
|
|
92
|
-
needed. It verifies unbind before releasing host ownership, or uses
|
|
93
|
-
|
|
88
|
+
needed. It verifies unbind before releasing host ownership, or uses verified
|
|
89
|
+
process-exit/runtime-replacement evidence for input-free retirement; see
|
|
90
|
+
[ownership and recovery](live-startup.md#ownership-and-recovery).
|
|
94
91
|
A repeated completed
|
|
95
92
|
close repairs any interrupted host retirement without new game input.
|
|
96
93
|
For interrupted opaque work, `closed: true` does not imply a known business
|
|
97
94
|
outcome: preserve `operationState: execution_unknown`, `complete: false` and the
|
|
98
95
|
missing report. Do not turn successful connection cleanup into task success.
|
|
99
96
|
|
|
100
|
-
## Input and recovery
|
|
101
|
-
|
|
102
|
-
The coordinator owns every input attempt. It observes current memory input
|
|
103
|
-
state, journals the intended action, then rechecks before sending. With an ordinary
|
|
104
|
-
focused editor it sends one Esc and observes again; Esc may close/cancel that UI.
|
|
105
|
-
Combat, secret/unavailable observations and stale samples are not permission to
|
|
106
|
-
send Esc. Held system keys wait for release. No foreground input or color-patch
|
|
107
|
-
protocol is required. Native invocation uses fixed Ctrl+Alt+F12; agents never
|
|
108
|
-
send it themselves or edit the slot files.
|
|
109
|
-
|
|
110
|
-
Connected reload uses the same readiness checks. It sends no Esc when input is
|
|
111
|
-
already clear, and re-observes after each necessary Esc. The explicit installation
|
|
112
|
-
fallback also uses this path when the addon advertises telemetry; see
|
|
113
|
-
[startup](live-startup.md) for first-install and older-runtime limits.
|
|
114
|
-
|
|
115
|
-
Input evidence is distinct from execution: `not_sent` proves zero messages were
|
|
116
|
-
queued; `submitted` proves only queue submission; `uncertain` (or an intent with
|
|
117
|
-
no outcome) does not permit replay. These facts drive CLI recovery. Do not
|
|
118
|
-
reinterpret them into manual retry instructions. Use the same CON/project and
|
|
119
|
-
`live resume`; inspect `waiting` when present. Recheck after a changed condition
|
|
120
|
-
within the authorized task; do not repeat indefinitely against an absent process,
|
|
121
|
-
foreign ownership or an unresolved opaque execution outcome.
|
|
122
|
-
|
|
123
|
-
`waiting: shared_publication` is bounded contention inside one installation,
|
|
124
|
-
not a lost connection. Resume the same CON/request; keep its nonce and do not
|
|
125
|
-
delete a slot reservation. Another driver may release its short lock normally,
|
|
126
|
-
but an unresolved reservation needs its original owner's recovery. A combat or
|
|
127
|
-
focus wait holds that slot only, not the installation's publication lock.
|
|
128
|
-
|
|
129
|
-
`complete` applies to the current command. A connected runtime does not complete
|
|
130
|
-
a pending disconnect, and a previous probe report does not complete reload.
|
|
131
|
-
The bouncing Lychee shows activity only. Ordinary probes do not block input;
|
|
132
|
-
short input protection says `Agent 接管中`, ordinary execution says `Agent 运行中`.
|
|
133
|
-
Neither animation nor a reload hint proves an accepted request.
|
|
134
|
-
|
|
135
|
-
The whole `.lycheedev/live` directory is the recovery unit. Keep connection logs,
|
|
136
|
-
linked history segments, content-addressed `connections/artifacts`, target metadata
|
|
137
|
-
and result files together. New journals reference exact code/result bytes by digest;
|
|
138
|
-
older inline snapshots remain readable. Missing or corrupt referenced content is
|
|
139
|
-
a recovery error, never a reason to generate another request key.
|
|
140
|
-
|
|
141
|
-
## Register reusable source
|
|
142
|
-
|
|
143
|
-
```text
|
|
144
|
-
lycheedev live probe put --name <name> --file <probe.lua> --format json
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Names are mutable selectors; retain the returned immutable PRB revision. Use it
|
|
148
|
-
with native execute. Old queue-oriented atomic commands belong to legacy records
|
|
149
|
-
and are not the transport for CON connections.
|
|
150
97
|
## Design a discriminating probe
|
|
151
98
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
also pin the target addon's revision and record whether it is known to match the
|
|
155
|
-
loaded runtime. Inspect the relevant API definition, call sites, event order,
|
|
156
|
-
preconditions and secret/protected boundaries in
|
|
157
|
-
[source-research.md](source-research.md). A current branch or newest tag is not
|
|
158
|
-
evidence for the running build. When exact source is unavailable, identify the
|
|
159
|
-
gap and, within the live authorization, use a minimal capability observation
|
|
160
|
-
before relying on the uncertain interface.
|
|
161
|
-
|
|
162
|
-
Choose the smallest experiment that separates the hypotheses. The supported
|
|
163
|
-
Lua probe can inspect state, collect event timing, exercise a target addon's own
|
|
164
|
-
controller or callback where authorized, check object lifetime, sample bounded
|
|
165
|
-
performance data, or verify a business invariant. Source and task determine the
|
|
166
|
-
actions, fields, sample limit and assertions; the bridge does not impose a UI
|
|
167
|
-
template. For an interactive behavior, distinguish calling a handler from real
|
|
168
|
-
mouse or keyboard dispatch. A programmatic callback cannot prove hit testing,
|
|
169
|
-
cursor routing or protected hardware input.
|
|
170
|
-
|
|
171
|
-
Specify what must be true before each action, what output proves or refutes each
|
|
172
|
-
hypothesis, and what remains untested. Rebuild scene state after load when needed.
|
|
173
|
-
Finish observation and probe-owned cleanup before reporting. Results, logs and
|
|
174
|
-
assertions use a bounded memory report; the CLI verifies and durably saves its
|
|
175
|
-
exact bytes before releasing runtime storage. An expected assertion failure should use a clear
|
|
176
|
-
failure state instead of wrapping an exception as success. A verified report
|
|
177
|
-
proves retrieval and integrity, not that its assertions passed.
|
|
178
|
-
|
|
179
|
-
If evidence calls for a different experiment, finish or recover the old
|
|
180
|
-
operation first, then create a new revision and request key. An uncertain
|
|
181
|
-
accepted input or missing receipt is not grounds to rerun the same Lua. Keep
|
|
182
|
-
deadline, user cancellation, unresolved execution, probe error, assertion
|
|
183
|
-
failure and pending display cleanup distinct in the finding.
|
|
99
|
+
Use [probe design](live-probes.md#design-a-discriminating-probe) before creating
|
|
100
|
+
new Lua: pin the relevant source and define the observation that separates hypotheses.
|
|
184
101
|
|
|
185
102
|
## Write bounded probes
|
|
186
103
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
still applies.
|
|
190
|
-
|
|
191
|
-
Use Lua 5.1 and inspect only what answers the question. Bound collection sizes,
|
|
192
|
-
tree depth, samples and output. Synchronous Lua cannot be preempted by the host;
|
|
193
|
-
never rely on a host timeout as the probe's only bound.
|
|
194
|
-
|
|
195
|
-
For event- or callback-based work, the chunk receives one API as `...`:
|
|
196
|
-
|
|
197
|
-
```lua
|
|
198
|
-
local probe = ...
|
|
199
|
-
assert(probe:Async(30)) -- integer seconds, 1..120
|
|
200
|
-
local frame = CreateFrame("Frame")
|
|
201
|
-
assert(probe:OnCleanup(function() frame:UnregisterAllEvents() end))
|
|
202
|
-
frame:RegisterEvent("PLAYER_REGEN_ENABLED")
|
|
203
|
-
frame:SetScript("OnEvent", assert(probe:Callback(function()
|
|
204
|
-
probe:Finish({ observed = true })
|
|
205
|
-
end)))
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
Use `probe:Fail("stable_reason")` for an expected failed result,
|
|
209
|
-
`probe:Log(...)` for bounded diagnostic lines, and `probe:IsCancelled()` before
|
|
210
|
-
expensive callback work. Async probes have a mandatory bounded timer, at most
|
|
211
|
-
16 cleanup callbacks, 100 log entries and 32 KiB of logs. Completion is
|
|
212
|
-
single-use. Wrap every asynchronous entry with `probe:Callback` so late callbacks
|
|
213
|
-
cannot enter user code after termination and exceptions become failed reports.
|
|
214
|
-
Register resource cleanup before activating each timer/frame. Cleanup runs on
|
|
215
|
-
completion, failure or timeout; cleanup failures remain pending
|
|
216
|
-
and prevent a false successful acknowledgement. Do
|
|
217
|
-
not create permanent hooks or mutate Blizzard-owned APIs.
|
|
218
|
-
Choose the load budget to cover the probe's own async deadline and cleanup; a
|
|
219
|
-
longer host wait cannot extend the declared execution budget.
|
|
220
|
-
|
|
221
|
-
### Scene prerequisites and optional input protection
|
|
222
|
-
|
|
223
|
-
For scene-dependent probes, declare a small, side-effect-free predicate with
|
|
224
|
-
`probe:Guard(check, events, reason)`. It must return the non-secret boolean `true`.
|
|
225
|
-
The runtime checks it immediately, on the listed events, before each wrapped
|
|
226
|
-
callback, and before successful completion. A false, unavailable, secret or
|
|
227
|
-
throwing predicate fails the probe with the supplied reason. At most eight
|
|
228
|
-
guards and eight distinct events are supported; no polling is added. Choose
|
|
229
|
-
events that actually cover the target or UI changes relevant to the experiment.
|
|
230
|
-
Preserve that failed report, then reconstruct the scene or propose a revised
|
|
231
|
-
experiment according to the operation's observation/opaque policy. A scene
|
|
232
|
-
failure is not permission to automatically replay an effect.
|
|
233
|
-
|
|
234
|
-
Do not acquire input protection for ordinary data reads, listeners or waiting.
|
|
235
|
-
Only an explicitly exclusive UI experiment should call
|
|
236
|
-
`assert(probe:ProtectInput(seconds))`. It permits one protection phase per probe,
|
|
237
|
-
with an Agent-chosen duration no longer than the remaining probe budget; there
|
|
238
|
-
is no separate five-second cap. Use
|
|
239
|
-
`probe:ReleaseInput()` immediately after the exclusive actions; the remainder
|
|
240
|
-
of an async probe runs normally. Completion and errors release before user
|
|
241
|
-
cleanup. The hard deadline, combat, leaving the world or Ctrl+Alt+[ release the
|
|
242
|
-
shield and fail the active probe rather than silently continuing unprotected.
|
|
243
|
-
Use `probe:IsInputProtected()` to observe this probe's lease. Late callbacks and
|
|
244
|
-
old lease timers cannot resume a finished probe or release a newer lease.
|
|
245
|
-
|
|
246
|
-
This is an in-game input shield, not an OS-wide lock, protection from disconnects,
|
|
247
|
-
or a source of secure hardware-action authority. Keep checking scene prerequisites
|
|
248
|
-
even while protected. Use bounded Lua: a blocked synchronous Lua callback cannot
|
|
249
|
-
be preempted by a Lua timer. Slot loading protects only its short dispatch burst
|
|
250
|
-
(two-second safety deadline) and releases before business entry. Fixed reload
|
|
251
|
-
retains the host's serialized, bounded input transaction; it must work even when
|
|
252
|
-
the addon is not loaded, so an in-game takeover indicator is not guaranteed for
|
|
253
|
-
that fallback. Never hold a game shield while scanning memory or awaiting reload.
|
|
254
|
-
|
|
255
|
-
Combat lockdown and secret values are trust boundaries. Check them before
|
|
256
|
-
comparison, formatting or branching. Record unavailable and truncated values
|
|
257
|
-
explicitly instead of substituting defaults.
|
|
104
|
+
Use the [bounded API and cleanup rules](live-probes.md#write-bounded-probes).
|
|
105
|
+
A host timeout cannot preempt synchronous Lua; ordinary observation needs no input shield.
|
|
258
106
|
|
|
259
107
|
## Test source hypotheses
|
|
260
108
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
[source-research.md](source-research.md#secret-values-and-secure-taint). Bind the
|
|
265
|
-
observations to the verified session, client build and observed addon version;
|
|
266
|
-
record whether the researched revision is known to match the loaded addon.
|
|
267
|
-
An installed file or repository commit alone does not prove that match.
|
|
268
|
-
|
|
269
|
-
Start with existing verified reports and, when useful, the bounded error snapshot
|
|
270
|
-
described in [error-diagnosis.md](error-diagnosis.md). State the competing
|
|
271
|
-
explanations and the observation that could distinguish them before writing a
|
|
272
|
-
probe. For example, check whether the relevant value is marked secret at an
|
|
273
|
-
observable boundary, or whether the prerequisite event/state occurred. A probe
|
|
274
|
-
must answer that specific question; the live bridge does not automatically
|
|
275
|
-
recover arbitrary locals or a complete historical taint chain.
|
|
276
|
-
|
|
277
|
-
Use only supported, safe observations for the verified client. For secret
|
|
278
|
-
values, report the secrecy marker or an explicit unavailable state, not the raw
|
|
279
|
-
value. Do not compare, format, serialize or coerce the value to extract it, or
|
|
280
|
-
re-execute a known forbidden operation just to reproduce its error. Do not add
|
|
281
|
-
hooks to protected/Blizzard objects or replace their functions to observe flow.
|
|
282
|
-
If an internal boundary cannot be observed safely, retain the gap and identify
|
|
283
|
-
the additional diagnostic capability or reproduction context needed.
|
|
109
|
+
Carry the unresolved source path into [live hypothesis testing](live-probes.md#test-source-hypotheses),
|
|
110
|
+
then return the observed result to that path. Do not infer source correctness from
|
|
111
|
+
an unrelated successful probe.
|
|
284
112
|
|
|
285
|
-
|
|
286
|
-
Prefer event-driven observation when the question depends on an event. Complete
|
|
287
|
-
the loaded operation, interpret and archive its verified report, then finish
|
|
288
|
-
that exact operation before starting the next check. Within the existing task
|
|
289
|
-
authorization, continue these steps without separate confirmation for each one.
|
|
290
|
-
|
|
291
|
-
Feed the observation back into the suspected source path: identify which
|
|
292
|
-
explanation it supports, contradicts or leaves open. Run another check only if
|
|
293
|
-
it can resolve a remaining material distinction; do not repeat an unchanged
|
|
294
|
-
probe after a timeout or absent event. A normal observation outside the failing
|
|
295
|
-
conditions does not establish that the failing path is safe. If a repair and
|
|
296
|
-
deployment are in scope, repeat the relevant bounded check against the verified
|
|
297
|
-
updated runtime and retain both results.
|
|
113
|
+
## Input and recovery
|
|
298
114
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
the next step requires unavailable evidence, capability or user action; finish
|
|
303
|
-
or recover every outstanding operation under the lifecycle above. An unresolved
|
|
304
|
-
cause and completed display cleanup are separate outcomes.
|
|
115
|
+
For input blockers, same-installation contention or uncertain input, read
|
|
116
|
+
[input recovery](live-recovery.md#input-and-recovery). One original CON/request
|
|
117
|
+
continues serially; unknown input is never replay permission.
|
|
305
118
|
|
|
306
119
|
## Recover without replay
|
|
307
120
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
lycheedev live resume <CON-id> --project <project-directory> --wait-seconds 120 --format json
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
Status reads persisted evidence. Resume acquires the same connection's driver
|
|
314
|
-
lease, reconciles original nonces and continues within the caller's wait budget.
|
|
315
|
-
Exit 6 retains usable results and unfinished cleanup; continue the same task.
|
|
316
|
-
Do not replace a request, edit its files, clear ownership or repeat raw input to
|
|
317
|
-
force progress. A cached hit never bypasses identity/checksum/fresh-confirmation
|
|
318
|
-
validation. Incomplete scan coverage is not proof that no result exists.
|
|
319
|
-
|
|
320
|
-
After user reload, a newly discovered descriptor is only a candidate. The CLI
|
|
321
|
-
binds it with a fresh nonce before retiring the old runtime's reservations.
|
|
322
|
-
Repeatable observations can resume in a new attempt, bounded to three attempts.
|
|
323
|
-
For opaque execution after a possible commit, `execution_unknown` remains unknown;
|
|
324
|
-
inspect external postconditions using an authorized independent observation
|
|
325
|
-
instead of repeating the effect. A fresh runtime may prove old runtime resources
|
|
326
|
-
are gone without proving that the old script never changed persistent state.
|
|
327
|
-
|
|
328
|
-
A partial final journal write can be repaired under the owning driver lease only
|
|
329
|
-
when the entire preceding chain validates; the original bytes are retained.
|
|
330
|
-
Corrupt complete events, missing journals, foreign ownership, incompatible files
|
|
331
|
-
or an unavailable client require diagnosis. Never recreate an empty ledger to
|
|
332
|
-
turn uncertainty into a new operation. Report the exact blocker and retained IDs
|
|
333
|
-
if no safe progress remains; do not label that handoff complete.
|
|
334
|
-
|
|
335
|
-
For an intentional idle reload, use a stable request key:
|
|
336
|
-
|
|
337
|
-
```text
|
|
338
|
-
lycheedev live reload --project <project-directory> --session <CON-id> --request <reload-key> --wait-seconds 120 --format json
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
The single RGB patch is only a reload observation hint. The new runtime and fresh
|
|
342
|
-
bind are still required. The patch expires after 45 seconds or stops on wake.
|
|
343
|
-
An interrupted reload resumes observation and does not blindly resend `/reload`.
|
|
121
|
+
Read [recovery](live-recovery.md#recover-without-replay) before resuming or reloading.
|
|
122
|
+
Pending alone does not call for reload; unchanged blockers do not justify a retry loop.
|