@eyeauras/insight-cli 0.7.0 → 0.8.0

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 (117) hide show
  1. package/.cli-package-build.json +1 -1
  2. package/SKILL.md +1 -1
  3. package/dist/src/activity-audit.d.ts +7 -0
  4. package/dist/src/activity-audit.js +14 -4
  5. package/dist/src/analysis-storage.d.ts +5 -1
  6. package/dist/src/analysis-storage.js +9 -2
  7. package/dist/src/audit-retention.d.ts +8 -2
  8. package/dist/src/audit-retention.js +68 -7
  9. package/dist/src/cli.js +19 -5
  10. package/dist/src/context-diagnostics.d.ts +1 -1
  11. package/dist/src/context-diagnostics.js +10 -2
  12. package/dist/src/contexts.d.ts +118 -10
  13. package/dist/src/contexts.js +851 -199
  14. package/dist/src/debugger.js +2 -1
  15. package/dist/src/diagnostic-error.js +1 -1
  16. package/dist/src/inline-script.js +3 -4
  17. package/dist/src/lifecycle.d.ts +11 -0
  18. package/dist/src/lifecycle.js +34 -6
  19. package/dist/src/native-inputs.d.ts +6 -0
  20. package/dist/src/native-inputs.js +30 -6
  21. package/dist/src/native-queries.js +1 -6
  22. package/dist/src/native-service.d.ts +40 -0
  23. package/dist/src/native-service.js +406 -0
  24. package/dist/src/research.d.ts +29 -1
  25. package/dist/src/research.js +106 -27
  26. package/dist/src/server.d.ts +38 -1
  27. package/dist/src/server.js +160 -12
  28. package/dist/src/storage-gc.js +1 -1
  29. package/dist/src/sync-policy.js +2 -1
  30. package/dist/src/timed-backend.js +8 -0
  31. package/dist/src/timing-report.d.ts +32 -0
  32. package/dist/src/timing-report.js +74 -0
  33. package/dist/src/tool-runtime/identity.js +86 -1
  34. package/dist/src/tool-runtime/supervisor.js +6 -5
  35. package/dist/src/transport.d.ts +35 -0
  36. package/dist/src/transport.js +77 -7
  37. package/dist/src/unresolved-guidance.d.ts +46 -0
  38. package/dist/src/unresolved-guidance.js +55 -0
  39. package/dist/src/windbg.d.ts +1 -1
  40. package/dist/src/worker-lease.d.ts +17 -0
  41. package/dist/src/worker-lease.js +50 -0
  42. package/dist/src/workspace.d.ts +3 -9
  43. package/dist/src/workspace.js +9 -41
  44. package/package.json +1 -1
  45. package/references/native/InsightHeadlessMain.java +9 -2
  46. package/references/native/InsightNativeCheckout.java +113 -43
  47. package/references/native/InsightNativeFingerprint.java +28 -1
  48. package/references/native/InsightNativeRead.java +32 -9
  49. package/references/native/InsightNativeService.java +43 -0
  50. package/references/native/InsightNativeView.java +17 -6
  51. package/references/native/InsightOwnedScripts.java +170 -0
  52. package/references/native/InsightWorkerLease.java +132 -0
  53. package/references/recovery.md +68 -3
  54. package/references/research.md +38 -4
  55. package/references/setup.md +5 -1
  56. package/skill-bundle/insight-artifacts/SKILL.md +1 -1
  57. package/skill-bundle/insight-artifacts/references/recovery.md +68 -3
  58. package/skill-bundle/insight-binary/SKILL.md +1 -1
  59. package/skill-bundle/insight-capture/SKILL.md +1 -1
  60. package/skill-bundle/insight-cli/SKILL.md +1 -1
  61. package/skill-bundle/insight-cli/references/recovery.md +68 -3
  62. package/skill-bundle/insight-cli/references/setup.md +5 -1
  63. package/skill-bundle/insight-die/SKILL.md +1 -1
  64. package/skill-bundle/insight-dnspy/SKILL.md +1 -1
  65. package/skill-bundle/insight-dotnet-dump/SKILL.md +1 -1
  66. package/skill-bundle/insight-dotnet-stack/SKILL.md +1 -1
  67. package/skill-bundle/insight-dotnet-trace/SKILL.md +1 -1
  68. package/skill-bundle/insight-frida/SKILL.md +1 -1
  69. package/skill-bundle/insight-ghidra/SKILL.md +1 -1
  70. package/skill-bundle/insight-ghidra/references/recovery.md +68 -3
  71. package/skill-bundle/insight-ghidra/references/research.md +38 -4
  72. package/skill-bundle/insight-ghidra/references/setup.md +5 -1
  73. package/skill-bundle/insight-ilspy/SKILL.md +1 -1
  74. package/skill-bundle/insight-interop/SKILL.md +1 -1
  75. package/skill-bundle/insight-lldb/SKILL.md +1 -1
  76. package/skill-bundle/insight-llvm/SKILL.md +1 -1
  77. package/skill-bundle/insight-managed-heap/SKILL.md +1 -1
  78. package/skill-bundle/insight-managed-metadata/SKILL.md +1 -1
  79. package/skill-bundle/insight-mitmproxy/SKILL.md +1 -1
  80. package/skill-bundle/insight-overview/SKILL.md +1 -1
  81. package/skill-bundle/insight-procmon/SKILL.md +1 -1
  82. package/skill-bundle/insight-re/SKILL.md +1 -1
  83. package/skill-bundle/insight-re/references/recovery.md +68 -3
  84. package/skill-bundle/insight-sevenzip/SKILL.md +1 -1
  85. package/skill-bundle/insight-strace/SKILL.md +1 -1
  86. package/skill-bundle/insight-tshark/SKILL.md +1 -1
  87. package/skill-bundle/insight-windbg/SKILL.md +1 -1
  88. package/skill-bundle/manifest.json +1 -1
  89. package/skills/insight-artifacts/SKILL.md +1 -1
  90. package/skills/insight-artifacts/references/recovery.md +68 -3
  91. package/skills/insight-binary/SKILL.md +1 -1
  92. package/skills/insight-capture/SKILL.md +1 -1
  93. package/skills/insight-die/SKILL.md +1 -1
  94. package/skills/insight-dnspy/SKILL.md +1 -1
  95. package/skills/insight-dotnet-dump/SKILL.md +1 -1
  96. package/skills/insight-dotnet-stack/SKILL.md +1 -1
  97. package/skills/insight-dotnet-trace/SKILL.md +1 -1
  98. package/skills/insight-frida/SKILL.md +1 -1
  99. package/skills/insight-ghidra/SKILL.md +1 -1
  100. package/skills/insight-ghidra/references/recovery.md +68 -3
  101. package/skills/insight-ghidra/references/research.md +38 -4
  102. package/skills/insight-ghidra/references/setup.md +5 -1
  103. package/skills/insight-ilspy/SKILL.md +1 -1
  104. package/skills/insight-interop/SKILL.md +1 -1
  105. package/skills/insight-lldb/SKILL.md +1 -1
  106. package/skills/insight-llvm/SKILL.md +1 -1
  107. package/skills/insight-managed-heap/SKILL.md +1 -1
  108. package/skills/insight-managed-metadata/SKILL.md +1 -1
  109. package/skills/insight-mitmproxy/SKILL.md +1 -1
  110. package/skills/insight-overview/SKILL.md +1 -1
  111. package/skills/insight-procmon/SKILL.md +1 -1
  112. package/skills/insight-re/SKILL.md +1 -1
  113. package/skills/insight-re/references/recovery.md +68 -3
  114. package/skills/insight-sevenzip/SKILL.md +1 -1
  115. package/skills/insight-strace/SKILL.md +1 -1
  116. package/skills/insight-tshark/SKILL.md +1 -1
  117. package/skills/insight-windbg/SKILL.md +1 -1
