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,160 @@
|
|
|
1
|
+
# Live probe design and implementation
|
|
2
|
+
|
|
3
|
+
Read this when writing a probe or testing a source hypothesis. Use the
|
|
4
|
+
[live workflow](live-investigation.md) for target selection, delivery and closure.
|
|
5
|
+
|
|
6
|
+
## Register reusable source
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
lycheedev live probe put --name <name> --file <probe.lua> --format json
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Names are mutable selectors; retain the returned immutable PRB revision. Use it
|
|
13
|
+
with native execute. Old queue-oriented atomic commands belong to legacy records
|
|
14
|
+
and are not the transport for CON connections.
|
|
15
|
+
|
|
16
|
+
## Design a discriminating probe
|
|
17
|
+
|
|
18
|
+
For a simple state query, choose the needed fields and verify the APIs it uses;
|
|
19
|
+
do not invent competing hypotheses or research unrelated code. For diagnosis,
|
|
20
|
+
state the plausible explanations and the observation that separates them.
|
|
21
|
+
Reuse matching source pins; establish how the relevant client source commit and
|
|
22
|
+
target addon revision correspond to the verified runtime. Inspect the relevant
|
|
23
|
+
API definition, call sites, event order,
|
|
24
|
+
preconditions and secret/protected boundaries in
|
|
25
|
+
[source-research.md](source-research.md). A current branch or newest tag is not
|
|
26
|
+
evidence for the running build. When exact source is unavailable, identify the
|
|
27
|
+
gap and, within the live authorization, use a minimal capability observation
|
|
28
|
+
before relying on the uncertain interface.
|
|
29
|
+
|
|
30
|
+
Choose the smallest experiment that separates the hypotheses. The supported
|
|
31
|
+
Lua probe can inspect state, collect event timing, exercise a target addon's own
|
|
32
|
+
controller or callback where authorized, check object lifetime, sample bounded
|
|
33
|
+
performance data, or verify a business invariant. Source and task determine the
|
|
34
|
+
actions, fields, sample limit and assertions; the bridge does not impose a UI
|
|
35
|
+
template. For an interactive behavior, distinguish calling a handler from real
|
|
36
|
+
mouse or keyboard dispatch. A programmatic callback cannot prove hit testing,
|
|
37
|
+
cursor routing or protected hardware input.
|
|
38
|
+
|
|
39
|
+
Specify what must be true before each action, what output proves or refutes each
|
|
40
|
+
hypothesis, and what remains untested. Rebuild scene state after load when needed.
|
|
41
|
+
Finish observation and probe-owned cleanup before reporting. Results, logs and
|
|
42
|
+
assertions use a bounded memory report; the CLI verifies and durably saves its
|
|
43
|
+
exact bytes before releasing runtime storage. An expected assertion failure should use a clear
|
|
44
|
+
failure state instead of wrapping an exception as success. A verified report
|
|
45
|
+
proves retrieval and integrity, not that its assertions passed.
|
|
46
|
+
|
|
47
|
+
If evidence calls for a different experiment, finish or recover the old
|
|
48
|
+
operation first, then create a new revision and request key. An uncertain
|
|
49
|
+
accepted input or missing receipt is not grounds to rerun the same Lua. Keep
|
|
50
|
+
deadline, user cancellation, unresolved execution, probe error, assertion
|
|
51
|
+
failure and pending display cleanup distinct in the finding.
|
|
52
|
+
|
|
53
|
+
## Write bounded probes
|
|
54
|
+
|
|
55
|
+
Use Lua 5.1 and inspect only what answers the question. Bound collection sizes,
|
|
56
|
+
tree depth, samples and output. Synchronous Lua cannot be preempted by the host;
|
|
57
|
+
never rely on a host timeout as the probe's only bound.
|
|
58
|
+
|
|
59
|
+
For event- or callback-based work, the chunk receives one API as `...`:
|
|
60
|
+
|
|
61
|
+
```lua
|
|
62
|
+
local probe = ...
|
|
63
|
+
assert(probe:Async(30)) -- integer seconds, 1..120
|
|
64
|
+
local frame = CreateFrame("Frame")
|
|
65
|
+
assert(probe:OnCleanup(function() frame:UnregisterAllEvents() end))
|
|
66
|
+
frame:RegisterEvent("PLAYER_REGEN_ENABLED")
|
|
67
|
+
frame:SetScript("OnEvent", assert(probe:Callback(function()
|
|
68
|
+
probe:Finish({ observed = true })
|
|
69
|
+
end)))
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Use `probe:Fail("stable_reason")` for an expected failed result,
|
|
73
|
+
`probe:Log(...)` for bounded diagnostic lines, and `probe:IsCancelled()` before
|
|
74
|
+
expensive callback work. Async probes have a mandatory bounded timer, at most
|
|
75
|
+
16 cleanup callbacks, 100 log entries and 32 KiB of logs. Completion is
|
|
76
|
+
single-use. Wrap every asynchronous entry with `probe:Callback` so late callbacks
|
|
77
|
+
cannot enter user code after termination and exceptions become failed reports.
|
|
78
|
+
Register resource cleanup before activating each timer/frame. Cleanup runs on
|
|
79
|
+
completion, failure or timeout; cleanup failures remain pending
|
|
80
|
+
and prevent a false successful acknowledgement. Do
|
|
81
|
+
not create permanent hooks or mutate Blizzard-owned APIs.
|
|
82
|
+
Choose the load budget to cover the probe's own async deadline and cleanup; a
|
|
83
|
+
longer host wait cannot extend the declared execution budget.
|
|
84
|
+
|
|
85
|
+
### Scene prerequisites and optional input protection
|
|
86
|
+
|
|
87
|
+
For scene-dependent probes, declare a small, side-effect-free predicate with
|
|
88
|
+
`probe:Guard(check, events, reason)`. It must return the non-secret boolean `true`.
|
|
89
|
+
The runtime checks it immediately, on the listed events, before each wrapped
|
|
90
|
+
callback, and before successful completion. A false, unavailable, secret or
|
|
91
|
+
throwing predicate fails the probe with the supplied reason. At most eight
|
|
92
|
+
guards and eight distinct events are supported; no polling is added. Choose
|
|
93
|
+
events that actually cover the target or UI changes relevant to the experiment.
|
|
94
|
+
Preserve that failed report, then reconstruct the scene or propose a revised
|
|
95
|
+
experiment according to the operation's observation/opaque policy. A scene
|
|
96
|
+
failure is not permission to automatically replay an effect.
|
|
97
|
+
|
|
98
|
+
Do not acquire input protection for ordinary data reads, listeners or waiting.
|
|
99
|
+
Only an explicitly exclusive UI experiment should call
|
|
100
|
+
`assert(probe:ProtectInput(seconds))`. It permits one protection phase per probe,
|
|
101
|
+
with an Agent-chosen duration no longer than the remaining probe budget; there
|
|
102
|
+
is no separate five-second cap. Use
|
|
103
|
+
`probe:ReleaseInput()` immediately after the exclusive actions; the remainder
|
|
104
|
+
of an async probe runs normally. Completion and errors release before user
|
|
105
|
+
cleanup. The hard deadline, combat, leaving the world or Ctrl+Alt+[ release the
|
|
106
|
+
shield and fail the active probe rather than silently continuing unprotected.
|
|
107
|
+
Use `probe:IsInputProtected()` to observe this probe's lease. Late callbacks and
|
|
108
|
+
old lease timers cannot resume a finished probe or release a newer lease.
|
|
109
|
+
|
|
110
|
+
This is an in-game input shield, not an OS-wide lock, protection from disconnects,
|
|
111
|
+
or a source of secure hardware-action authority. Keep checking scene prerequisites
|
|
112
|
+
even while protected. Use bounded Lua: a blocked synchronous Lua callback cannot
|
|
113
|
+
be preempted by a Lua timer. Slot loading protects only its short dispatch burst
|
|
114
|
+
(two-second safety deadline) and releases before business entry. Fixed reload
|
|
115
|
+
retains the host's serialized, bounded input transaction; it must work even when
|
|
116
|
+
the addon is not loaded, so an in-game takeover indicator is not guaranteed for
|
|
117
|
+
that fallback. Never hold a game shield while scanning memory or awaiting reload.
|
|
118
|
+
|
|
119
|
+
Combat lockdown and secret values are trust boundaries. Check them before
|
|
120
|
+
comparison, formatting or branching. Record unavailable and truncated values
|
|
121
|
+
explicitly instead of substituting defaults.
|
|
122
|
+
|
|
123
|
+
## Test source hypotheses
|
|
124
|
+
|
|
125
|
+
Use this when authorized runtime work can distinguish an unresolved source
|
|
126
|
+
hypothesis. Carry the exact source locations, value flow and uncertainty from
|
|
127
|
+
[source value-flow analysis](source-value-flow.md); bind observations to the
|
|
128
|
+
verified client, build and loaded addon revision. Installed files alone do not
|
|
129
|
+
prove the loaded revision. Consult existing reports and [retained errors](error-diagnosis.md)
|
|
130
|
+
before another probe. The bridge cannot recover arbitrary locals or a complete
|
|
131
|
+
historical taint chain.
|
|
132
|
+
|
|
133
|
+
Use only supported, safe observations for the verified client. For secret
|
|
134
|
+
values, report the secrecy marker or an explicit unavailable state, not the raw
|
|
135
|
+
value. Do not compare, format, serialize or coerce the value to extract it, or
|
|
136
|
+
re-execute a known forbidden operation just to reproduce its error. Do not add
|
|
137
|
+
hooks to protected/Blizzard objects or replace their functions to observe flow.
|
|
138
|
+
If an internal boundary cannot be observed safely, retain the gap and identify
|
|
139
|
+
the additional diagnostic capability or reproduction context needed.
|
|
140
|
+
|
|
141
|
+
Give each check a bounded observation window, sample/output budget and cleanup.
|
|
142
|
+
Prefer event-driven observation when the question depends on an event. Complete
|
|
143
|
+
the loaded operation, interpret and archive its verified report, then finish
|
|
144
|
+
that exact operation before starting the next check. Within the existing task
|
|
145
|
+
authorization, continue these steps without separate confirmation for each one.
|
|
146
|
+
|
|
147
|
+
Feed the observation back into the suspected source path: identify which
|
|
148
|
+
explanation it supports, contradicts or leaves open. Run another check only if
|
|
149
|
+
it can resolve a remaining material distinction; do not repeat an unchanged
|
|
150
|
+
probe after a timeout or absent event. A normal observation outside the failing
|
|
151
|
+
conditions does not establish that the failing path is safe. If a repair and
|
|
152
|
+
deployment are in scope, repeat the relevant bounded check against the verified
|
|
153
|
+
updated runtime and retain both results.
|
|
154
|
+
|
|
155
|
+
Deliver the supported path, runtime conditions and capture IDs together with
|
|
156
|
+
any unresolved links. Distinguish a verified probe result from a demonstrated
|
|
157
|
+
root cause and from a verified repair. Stop when the question is answered or
|
|
158
|
+
the next step requires unavailable evidence, capability or user action; finish
|
|
159
|
+
or recover every outstanding operation under the lifecycle above. An unresolved
|
|
160
|
+
cause and completed display cleanup are separate outcomes.
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# Native live recovery
|
|
2
|
+
|
|
3
|
+
Read this for pending input, interrupted work, contention, reload or unfinished
|
|
4
|
+
cleanup. Preserve the original project, CON and request. The CLI owns protocol
|
|
5
|
+
reconciliation; choose the next action from its continuation, not its internal stage.
|
|
6
|
+
|
|
7
|
+
## Recover without replay
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
lycheedev live status <CON-id> --project <project-directory> --format json
|
|
11
|
+
lycheedev live resume <CON-id> --project <project-directory> --wait-seconds 120 --format json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Status reads persisted evidence. Resume acquires the same connection's driver
|
|
15
|
+
lease, reconciles original nonces and continues within both the caller's wait
|
|
16
|
+
limit and the original durable deadline. Exit 6 retains usable results and
|
|
17
|
+
unfinished cleanup. Follow continuation: continue the same request serially,
|
|
18
|
+
wait for its existing call, resolve the reported external condition, or report
|
|
19
|
+
the exhausted budget/required decision. Do not infer a recovery action from an
|
|
20
|
+
internal stage alone. Keep each instance's project, CON and request separate.
|
|
21
|
+
Do not replace a request, edit its files, clear ownership or repeat raw input to
|
|
22
|
+
force progress. A cached hit never bypasses identity/checksum/fresh-confirmation
|
|
23
|
+
validation. Incomplete scan coverage is not proof that no result exists.
|
|
24
|
+
|
|
25
|
+
After user reload, a descriptor alone is only a candidate. Continuing business
|
|
26
|
+
requires a fresh bind; closing the old CON instead uses [verified retirement](#ownership-and-runtime-retirement).
|
|
27
|
+
Resume may attempt input-free cleanup when closing, after budget exhaustion or
|
|
28
|
+
from saved `runtimeEnd`, without renewing business time.
|
|
29
|
+
Repeatable observations can resume in a new attempt, bounded to three attempts.
|
|
30
|
+
For opaque execution after a possible commit, `execution_unknown` remains unknown;
|
|
31
|
+
inspect external postconditions using an authorized independent observation
|
|
32
|
+
instead of repeating the effect. A fresh runtime may prove old runtime resources
|
|
33
|
+
are gone without proving that the old script never changed persistent state.
|
|
34
|
+
|
|
35
|
+
A partial final journal write can be repaired under the owning driver lease only
|
|
36
|
+
when the entire preceding chain validates; the original bytes are retained.
|
|
37
|
+
Corrupt complete events, missing journals, foreign ownership, incompatible files
|
|
38
|
+
or an unavailable client require diagnosis. Never recreate an empty ledger to
|
|
39
|
+
turn uncertainty into a new operation. Report the exact blocker and retained IDs
|
|
40
|
+
if no safe progress remains; do not label that handoff complete.
|
|
41
|
+
|
|
42
|
+
For an intentional idle reload, use a stable request key:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
lycheedev live reload --project <project-directory> --session <CON-id> --request <reload-key> --wait-seconds 120 --format json
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The same explicit reload can recover a bound connection whose pending exchange
|
|
49
|
+
cannot obtain a receipt (for example, `confirm_ready` after submitted input).
|
|
50
|
+
It preserves the old exchange and candidate report, uses normal input readiness,
|
|
51
|
+
and, while the connection remains open, requires a fresh runtime binding to
|
|
52
|
+
complete reload and continue business. Observation work may then become eligible
|
|
53
|
+
for a later resume under its existing policy.
|
|
54
|
+
|
|
55
|
+
If disconnect is already pending, explicit reload has a narrower purpose: verify
|
|
56
|
+
that the old runtime has ended, sending the authorized reload only if needed,
|
|
57
|
+
then close the old CON without binding the replacement or restarting unfinished work.
|
|
58
|
+
It uses its own 600-second control budget even when the original close budget is
|
|
59
|
+
exhausted; neither that budget nor the business budget is renewed. Keep the same
|
|
60
|
+
CON/project and reload request key for continuation. A submitted or uncertain
|
|
61
|
+
reload input is never replayed, and an active reload/recovery cannot be replaced
|
|
62
|
+
by a new request. Completion here means the CON is closed, not connected to the
|
|
63
|
+
replacement runtime; it does not prove this CLI sent or caused a reload.
|
|
64
|
+
Saved `runtimeEnd` evidence needs only input-free retirement.
|
|
65
|
+
The original input record remains the authority for what was sent.
|
|
66
|
+
|
|
67
|
+
Use this explicit recovery only when needed within the authorized task, after
|
|
68
|
+
inspecting the concrete blocker; pending, contention or budget exhaustion alone
|
|
69
|
+
does not call for reload. Without replacement proof, retain pending cleanup and
|
|
70
|
+
wait for the reported condition to change. The separate input-free retirement
|
|
71
|
+
path may close the old CON without any reload input. An unconfirmed opaque report
|
|
72
|
+
remains unavailable/execution_unknown; successful reload or close does not verify
|
|
73
|
+
it. New work on a changed actor requires its own authorized target and new CON.
|
|
74
|
+
|
|
75
|
+
`journal.resource_busy: active window driver` means another host CLI still holds
|
|
76
|
+
the execution lease. A game UI frame does not own that lease. Wait for the active
|
|
77
|
+
call to finish before recovery; pressing Escape cannot release a host lease.
|
|
78
|
+
|
|
79
|
+
Disconnect does not commit prepared business merely to finish it. If the exact
|
|
80
|
+
prepared exchange needs explicit reload, preserve its blocker and use the
|
|
81
|
+
existing reload command only within the authorized scope. Closing is not proof
|
|
82
|
+
that an already submitted opaque operation was cancelled or never ran.
|
|
83
|
+
|
|
84
|
+
## Ownership and runtime retirement
|
|
85
|
+
|
|
86
|
+
A PID has one durable owner across projects and one active host driver. CLI exit
|
|
87
|
+
or elapsed time does not release the claim. Resolve foreign ownership with the
|
|
88
|
+
owning task; a crash releases the OS driver lock, not durable reservations.
|
|
89
|
+
|
|
90
|
+
Use the old CON's `live disconnect` in its owning project. The CLI can verify
|
|
91
|
+
PID plus creation-time process exit, or verify another runtime actually wrote a
|
|
92
|
+
new input sample in the same fixed process. Access errors, missing windows,
|
|
93
|
+
descriptors, cached addresses and old heap samples prove neither case. Runtime
|
|
94
|
+
replacement proof does not compare game time with the host clock. The CLI may
|
|
95
|
+
relocate distant sample addresses once within its existing observation budget;
|
|
96
|
+
this is not an Agent-directed scan or permission to extend the deadline.
|
|
97
|
+
|
|
98
|
+
For runtime replacement, the CLI saves `runtimeEnd` before retiring only the
|
|
99
|
+
old CON's exact reservations.
|
|
100
|
+
Saved proof can finish interrupted retirement even after character selection.
|
|
101
|
+
Without a new sample or saved proof, character selection stays pending. This path
|
|
102
|
+
sends no input, binds no replacement, and does not change the old actor or replay
|
|
103
|
+
its probe. Retain unresolved `execution_unknown` results even if `closed=true`.
|
|
104
|
+
A new investigation on another actor needs a new CON for the authorized target;
|
|
105
|
+
never automatically transfer the old request or probe.
|
|
106
|
+
|
|
107
|
+
## Input and recovery
|
|
108
|
+
|
|
109
|
+
The CLI journals input and selects the observation adapter from the verified
|
|
110
|
+
runtime capability. Hybrid optical readiness keeps identity, routing and reports
|
|
111
|
+
memory-backed; older input-v1 runtimes use memory observations. Missing signals
|
|
112
|
+
do not permit blind fallback. Agents do not decode colors or manage capture.
|
|
113
|
+
|
|
114
|
+
With an ordinary focused editor, the coordinator may send one Esc and observe
|
|
115
|
+
again; Esc can close/cancel that UI. Combat, unknown observations, missing signals
|
|
116
|
+
and stale evidence do not permit Esc. Held system keys wait for release. A fresh
|
|
117
|
+
capture frame or changing heartbeat alone proves neither runtime identity nor
|
|
118
|
+
freshness of the Lua state. Do not infer readiness from a screenshot or extend
|
|
119
|
+
input time limits to bypass a pending result. No manual foreground-input or
|
|
120
|
+
color-decoding workflow is required; native invocation keys and slots belong to
|
|
121
|
+
the CLI.
|
|
122
|
+
|
|
123
|
+
For `receiver_binding_conflict`, `receiver_binding_ineffective`, or no effective
|
|
124
|
+
machine shortcut, resolve the selected target's binding conflict before further
|
|
125
|
+
wake attempts. Do not change user bindings or protocol keys, or repeat wake to
|
|
126
|
+
test the conflict. A ready input observation does not prove the shortcut reaches
|
|
127
|
+
the receiver. If input was already submitted or uncertain, retain the original
|
|
128
|
+
CON and slot reservation and follow official CLI recovery; fixing the binding
|
|
129
|
+
does not authorize replay of unknown input. Never delete the slot to unblock
|
|
130
|
+
another instance; use [verified retirement](#ownership-and-runtime-retirement)
|
|
131
|
+
when the original process or runtime has ended.
|
|
132
|
+
|
|
133
|
+
Input evidence is distinct from execution: `not_sent` proves zero messages were
|
|
134
|
+
queued; `submitted` proves only queue submission; `uncertain` (or an intent with
|
|
135
|
+
no outcome) does not permit replay. These facts drive CLI recovery. Do not
|
|
136
|
+
reinterpret them into manual retry instructions. Use the same CON/project and
|
|
137
|
+
`live resume`; inspect `waiting` when present. Recheck after a changed condition
|
|
138
|
+
within the authorized task; do not repeat indefinitely against an absent process,
|
|
139
|
+
foreign ownership or an unresolved opaque execution outcome.
|
|
140
|
+
|
|
141
|
+
`waiting: shared_publication` is shared-file contention inside one installation,
|
|
142
|
+
not proof of a lost connection. Legacy 64-slot CONs retain original-slot resume/cleanup; do not apply v2
|
|
143
|
+
allocation to them. The 200-slot v2 allocator can skip another
|
|
144
|
+
owner's reservations for a new exchange only before publication or input. The
|
|
145
|
+
runtime skips empty/foreign slots and stops at the first envelope for itself;
|
|
146
|
+
it does not skip its own pending work. Once published, submitted or uncertain,
|
|
147
|
+
the original slot and nonce remain fixed. Agents neither choose slots nor move
|
|
148
|
+
payloads; they continue the original CON/project/request serially.
|
|
149
|
+
|
|
150
|
+
A short publication lease can clear when its active call ends. If all forward
|
|
151
|
+
slots are occupied, continuation reports `blocker.kind: slot_pool_full` with
|
|
152
|
+
`condition: forward_slot_available`. Wait for actual availability to change,
|
|
153
|
+
usually through the owning connection's recovery; do not busy-loop resume,
|
|
154
|
+
delete reservations or change request keys. Capacity reload belongs to the CLI
|
|
155
|
+
and does not erase another instance's claim or prove unknown input never ran.
|
|
156
|
+
A combat or focus wait retains its reservation, not the short publication lock.
|
|
157
|
+
|
|
158
|
+
`complete` applies to the current command: a connected runtime does not complete
|
|
159
|
+
a pending disconnect, and a previous report does not complete reload. UI activity
|
|
160
|
+
and reload hints are not execution or result proof.
|
|
161
|
+
|
|
162
|
+
The whole `.lycheedev/live` directory is the recovery unit. Keep connection logs,
|
|
163
|
+
linked history segments, content-addressed `connections/artifacts`, target metadata
|
|
164
|
+
and result files together. New journals reference exact code/result bytes by digest;
|
|
165
|
+
older inline snapshots remain readable. Missing or corrupt referenced content is
|
|
166
|
+
a recovery error, never a reason to generate another request key.
|
|
167
|
+
|
|
168
|
+
## Durable evidence and older journals
|
|
169
|
+
|
|
170
|
+
Durable deadlines are 600 seconds per business request or explicit reload,
|
|
171
|
+
120 seconds for initial bind or first close, and 600 seconds for activation
|
|
172
|
+
carried into its bind. Time between calls counts. Resume, repeated close and
|
|
173
|
+
changing request keys do not extend a goal. Close retains its own allowance
|
|
174
|
+
after business exhaustion; existing evidence remains readable. Detected clock
|
|
175
|
+
rollback stops automatic work; an unseen offline clock change cannot be detected.
|
|
176
|
+
|
|
177
|
+
Older channel-v1 journals receive one marked legacy budget window on their first
|
|
178
|
+
drive, persisted before input; reading status does not migrate them. That window
|
|
179
|
+
starts at migration because prior elapsed time is unavailable. A CLI wait timeout
|
|
180
|
+
or interruption ends the host call, not the game-side probe or its cleanup.
|
|
181
|
+
New writes use channel-v2 (activation-v2 for activation); older CLIs cannot drive
|
|
182
|
+
those journals. A cancelled host wait uses exit 7; it does not confirm Lua cancellation.
|
|
183
|
+
|
|
184
|
+
Cleanup callback failures retain the verified report and trigger a journaled
|
|
185
|
+
reload; a fresh binding then records `cleanupMethod: runtime_destroyed`. The
|
|
186
|
+
original `resourcesReleased: false` is preserved. It is distinct from a normal
|
|
187
|
+
release acknowledgement. Journal segments rotate only at idle boundaries and
|
|
188
|
+
remain linked under the connection's `.jsonl.history` directory; preserve these
|
|
189
|
+
alongside the active log. A missing segment must not be worked around by issuing
|
|
190
|
+
a new request key.
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Use this reference for first installation, an upgraded addon, or contact without
|
|
4
4
|
a usable CON connection. Disk installation and runtime activation are separate.
|
|
5
|
-
The CLI owns the main addon and
|
|
5
|
+
The CLI owns the main addon and 200 LoadOnDemand slots (slot-v2); never overlay-copy files,
|
|
6
6
|
edit slot payloads or import old queues/SavedVariables.
|
|
7
7
|
|
|
8
|
+
Use the shared installation candidates to select a verified client directory;
|
|
9
|
+
directory names alone do not establish product identity. A game root may contain
|
|
10
|
+
several clients, and a client may have several processes: retain the selected path,
|
|
11
|
+
PID and later character binding. Resolve only remaining ambiguity, not a fresh
|
|
12
|
+
choice on every retry. Local selection errors never authorize another installation.
|
|
13
|
+
|
|
8
14
|
1. Select the authorized installation and PID. Inspect `addon status`; the main
|
|
9
|
-
addon must be a clean managed installation matching the CLI, and all
|
|
15
|
+
addon must be a clean managed installation matching the CLI, and all 200 slot
|
|
10
16
|
files must pass inspection. Use [installation](installation.md) for deployment.
|
|
11
17
|
2. Use `live connect` with the invoking project's `--project` and exact target.
|
|
12
18
|
It discovers memory identity and binds with a new nonce. If the runtime is
|
|
@@ -14,6 +20,14 @@ edit slot payloads or import old queues/SavedVariables.
|
|
|
14
20
|
3. Preserve any returned CON ID, including activation-pending results. Use status
|
|
15
21
|
and resume in the same project; do not start another connection or resend keys.
|
|
16
22
|
|
|
23
|
+
A legacy 64-slot installation needs managed migration before new work. Existing 64-slot CONs may resume and clean up their original exchanges in
|
|
24
|
+
the original slots; new connections require the 200-slot runtime. Retained old
|
|
25
|
+
records also remain usable as read-only evidence and retirement proof. New connect can activate an old loaded runtime through a journaled
|
|
26
|
+
reload after migration. Verify activation separately for every authorized PID,
|
|
27
|
+
including same-build instances sharing one installation: 200 files on disk do
|
|
28
|
+
not prove any running client loaded them. If the client cannot discover the full
|
|
29
|
+
inventory, `restart_required` requires a scoped client restart; do not loop reloads.
|
|
30
|
+
|
|
17
31
|
After an intentional installation/update with no usable connection, explicit
|
|
18
32
|
activation is also available:
|
|
19
33
|
|
|
@@ -21,19 +35,12 @@ activation is also available:
|
|
|
21
35
|
lycheedev live reload fallback --project <project-directory> --installation <client> --pid <pid> --request <activation-key> --wait-seconds 120 --format json
|
|
22
36
|
```
|
|
23
37
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
First installation or an older runtime without that capability uses the fixed
|
|
31
|
-
Esc x3, Enter, /reload, Enter fallback. Its intent is saved before
|
|
32
|
-
the burst and its structured input outcome afterward. A lost outcome remains
|
|
33
|
-
uncertain. Repeating the request resumes the same activation; only proven zero
|
|
34
|
-
input permits another attempt. A single RGB square changes
|
|
35
|
-
phase near the top-left for up to 45 seconds and stops on wake. Seeing it is a
|
|
36
|
-
hint, not identity proof: a newly observed runtime and fresh bind must follow.
|
|
38
|
+
The CLI selects the verified runtime's input observation path. Capable runtimes
|
|
39
|
+
use normal readiness checks; missing signals or stale evidence stay pending.
|
|
40
|
+
Only supported first-install/older-runtime conditions permit the fixed activation
|
|
41
|
+
fallback. Agents do not send that key sequence manually. Input intent and outcome
|
|
42
|
+
are journaled; repeating the request resumes activation without replaying uncertain
|
|
43
|
+
input. A startup beacon is only a temporary hint, never identity or bind proof.
|
|
37
44
|
|
|
38
45
|
If the game is at character selection, loading, in combat, explicitly disabled,
|
|
39
46
|
or otherwise cannot accept the narrow input, preserve pending evidence and
|
|
@@ -45,19 +52,10 @@ and installation fixed. A restart or character switch follows the user's scope.
|
|
|
45
52
|
|
|
46
53
|
## Ownership and recovery
|
|
47
54
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
If the selected game process exited, use `live disconnect <CON>` from its owning
|
|
54
|
-
project before upgrading that installation. The CLI checks PID plus creation
|
|
55
|
-
time, journals the OS proof, and retires only that connection's reservations and
|
|
56
|
-
claim without sending input. Access errors or missing windows do not prove exit.
|
|
57
|
-
An unconfirmed operation remains `execution_unknown`, `reportState=unavailable`,
|
|
58
|
-
`complete=false` even when `closed=true`; a candidate result is not promoted.
|
|
59
|
-
Keep the old project journal and connect the new process separately. Never
|
|
60
|
-
delete owner files to make an installation upgrade succeed.
|
|
55
|
+
Retain the original CON and project on failed activation or interrupted cleanup.
|
|
56
|
+
A foreign owner's claim is not an expired timeout. Use [ownership and runtime
|
|
57
|
+
retirement](live-recovery.md#ownership-and-runtime-retirement) for process exit,
|
|
58
|
+
character changes or a replaced runtime; never delete claims or slot files.
|
|
61
59
|
|
|
62
60
|
Do not use legacy bind/reset/QR commands for a native CON connection. The fixed
|
|
63
61
|
keys are part of the protocol; changing them in the UI or through an external
|
|
@@ -44,6 +44,18 @@ with sample count and timer resolution. Offline replay timings cannot establish
|
|
|
44
44
|
game startup latency. If the hang occurs during input before execution, examine
|
|
45
45
|
the input path rather than attributing it to the probe's business logic.
|
|
46
46
|
|
|
47
|
+
For native transport measurements, separate optical waiting, memory discovery,
|
|
48
|
+
point reads, input dispatch, probe execution, result retrieval and diagnostic
|
|
49
|
+
flush. A small capture ROI reduces copied/decoded pixels; it does not mean WGC's
|
|
50
|
+
whole-window capture cost is equally small. Keep cache setting, window state,
|
|
51
|
+
foreground/background FPS, loaded capability and candidate binary fixed when
|
|
52
|
+
comparing runs. Preserve scan coverage and counts where the CLI records them;
|
|
53
|
+
report transport completion, `report.ok` and cleanup separately. A failed probe
|
|
54
|
+
assertion is not successful performance validation merely because transport
|
|
55
|
+
retrieved it. Results from the old memory-only path do not validate the hybrid
|
|
56
|
+
path or a different candidate. Same-build instances are separate measurements,
|
|
57
|
+
not interchangeable targets.
|
|
58
|
+
|
|
47
59
|
## Preserve live ownership and bound the experiment
|
|
48
60
|
|
|
49
61
|
Prefer a private replay instance for registry/index experiments. Check that it
|
|
@@ -61,7 +73,7 @@ Use existing counters or bounded traversal before scanning all globals/frames.
|
|
|
61
73
|
For each scenario record its preconditions, live/replay/dependency status,
|
|
62
74
|
duration/work/output bounds, correctness invariant and cleanup checks. Use the
|
|
63
75
|
current probe API (`probe:Async`, `probe:OnCleanup`, `probe:Finish` or
|
|
64
|
-
`probe:Fail`) described in
|
|
76
|
+
`probe:Fail`) described in [bounded probes](live-probes.md#write-bounded-probes) for callback-based work. Bound each
|
|
65
77
|
batch as well as the whole run, invalidate late callbacks and stop owned work
|
|
66
78
|
before publishing. A deadline cannot preempt a long synchronous native call.
|
|
67
79
|
Keep measurement separate from report construction and invariant checks.
|
|
@@ -78,8 +90,10 @@ size; do not substitute an enormous manual paste when CLI delivery is available.
|
|
|
78
90
|
Read the verified report and retain its operation/capture IDs. Distinguish live,
|
|
79
91
|
replay, missing dependency, failed, timeout and not-tested scenarios. Keep failed
|
|
80
92
|
rounds and raw deltas, not only the fastest result. Describe attribution limits,
|
|
81
|
-
observer cost and any incomplete restoration.
|
|
82
|
-
|
|
93
|
+
observer cost and any incomplete restoration. Let native execute/resume finish
|
|
94
|
+
its verified report and runtime release even when the probe produced a diagnostic
|
|
95
|
+
error; native CON work has no extra ACK or finish step. Follow [recovery](live-recovery.md)
|
|
96
|
+
when cleanup remains pending, preserving the usable report.
|
|
83
97
|
|
|
84
98
|
A memory-reduction proposal must also account for retained roots, companion
|
|
85
99
|
packages, restoration latency and business equivalence; moving cost elsewhere
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Source selection and recovery
|
|
2
|
+
|
|
3
|
+
Read when the requested source is not pinned or source preparation fails.
|
|
4
|
+
|
|
5
|
+
## Select the repository revision
|
|
6
|
+
|
|
7
|
+
Use `source list` to discover repository keys and their supported tracks. It does
|
|
8
|
+
not list tags; missing version text there does not mean the release is absent.
|
|
9
|
+
Read the repository's own track map: do not apply a game product to every addon
|
|
10
|
+
repository. A source track is not proof of installation compatibility.
|
|
11
|
+
|
|
12
|
+
Initialize a new Toolkit home with `lycheedev init` before syncing; an empty
|
|
13
|
+
directory alone is not a workspace. Reuse an initialized `--home` when available.
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
lycheedev source list --format json
|
|
17
|
+
lycheedev source sync --source <catalog-key> --product <repository-track> --ref <commit-or-full-ref> --format json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`source sync` returns the immutable PinnedSet directly. `--ref` accepts a 40-hex
|
|
21
|
+
commit or full `refs/heads/...` / `refs/tags/...` ref. Omission observes the selected
|
|
22
|
+
track's current branch; use that only when the request allows current source.
|
|
23
|
+
For a named release without an exact ref, establish its tag/commit from repository
|
|
24
|
+
evidence. Ask only if that mapping remains unavailable or ambiguous. Never guess
|
|
25
|
+
a tag, silently use latest, or replace an unavailable exact revision with a branch.
|
|
26
|
+
|
|
27
|
+
Carry the returned fixed pin and exact commit between calls. Preserve requested
|
|
28
|
+
version/tag, repository identity and parser revision; a tag is a traceable label,
|
|
29
|
+
not immutable evidence. Separate third-party addon pins from client API pins;
|
|
30
|
+
`--environment <client-pin>` on refs/context supplies API context without changing
|
|
31
|
+
the addon revision. Folder names and branch labels do not prove a client's build.
|
|
32
|
+
|
|
33
|
+
## Recover without changing the revision
|
|
34
|
+
|
|
35
|
+
Keep the original command, pin/ref and structured error. The CLI prepares mappings
|
|
36
|
+
when the operation needs them; raw file inspection reads fixed Git content directly.
|
|
37
|
+
`source list --snapshot <pin>` reports readiness;
|
|
38
|
+
`source index --snapshot <pin>` is optional, not a mandatory repair sequence.
|
|
39
|
+
|
|
40
|
+
| Condition | Next action |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| Unknown repository/track or invalid ref | Check catalog and exact ref syntax; correct the selection without substituting the requested version |
|
|
43
|
+
| Missing Git, source objects or preparation failure | Address the named prerequisite and retry the same fixed source; do not manually rewrite managed worktrees |
|
|
44
|
+
| Integrity failure | Preserve evidence and diagnose changed/corrupt bytes; do not bypass verification or delete caches blindly |
|
|
45
|
+
| Syntax diagnostics / partial map | Inspect readable original files and retain the gaps; unparsed does not mean absent |
|
|
46
|
+
| Missing LuaLS or client environment | Continue original-source research with partial semantic coverage; see [source-relations.md](source-relations.md) |
|
|
47
|
+
| Invalid cursor | Check command, snapshot, symbol/query, environment and budgets against its originating result; do not mix pages from a changed scope |
|
|
48
|
+
| Resource budget | Narrow to the part needed by the question; retain omitted scope, not a claim of complete investigation |
|
|
49
|
+
|
|
50
|
+
Allow at most one unchanged retry for a transient failure within the task budget.
|
|
51
|
+
Further retries require a changed cause. If still blocked, stop that branch and
|
|
52
|
+
report its exact revision, error, useful captures and missing prerequisite;
|
|
53
|
+
independent useful source inspection may continue. Do not copy data-only timeout
|
|
54
|
+
or offline flags onto source commands; consult installed help for their surface.
|
|
55
|
+
|
|
56
|
+
Source disk reclamation is separate from research. Only when requested, use
|
|
57
|
+
`source prune --target-bytes <n>`: it removes idle derived worktrees and preserves
|
|
58
|
+
pins, cached facts and captures. It is not the ordinary `cache prune` command.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Source relationships and bounded context
|
|
2
|
+
|
|
3
|
+
Read when callers, cross-file implementation, loading context or semantic
|
|
4
|
+
resolution can change the answer. Simple declaration lookup can stop earlier.
|
|
5
|
+
|
|
6
|
+
## Select a symbol, then follow its evidence
|
|
7
|
+
|
|
8
|
+
Use `symbolId` from a pinned query. `source inspect --symbol <qualified-name>`
|
|
9
|
+
finds candidates; `--target-path <path>` inspects file/asset metadata. Same spelling
|
|
10
|
+
does not join declarations across scopes, files or repositories. A bare `--symbol`
|
|
11
|
+
is suitable only when unambiguous; otherwise inspect candidates and choose by
|
|
12
|
+
their original locations and the question.
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
lycheedev source refs --snapshot <pin> --symbol-id <id> --direction incoming --limit 50 --format json
|
|
16
|
+
lycheedev source context --snapshot <pin> --symbol-id <id> --limit 50 --max-lines 120 --format json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`refs` reports incoming/outgoing/both relations. `context` combines the definition,
|
|
20
|
+
bounded source excerpts, relations and available loading evidence. Retain relation
|
|
21
|
+
state, original locations and coverage: confirmed semantic resolution, static
|
|
22
|
+
candidates and unknown edges have different evidentiary strength. Generated API
|
|
23
|
+
declarations describe a contract; they are not necessarily implementation bodies.
|
|
24
|
+
|
|
25
|
+
The CLI attempts its verified bundled LuaLS when needed. For a third-party addon,
|
|
26
|
+
add `--environment <client-pin>` when client API context matters. Preserve both
|
|
27
|
+
source and environment identities; a Retail environment is not a substitute for
|
|
28
|
+
Forever. `--static-only` deliberately limits evidence to structural analysis.
|
|
29
|
+
Missing runtime/environment can leave usable source evidence with semantic
|
|
30
|
+
coverage partial. Neither static inference nor LuaLS types prove runtime behavior.
|
|
31
|
+
|
|
32
|
+
## Continue only the required scope
|
|
33
|
+
|
|
34
|
+
Query results contain a bounded relation preview. Use refs, not repeated query
|
|
35
|
+
pages, to investigate its edges. Each command owns its own `nextCursor`; retain
|
|
36
|
+
snapshot, symbol/query, environment, analysis options and budgets on continuation.
|
|
37
|
+
An ending page does not erase missing earlier pages or unresolved dynamic edges.
|
|
38
|
+
|
|
39
|
+
For context, `--max-lines`, `--max-bytes`, `--limit` and `--depth` bound different
|
|
40
|
+
parts of the result; inspect its truncation and continuation metadata. Follow a
|
|
41
|
+
cursor or request the relevant original-file range when the omitted material
|
|
42
|
+
matters. Do not increase every bound just to make an incomplete flag disappear.
|
|
43
|
+
|
|
44
|
+
Mapping completeness describes syntax extraction, not a validated load closure.
|
|
45
|
+
When actual TOC/XML order or multi-client compatibility matters, use
|
|
46
|
+
[addon-validation.md](addon-validation.md). Keep dynamic/conditional loading
|
|
47
|
+
unresolved when source cannot determine it.
|
|
48
|
+
|
|
49
|
+
For a concrete value/operation question, use
|
|
50
|
+
[source-value-flow.md](source-value-flow.md); ordinary relation traversal alone
|
|
51
|
+
does not establish a secret-value propagation path.
|