@@ -15,10 +15,19 @@ recovery. Preserve its project and receipts rather than repeating a mutation wit
15
15
 
16
16
  If native `changes discard` loses its response, retry its original request ID or continue
17
17
  the same session/target. Recovery requires a completed native discard journal and matching
18
- new checkout identity/base and saved buffers, followed by independent server readback.
18
+ new checkout identity/base, which Ghidra reports unmodified.
19
19
  It does not repeat discard. An incomplete journal or mismatched checkout stays unknown;
20
20
  preserve the project and any `.keep` file.
21
21
 
22
+ A Ghidra session that ends abruptly can leave unsaved changes as Ghidra recovery data in the
23
+ working copy. Opening the program would delete them, so `ghidra open` and every native
24
+ operation refuse with `blocked` and name the two ways out. Neither needs Ghidra itself:
25
+ `ghidra changes recover-unsaved --session <id> --target <id>` has Ghidra restore those changes
26
+ and save them into the working copy; `ghidra changes discard-unsaved --session <id> --target <id>`
27
+ (Destructive) has Ghidra delete them. Saved work stays in both cases, nothing is published, and
28
+ repeating either command is safe: with nothing left it reports `absent`. Then run the refused
29
+ command again.
30
+
22
31
  First-import recovery uses the same scoped `ghidra open` or the original request ID/input.
23
32
  Import/analysis writes a private snapshot and completion receipt before any initial publication.
24
33
  If its worker is still running, continuation reports busy; wait and continue the same scope.
@@ -75,6 +84,62 @@ edits stay private. A revision change or live checkout blocks adoption. Only an
75
84
  absent path permits a separately journaled preparation under the current verified runtime,
76
85
  using the original lock and conditional creation. An unknown publication still freezes recovery.
77
86
 
87
+ ## Merge or refresh that was never sent
88
+
89
+ A cancellation (or an unusable native service) can stop a merge or refresh before its native
90
+ Update or check-in ever left the CLI. That is provable, so it is not an unknown outcome: the request
91
+ ends as failed with `reason: not_sent`, a prepared publication intent is withdrawn (stored as a
92
+ refused publication), the lane stays open and local work remains pending. The original
93
+ `--request-id` then keeps reporting that terminal refusal (`coordinator.conflict`) with its `phase`,
94
+ `cause` and memory diagnosis (a suggested next command is given only in the first response); run the
95
+ merge or refresh again with a new request ID. The same applies when the worker pool was busy, blocked or
96
+ full, the worker could not be parked or stopped, or its server could not be reached before the step
97
+ was dispatched. Any other failure while the context was reopened or saved (a lost, failed or
98
+ unusable reply, an unacknowledged save) keeps its own unresolved outcome. A cancellation after a native step was sent keeps the
99
+ unknown-outcome rules below.
100
+
101
+ A native helper can also end before its step reached the server, most often because the machine
102
+ ran out of memory (many concurrent sessions or JVMs). The helper writes its operation journal
103
+ before its Update or check-in call (it may already have read from the server), so a helper that ended without an answer (exit, timeout, cancellation or
104
+ memory exhaustion) is reported as not sent (with `memory: exhausted`, `reason: out_of_memory`, the
105
+ concrete JVM cause such as a too-small paging file in `memoryCause` and the message, and the
106
+ original error as `cause`) when that journal is absent from the journal directory the coordinator
107
+ created and identified before dispatch (a moved or replaced checkout or directory proves nothing)
108
+ and no helper or publisher service that could still write it
109
+ remains: each has proved its exit, or is a publisher service the current owner still tracks as
110
+ serving. A helper that answered keeps its own outcome (refusal, migration, binding or unknown), and
111
+ a helper whose termination could not be proved keeps the outcome unknown. These proofs assume the
112
+ profile's single owner process; process records of any other owner must show their exit.
113
+
114
+ Only the live command, which itself observed its helper end, reports a step as not sent. An outcome
115
+ already recorded as unknown (for example after the owner process itself stopped) is never settled
116
+ from an absent journal: on Windows a machine crash can lose a written journal's directory entry,
117
+ and an Update that ran can leave the checkout unchanged (no incoming change, or a conflict). It
118
+ stays unknown until its own journal, or for a check-in the request marker in the server history,
119
+ establish the result; `insight-cli ghidra open --target <target> --session <session>` reconciles it.
120
+
121
+ Every refusal of a research or lifecycle command caused by an unresolved outcome
122
+ (`coordinator.blocked`) names the reconciling
123
+ command in its message and in `next.reconcile`, lists the owning context's unresolved requests
124
+ (ID, caller request ID, operation, state) and, when another session's publication holds the lane,
125
+ that publication. If a proof is missing, the lane stays frozen as described below; once the cause
126
+ (for example low memory or a busy server) is gone, run the reconciling open again. Never repeat the
127
+ unknown operation itself. While it stays frozen the saved project and its journals are retained.
128
+ A context-local outcome leaves the target free: research continues in a new session
129
+ (`next.continueElsewhere`, `insight-cli ghidra open --target <target> --session new`). An
130
+ unresolved publication or shared model holds the whole target (`targetHeld: true`, no
131
+ `continueElsewhere`): a new session of it waits as well, other targets are unaffected. When the
132
+ reconciling open cannot prove an outcome yet, it says so and when to run it again; replay an
133
+ original request ID to see how a reconciled request ended (`sessions status` lists only requests
134
+ that are still unresolved, so keep that ID). An open that failed while setting up (before any
135
+ reconciliation) is a plain failure; its replay reports that failure without running setup again.
136
+ A request settled as not sent is terminal: run the operation again with a new request ID. A merge or refresh
137
+ recorded as unknown keeps its error code and adds the same guidance to its message and result.
138
+ Commands in guidance name the profile (`--profile <name>`); machine-readable follow-ups (`next`)
139
+ always address the context that owns the outcome, never the refused one. `ghidra abandon` applies
140
+ only to legacy detached program attempts; for a native outcome it refuses with the same
141
+ reconciliation command.
142
+
78
143
  ## Interrupted save or close
79
144
 
80
145
  After restoring profile storage, inspect the selected session and target with
@@ -117,8 +182,8 @@ their exception strings or an unchanged program snapshot. File/Python scripts re
117
182
  existing conservative recovery semantics.
118
183
 
119
184
  An unknown or partial effect retains its request intent, receipts and native project. Open the
120
- same tuple to reconcile supported outcomes. A committed merge is verified against its recorded
121
- server version and complete saved buffers through independent read authority; it is never
185
+ same tuple to reconcile supported outcomes. A committed merge is recognised by its unique request
186
+ marker at the expected version in the repository history, read with read-only authority; it is never
122
187
  checked in again merely because its response was lost. Until verification succeeds, publication
123
188
  for this shared target is blocked across sessions. Saved private work remains retained.
124
189
 
@@ -3,7 +3,7 @@ name: insight-binary
3
3
  description: Query structured PE, ELF and thin Mach-O headers, sections, imports and exports, or make an explicitly guarded new PE subsystem copy through insight-cli binary. Use for scoped binary structure, linkage and copy-only header edits without target execution.
4
4
  ---
5
5
 
6
- # Insight Binary 0.7.0
6
+ # Insight Binary 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-capture
3
3
  description: Capture one explicitly authorized native program run, exact stdout/stderr and declared file snapshots through insight-cli capture, then inspect or compare retained reports without replay. Use for controlled input/output research, preserving original files and interrupted or unknown outcomes.
4
4
  ---
5
5
 
6
- # Insight Capture 0.7.0
6
+ # Insight Capture 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-cli
3
3
  description: Choose and prepare reverse-engineering capabilities from the insight-cli toolbox for binary, managed-code and runtime investigations. Use to discover the appropriate tool or its packaged skill before installing native runtimes.
4
4
  ---
5
5
 
6
- # insight-cli 0.7.0
6
+ # insight-cli 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -15,10 +15,19 @@ recovery. Preserve its project and receipts rather than repeating a mutation wit
15
15
 
16
16
  If native `changes discard` loses its response, retry its original request ID or continue
17
17
  the same session/target. Recovery requires a completed native discard journal and matching
18
- new checkout identity/base and saved buffers, followed by independent server readback.
18
+ new checkout identity/base, which Ghidra reports unmodified.
19
19
  It does not repeat discard. An incomplete journal or mismatched checkout stays unknown;
20
20
  preserve the project and any `.keep` file.
21
21
 
22
+ A Ghidra session that ends abruptly can leave unsaved changes as Ghidra recovery data in the
23
+ working copy. Opening the program would delete them, so `ghidra open` and every native
24
+ operation refuse with `blocked` and name the two ways out. Neither needs Ghidra itself:
25
+ `ghidra changes recover-unsaved --session <id> --target <id>` has Ghidra restore those changes
26
+ and save them into the working copy; `ghidra changes discard-unsaved --session <id> --target <id>`
27
+ (Destructive) has Ghidra delete them. Saved work stays in both cases, nothing is published, and
28
+ repeating either command is safe: with nothing left it reports `absent`. Then run the refused
29
+ command again.
30
+
22
31
  First-import recovery uses the same scoped `ghidra open` or the original request ID/input.
23
32
  Import/analysis writes a private snapshot and completion receipt before any initial publication.
24
33
  If its worker is still running, continuation reports busy; wait and continue the same scope.
@@ -75,6 +84,62 @@ edits stay private. A revision change or live checkout blocks adoption. Only an
75
84
  absent path permits a separately journaled preparation under the current verified runtime,
76
85
  using the original lock and conditional creation. An unknown publication still freezes recovery.
77
86
 
87
+ ## Merge or refresh that was never sent
88
+
89
+ A cancellation (or an unusable native service) can stop a merge or refresh before its native
90
+ Update or check-in ever left the CLI. That is provable, so it is not an unknown outcome: the request
91
+ ends as failed with `reason: not_sent`, a prepared publication intent is withdrawn (stored as a
92
+ refused publication), the lane stays open and local work remains pending. The original
93
+ `--request-id` then keeps reporting that terminal refusal (`coordinator.conflict`) with its `phase`,
94
+ `cause` and memory diagnosis (a suggested next command is given only in the first response); run the
95
+ merge or refresh again with a new request ID. The same applies when the worker pool was busy, blocked or
96
+ full, the worker could not be parked or stopped, or its server could not be reached before the step
97
+ was dispatched. Any other failure while the context was reopened or saved (a lost, failed or
98
+ unusable reply, an unacknowledged save) keeps its own unresolved outcome. A cancellation after a native step was sent keeps the
99
+ unknown-outcome rules below.
100
+
101
+ A native helper can also end before its step reached the server, most often because the machine
102
+ ran out of memory (many concurrent sessions or JVMs). The helper writes its operation journal
103
+ before its Update or check-in call (it may already have read from the server), so a helper that ended without an answer (exit, timeout, cancellation or
104
+ memory exhaustion) is reported as not sent (with `memory: exhausted`, `reason: out_of_memory`, the
105
+ concrete JVM cause such as a too-small paging file in `memoryCause` and the message, and the
106
+ original error as `cause`) when that journal is absent from the journal directory the coordinator
107
+ created and identified before dispatch (a moved or replaced checkout or directory proves nothing)
108
+ and no helper or publisher service that could still write it
109
+ remains: each has proved its exit, or is a publisher service the current owner still tracks as
110
+ serving. A helper that answered keeps its own outcome (refusal, migration, binding or unknown), and
111
+ a helper whose termination could not be proved keeps the outcome unknown. These proofs assume the
112
+ profile's single owner process; process records of any other owner must show their exit.
113
+
114
+ Only the live command, which itself observed its helper end, reports a step as not sent. An outcome
115
+ already recorded as unknown (for example after the owner process itself stopped) is never settled
116
+ from an absent journal: on Windows a machine crash can lose a written journal's directory entry,
117
+ and an Update that ran can leave the checkout unchanged (no incoming change, or a conflict). It
118
+ stays unknown until its own journal, or for a check-in the request marker in the server history,
119
+ establish the result; `insight-cli ghidra open --target <target> --session <session>` reconciles it.
120
+
121
+ Every refusal of a research or lifecycle command caused by an unresolved outcome
122
+ (`coordinator.blocked`) names the reconciling
123
+ command in its message and in `next.reconcile`, lists the owning context's unresolved requests
124
+ (ID, caller request ID, operation, state) and, when another session's publication holds the lane,
125
+ that publication. If a proof is missing, the lane stays frozen as described below; once the cause
126
+ (for example low memory or a busy server) is gone, run the reconciling open again. Never repeat the
127
+ unknown operation itself. While it stays frozen the saved project and its journals are retained.
128
+ A context-local outcome leaves the target free: research continues in a new session
129
+ (`next.continueElsewhere`, `insight-cli ghidra open --target <target> --session new`). An
130
+ unresolved publication or shared model holds the whole target (`targetHeld: true`, no
131
+ `continueElsewhere`): a new session of it waits as well, other targets are unaffected. When the
132
+ reconciling open cannot prove an outcome yet, it says so and when to run it again; replay an
133
+ original request ID to see how a reconciled request ended (`sessions status` lists only requests
134
+ that are still unresolved, so keep that ID). An open that failed while setting up (before any
135
+ reconciliation) is a plain failure; its replay reports that failure without running setup again.
136
+ A request settled as not sent is terminal: run the operation again with a new request ID. A merge or refresh
137
+ recorded as unknown keeps its error code and adds the same guidance to its message and result.
138
+ Commands in guidance name the profile (`--profile <name>`); machine-readable follow-ups (`next`)
139
+ always address the context that owns the outcome, never the refused one. `ghidra abandon` applies
140
+ only to legacy detached program attempts; for a native outcome it refuses with the same
141
+ reconciliation command.
142
+
78
143
  ## Interrupted save or close
79
144
 
80
145
  After restoring profile storage, inspect the selected session and target with
@@ -117,8 +182,8 @@ their exception strings or an unchanged program snapshot. File/Python scripts re
117
182
  existing conservative recovery semantics.
118
183
 
119
184
  An unknown or partial effect retains its request intent, receipts and native project. Open the
120
- same tuple to reconcile supported outcomes. A committed merge is verified against its recorded
121
- server version and complete saved buffers through independent read authority; it is never
185
+ same tuple to reconcile supported outcomes. A committed merge is recognised by its unique request
186
+ marker at the expected version in the repository history, read with read-only authority; it is never
122
187
  checked in again merely because its response was lost. Until verification succeeds, publication
123
188
  for this shared target is blocked across sessions. Saved private work remains retained.
124
189
 
@@ -76,6 +76,10 @@ retained work. This revision conservatively protects retained profile research s
76
76
  Runtime identity covers installed Ghidra code, language/compiler data, native modules and Python
77
77
  inputs together with JDK tools, modules and configuration. Generated Python caches are isolated.
78
78
  Changing those runtime inputs requires stopping the old owner before continuing with the new build.
79
+ Headless context workers outlive their owner: a worker of the previous runtime is stopped with the
80
+ reason `runtime_changed` when its context is next used, and an unused one stops by itself after
81
+ `contextIdleMinutes` (default 15, range 1–1440). `maxContexts` (default 4, range 1–16) bounds the
82
+ workers kept at once; at that limit the longest-idle one is stopped first.
79
83
 
80
84
  Native acceptance separates macOS GUI/LLDB workflows from selected headless Windows/Linux
81
85
  SDK, Version Tracking and FID/BSim workflows. Native Windows/Linux debugger/GUI acceptance
@@ -98,7 +102,7 @@ defaults to 120 (1–3600 seconds). Configure them with `ghidra budgets set
98
102
  This uses Factory ProfileStore without invalidating research or stopping native contexts.
99
103
  Active requests retain their original budget. Generic `profile set` remains guarded for
100
104
  profiles containing research; initial profile creation also accepts these fields. Both are execution policy, independent
101
- of immutable target/load identity. Native save, Update/check-in, exact-version verification and explicit packed export use the save budget;
105
+ of immutable target/load identity. Native save, opening a saved program, Update/check-in, exact-version verification and explicit packed export use the save budget;
102
106
  discovery and ordinary HTTP queries keep their 30-second budget. Each native request has
103
107
  its own budget, not a total command deadline. Cancellation remains independent.
104
108
 
@@ -3,7 +3,7 @@ name: insight-die
3
3
  description: Classify unknown executable or container inputs by format, architecture and compiler/runtime/packer signatures with Detect It Easy before choosing managed or native analysis. Use insight-cli die for static triage and preserve scan uncertainty.
4
4
  ---
5
5
 
6
- # Insight Detect It Easy 0.7.0
6
+ # Insight Detect It Easy 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-dnspy
3
3
  description: Debug a managed Windows EXE at an IL breakpoint and read primitive arguments, or change one expected IL Int32 constant in a new assembly copy through insight-cli dnspy. Use when C# decompilation needs observed execution or a controlled binary edit.
4
4
  ---
5
5
 
6
- # Insight dnSpyEx 0.7.0
6
+ # Insight dnSpyEx 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-dotnet-dump
3
3
  description: Capture a managed heap dump or inspect compatible .NET dumps with SOS to recover waiting stacks, objects, fields and retention evidence.
4
4
  ---
5
5
 
6
- # Insight .NET Dump 0.7.0
6
+ # Insight .NET Dump 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-dotnet-stack
3
3
  description: Inspect live managed thread stacks to identify active or waiting work in an explicitly selected .NET process without taking a dump.
4
4
  ---
5
5
 
6
- # Insight .NET Stack 0.7.0
6
+ # Insight .NET Stack 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-dotnet-trace
3
3
  description: Collect and inspect bounded .NET EventPipe traces to identify sampled thread work, waits or runtime activity; distinguish wall-clock samples from CPU consumption.
4
4
  ---
5
5
 
6
- # Insight .NET Trace 0.7.0
6
+ # Insight .NET Trace 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-frida
3
3
  description: Observe native call arguments/results or inspect runtime modules and exports in an explicitly selected authorized process with bounded Frida scripts. Use insight-cli frida to corroborate static findings with actual execution on macOS ARM64.
4
4
  ---
5
5
 
6
- # Insight Frida 0.7.0
6
+ # Insight Frida 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-ghidra
3
3
  description: Inspect or edit native binaries with Ghidra through insight-cli; use isolated contexts, multi-agent merge/refresh, server, GUI or debugger workflows. Choose this for static native behavior and references, not C# recovery from managed IL.
4
4
  ---
5
5
 
6
- # Insight Ghidra 0.7.0
6
+ # Insight Ghidra 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -15,10 +15,19 @@ recovery. Preserve its project and receipts rather than repeating a mutation wit
15
15
 
16
16
  If native `changes discard` loses its response, retry its original request ID or continue
17
17
  the same session/target. Recovery requires a completed native discard journal and matching
18
- new checkout identity/base and saved buffers, followed by independent server readback.
18
+ new checkout identity/base, which Ghidra reports unmodified.
19
19
  It does not repeat discard. An incomplete journal or mismatched checkout stays unknown;
20
20
  preserve the project and any `.keep` file.
21
21
 
22
+ A Ghidra session that ends abruptly can leave unsaved changes as Ghidra recovery data in the
23
+ working copy. Opening the program would delete them, so `ghidra open` and every native
24
+ operation refuse with `blocked` and name the two ways out. Neither needs Ghidra itself:
25
+ `ghidra changes recover-unsaved --session <id> --target <id>` has Ghidra restore those changes
26
+ and save them into the working copy; `ghidra changes discard-unsaved --session <id> --target <id>`
27
+ (Destructive) has Ghidra delete them. Saved work stays in both cases, nothing is published, and
28
+ repeating either command is safe: with nothing left it reports `absent`. Then run the refused
29
+ command again.
30
+
22
31
  First-import recovery uses the same scoped `ghidra open` or the original request ID/input.
23
32
  Import/analysis writes a private snapshot and completion receipt before any initial publication.
24
33
  If its worker is still running, continuation reports busy; wait and continue the same scope.
@@ -75,6 +84,62 @@ edits stay private. A revision change or live checkout blocks adoption. Only an
75
84
  absent path permits a separately journaled preparation under the current verified runtime,
76
85
  using the original lock and conditional creation. An unknown publication still freezes recovery.
77
86
 
87
+ ## Merge or refresh that was never sent
88
+
89
+ A cancellation (or an unusable native service) can stop a merge or refresh before its native
90
+ Update or check-in ever left the CLI. That is provable, so it is not an unknown outcome: the request
91
+ ends as failed with `reason: not_sent`, a prepared publication intent is withdrawn (stored as a
92
+ refused publication), the lane stays open and local work remains pending. The original
93
+ `--request-id` then keeps reporting that terminal refusal (`coordinator.conflict`) with its `phase`,
94
+ `cause` and memory diagnosis (a suggested next command is given only in the first response); run the
95
+ merge or refresh again with a new request ID. The same applies when the worker pool was busy, blocked or
96
+ full, the worker could not be parked or stopped, or its server could not be reached before the step
97
+ was dispatched. Any other failure while the context was reopened or saved (a lost, failed or
98
+ unusable reply, an unacknowledged save) keeps its own unresolved outcome. A cancellation after a native step was sent keeps the
99
+ unknown-outcome rules below.
100
+
101
+ A native helper can also end before its step reached the server, most often because the machine
102
+ ran out of memory (many concurrent sessions or JVMs). The helper writes its operation journal
103
+ before its Update or check-in call (it may already have read from the server), so a helper that ended without an answer (exit, timeout, cancellation or
104
+ memory exhaustion) is reported as not sent (with `memory: exhausted`, `reason: out_of_memory`, the
105
+ concrete JVM cause such as a too-small paging file in `memoryCause` and the message, and the
106
+ original error as `cause`) when that journal is absent from the journal directory the coordinator
107
+ created and identified before dispatch (a moved or replaced checkout or directory proves nothing)
108
+ and no helper or publisher service that could still write it
109
+ remains: each has proved its exit, or is a publisher service the current owner still tracks as
110
+ serving. A helper that answered keeps its own outcome (refusal, migration, binding or unknown), and
111
+ a helper whose termination could not be proved keeps the outcome unknown. These proofs assume the
112
+ profile's single owner process; process records of any other owner must show their exit.
113
+
114
+ Only the live command, which itself observed its helper end, reports a step as not sent. An outcome
115
+ already recorded as unknown (for example after the owner process itself stopped) is never settled
116
+ from an absent journal: on Windows a machine crash can lose a written journal's directory entry,
117
+ and an Update that ran can leave the checkout unchanged (no incoming change, or a conflict). It
118
+ stays unknown until its own journal, or for a check-in the request marker in the server history,
119
+ establish the result; `insight-cli ghidra open --target <target> --session <session>` reconciles it.
120
+
121
+ Every refusal of a research or lifecycle command caused by an unresolved outcome
122
+ (`coordinator.blocked`) names the reconciling
123
+ command in its message and in `next.reconcile`, lists the owning context's unresolved requests
124
+ (ID, caller request ID, operation, state) and, when another session's publication holds the lane,
125
+ that publication. If a proof is missing, the lane stays frozen as described below; once the cause
126
+ (for example low memory or a busy server) is gone, run the reconciling open again. Never repeat the
127
+ unknown operation itself. While it stays frozen the saved project and its journals are retained.
128
+ A context-local outcome leaves the target free: research continues in a new session
129
+ (`next.continueElsewhere`, `insight-cli ghidra open --target <target> --session new`). An
130
+ unresolved publication or shared model holds the whole target (`targetHeld: true`, no
131
+ `continueElsewhere`): a new session of it waits as well, other targets are unaffected. When the
132
+ reconciling open cannot prove an outcome yet, it says so and when to run it again; replay an
133
+ original request ID to see how a reconciled request ended (`sessions status` lists only requests
134
+ that are still unresolved, so keep that ID). An open that failed while setting up (before any
135
+ reconciliation) is a plain failure; its replay reports that failure without running setup again.
136
+ A request settled as not sent is terminal: run the operation again with a new request ID. A merge or refresh
137
+ recorded as unknown keeps its error code and adds the same guidance to its message and result.
138
+ Commands in guidance name the profile (`--profile <name>`); machine-readable follow-ups (`next`)
139
+ always address the context that owns the outcome, never the refused one. `ghidra abandon` applies
140
+ only to legacy detached program attempts; for a native outcome it refuses with the same
141
+ reconciliation command.
142
+
78
143
  ## Interrupted save or close
79
144
 
80
145
  After restoring profile storage, inspect the selected session and target with
@@ -117,8 +182,8 @@ their exception strings or an unchanged program snapshot. File/Python scripts re
117
182
  existing conservative recovery semantics.
118
183
 
119
184
  An unknown or partial effect retains its request intent, receipts and native project. Open the
120
- same tuple to reconcile supported outcomes. A committed merge is verified against its recorded
121
- server version and complete saved buffers through independent read authority; it is never
185
+ same tuple to reconcile supported outcomes. A committed merge is recognised by its unique request
186
+ marker at the expected version in the repository history, read with read-only authority; it is never
122
187
  checked in again merely because its response was lost. Until verification succeeds, publication
123
188
  for this shared target is blocked across sessions. Saved private work remains retained.
124
189
 
@@ -11,6 +11,8 @@ repeating the same request ID retrieves those outcomes without another pass.
11
11
  For native contexts it retains Ghidra's `.keep` when work is dirty, releases the old checkout
12
12
  and checks out the current server version in the same project. It does not publish. Close a
13
13
  live debugger first. Legacy detached contexts require explicit migration and are retained.
14
+ `ghidra changes recover-unsaved` and `ghidra changes discard-unsaved` settle unsaved changes
15
+ that an interrupted Ghidra session left in the working copy; see [recovery](recovery.md).
14
16
 
15
17
  Open input with `insight-cli ghidra open ./client.exe --session new --json`. Store the returned
16
18
  `session` and `target` as the explicit scope for every later research call. Names are display
@@ -47,8 +49,15 @@ original working copy/base. Status reports the native conflict description. The
47
49
  Types, signatures, structures and other analysis edits use Ghidra's stock resolvers and native
48
50
  checkout change sets. Divergence alone is not a category conflict. `ghidra merge` performs native
49
51
  Update, then journaled check-in. Independent read-only history/exact-version buffer verification
50
- precedes release/drop of the successful native project. Continued work receives a fresh checkout;
51
- worker/owner restart before publication reopens the same project without packed-snapshot import.
52
+ precedes any further step. By default the context then stays open: check-in keeps the checkout, and
53
+ the context continues in it at the published version, so an agent can merge repeatedly during one
54
+ long session without reopening. Backups that Update left and its journals prove disposable are
55
+ removed. `ghidra merge --close` (or a kept checkout that cannot be proved unchanged) releases and
56
+ drops the project instead; continued work then receives a fresh checkout. During Update/check-in the
57
+ warm worker only closes its project and reopens it afterwards at the new base, so the next command
58
+ needs no new JVM (a worker that ran agent scripts, or whose project cannot be proved released or
59
+ reopened, restarts as before); worker/owner restart before publication reopens the same project without packed-snapshot
60
+ import.
52
61
 
53
62
  Ordinary saves retain the native DB and lightweight saved-view receipts. Full packed exports are
54
63
  for initial import and explicit consumers such as export, cross-program comparison and VT.
@@ -208,10 +217,35 @@ and cache refresh; executable bytes without an entry use bounded decode, undefin
208
217
  byte search and explicit continuation. The diagnostic does
209
218
  not run analyzers, define data, repair boundaries, save a snapshot or certify semantic completeness.
210
219
 
220
+ `diagnostics timings [--command "ghidra open"] [--limit N]` summarizes the most recent retained
221
+ attempts of the selected context per phase: `facade.queue` (context and target-lane waits),
222
+ `native.call`/`native.helper` (each helper JVM), `worker.launch`/`worker.stop`, `tool.launch` minus
223
+ `tool.locked` (wait for the profile-wide launch lock) and `tool.identity`. Nested phases overlap
224
+ their parents; `unattributedMs` is root time not covered by a direct child. It neither starts nor
225
+ probes Ghidra.
226
+
227
+ Checkout, Update/check-in, release and exact-version reads run in warm native services of the
228
+ CLI owner instead of one JVM per operation; the first native call after an owner start pays one
229
+ service start. `ghidra diagnostics timings` shows them as `native.service`/`native.service.start`.
230
+ Each CLI invocation also starts a client and connects to the owner (seconds); an agent issuing many
231
+ commands should keep one `--json-rpc` session and send `cli.execute` requests through it
232
+ ([persistent research calls](persistent.md)).
233
+ Closing a context whose worker already stopped does not relaunch it.
234
+
235
+ An opened headless context worker stays warm across commands and outlives the CLI owner process.
236
+ Each command holds the worker while it runs, so a held worker never stops. Without a command it
237
+ stops by itself after `contextIdleMinutes` (profile setting, default 15, range 1–1440), counted from
238
+ the end of the last command that used it. Acknowledged work is already saved, so the next command
239
+ reopens the context transparently. When `maxContexts` is reached, opening another context stops
240
+ the worker idle for longest instead of failing; a worker built for a previous runtime is stopped
241
+ when its context or a new owner meets it. Lifecycle records these as `idle_timeout`,
242
+ `capacity_evicted` and `runtime_changed`. Use `ghidra close` to stop a worker immediately. GUI
243
+ workers and workers started by older builds do not cool down and still stop with their owner.
244
+
211
245
  `diagnostics lifecycle` reads retained start/restore/stop events and the current process receipt
212
246
  without starting or probing Ghidra. At most the latest 128 observations are retained. A stopped
213
- receipt can identify `explicit_close`, `view_replaced`, `mode_changed`, `startup_failed` or
214
- `owner_dispose`; historical receipts without reasons remain `unknown`. Owner disposal does not
247
+ receipt can identify `explicit_close`, `view_replaced`, `mode_changed`, `startup_failed`,
248
+ `owner_dispose`, `idle_timeout`, `capacity_evicted` or `runtime_changed`; historical receipts without reasons remain `unknown`. Owner disposal does not
215
249
  establish whether Factory exited due to idle, explicit stop, a signal or another cause. A current
216
250
  receipt without a matching stop receipt reports `unobserved`, not a claim that the PID is live.
217
251
 
@@ -76,6 +76,10 @@ retained work. This revision conservatively protects retained profile research s
76
76
  Runtime identity covers installed Ghidra code, language/compiler data, native modules and Python
77
77
  inputs together with JDK tools, modules and configuration. Generated Python caches are isolated.
78
78
  Changing those runtime inputs requires stopping the old owner before continuing with the new build.
79
+ Headless context workers outlive their owner: a worker of the previous runtime is stopped with the
80
+ reason `runtime_changed` when its context is next used, and an unused one stops by itself after
81
+ `contextIdleMinutes` (default 15, range 1–1440). `maxContexts` (default 4, range 1–16) bounds the
82
+ workers kept at once; at that limit the longest-idle one is stopped first.
79
83
 
80
84
  Native acceptance separates macOS GUI/LLDB workflows from selected headless Windows/Linux
81
85
  SDK, Version Tracking and FID/BSim workflows. Native Windows/Linux debugger/GUI acceptance
@@ -98,7 +102,7 @@ defaults to 120 (1–3600 seconds). Configure them with `ghidra budgets set
98
102
  This uses Factory ProfileStore without invalidating research or stopping native contexts.
99
103
  Active requests retain their original budget. Generic `profile set` remains guarded for
100
104
  profiles containing research; initial profile creation also accepts these fields. Both are execution policy, independent
101
- of immutable target/load identity. Native save, Update/check-in, exact-version verification and explicit packed export use the save budget;
105
+ of immutable target/load identity. Native save, opening a saved program, Update/check-in, exact-version verification and explicit packed export use the save budget;
102
106
  discovery and ordinary HTTP queries keep their 30-second budget. Each native request has
103
107
  its own budget, not a total command deadline. Cancellation remains independent.
104
108
 
@@ -3,7 +3,7 @@ name: insight-ilspy
3
3
  description: Recover C#, inspect IL/types/metadata, extract resources or export projects from managed .NET assemblies through insight-cli ILSpy. Choose native analysis for NativeAOT or ordinary PE machine code.
4
4
  ---
5
5
 
6
- # Insight ILSpy 0.7.0
6
+ # Insight ILSpy 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-interop
3
3
  description: Trace a .NET P/Invoke declaration to an explicitly supplied native library export and Ghidra function through insight-cli ilspy query, binary query and scoped ghidra APIs. Use for managed/native linkage evidence while keeping static correspondence separate from observed loading or execution.
4
4
  ---
5
5
 
6
- # Insight Interop 0.7.0
6
+ # Insight Interop 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-lldb
3
3
  description: Observe native runtime arguments, return values, registers, stacks and bounded memory at a selected breakpoint using an owned LLDB launch. Use insight-cli lldb on macOS ARM64 when static findings need a concrete execution check.
4
4
  ---
5
5
 
6
- # Insight LLDB 0.7.0
6
+ # Insight LLDB 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-llvm
3
3
  description: Inspect PE, ELF and Mach-O headers, dependencies, exports and symbols; query PDB debug information or a small instruction window with insight-cli LLVM utilities before opening a full analysis project.
4
4
  ---
5
5
 
6
- # Insight LLVM 0.7.0
6
+ # Insight LLVM 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-managed-heap
3
3
  description: Query structured .NET heap objects, primitive fields and managed stacks from a retained CoreCLR dump through insight-cli dotnet-dump query. Use for bounded offline dump investigation with an explicit matching DAC, preserving uncertainty and immutable input identity.
4
4
  ---
5
5
 
6
- # Insight Managed Heap 0.7.0
6
+ # Insight Managed Heap 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-managed-metadata
3
3
  description: Query managed assembly metadata, MethodDef tokens, P/Invoke declarations and bounded IL, or compare two C#/.NET assemblies through insight-cli ilspy query/compare. Use for structured static evidence and changed-method research without executing the target.
4
4
  ---
5
5
 
6
- # Insight Managed Metadata 0.7.0
6
+ # Insight Managed Metadata 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-mitmproxy
3
3
  description: Record, inspect and compare HTTP request/response evidence with insight-cli mitmproxy. Use when an owned client can explicitly use a loopback proxy; read native flow archives or HAR without replaying traffic. System interception and global certificate trust are outside this facade.
4
4
  ---
5
5
 
6
- # Insight mitmproxy 0.7.0
6
+ # Insight mitmproxy 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-overview
3
3
  description: Choose bounded tool overviews and focused drilldown through insight-cli without flooding agent context with whole-program code, traces or dumps. Use for tool discovery, scoped evidence paging and keeping native partial coverage separate from complete results.
4
4
  ---
5
5
 
6
- # Insight Overview 0.7.0
6
+ # Insight Overview 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-procmon
3
3
  description: Observe actual file and registry access by an authorized running Windows process through insight-cli procmon. Use when static paths or configuration guesses need runtime evidence; inspect retained captures without collecting again.
4
4
  ---
5
5
 
6
- # Insight ProcMon 0.7.0
6
+ # Insight ProcMon 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized
@@ -3,7 +3,7 @@ name: insight-re
3
3
  description: Investigate shipped programs and binary artifacts with insight-cli and other available tools; retain ordinary research files, coordinate independent agents and publish Ghidra annotations. Use for reverse engineering behavior, not ordinary source-repository browsing.
4
4
  ---
5
5
 
6
- # Insight RE 0.7.0
6
+ # Insight RE 0.8.0
7
7
 
8
8
  If local help/status reports AppData or IPC access denied, retry that **read-only probe**
9
9
  with the agent host's normal permission escalation, then use that route for later authorized