@eyeauras/insight-cli 0.6.3 → 0.6.6

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 (103) hide show
  1. package/.cli-package-build.json +1 -1
  2. package/SKILL.md +9 -7
  3. package/dist/src/cli.js +1 -1
  4. package/dist/src/contexts.d.ts +32 -8
  5. package/dist/src/contexts.js +532 -92
  6. package/dist/src/cross-peer.d.ts +20 -0
  7. package/dist/src/cross-peer.js +53 -0
  8. package/dist/src/debugger-results.d.ts +2 -1
  9. package/dist/src/debugger-results.js +9 -4
  10. package/dist/src/debugger.js +3 -2
  11. package/dist/src/lifecycle.d.ts +2 -0
  12. package/dist/src/lifecycle.js +49 -2
  13. package/dist/src/native-merge-patches.js +20 -2
  14. package/dist/src/research.d.ts +14 -2
  15. package/dist/src/research.js +31 -4
  16. package/dist/src/storage-gc.js +244 -44
  17. package/dist/src/tool-runtime/run.js +24 -11
  18. package/dist/src/tool-runtime/supervisor.js +51 -9
  19. package/dist/src/workspace.d.ts +47 -1
  20. package/dist/src/workspace.js +128 -13
  21. package/package.json +1 -1
  22. package/references/agent-setup.md +11 -3
  23. package/references/debugger.md +5 -3
  24. package/references/extensions-and-sync.md +7 -6
  25. package/references/managed-runtime.md +4 -3
  26. package/references/native/InsightNativeCheckout.java +203 -16
  27. package/references/native/NATIVE-MERGE-NOTICE.txt +5 -1
  28. package/references/native-workflows.md +5 -3
  29. package/references/query-semantics.md +3 -2
  30. package/references/recovery.md +6 -0
  31. package/references/setup.md +9 -2
  32. package/skill-bundle/insight-artifacts/SKILL.md +1 -1
  33. package/skill-bundle/insight-artifacts/references/recovery.md +6 -0
  34. package/skill-bundle/insight-binary/SKILL.md +1 -1
  35. package/skill-bundle/insight-capture/SKILL.md +1 -1
  36. package/skill-bundle/insight-cli/SKILL.md +9 -7
  37. package/skill-bundle/insight-cli/references/agent-setup.md +11 -3
  38. package/skill-bundle/insight-cli/references/managed-runtime.md +4 -3
  39. package/skill-bundle/insight-cli/references/recovery.md +6 -0
  40. package/skill-bundle/insight-cli/references/setup.md +9 -2
  41. package/skill-bundle/insight-die/SKILL.md +1 -1
  42. package/skill-bundle/insight-dnspy/SKILL.md +1 -1
  43. package/skill-bundle/insight-dotnet-dump/SKILL.md +1 -1
  44. package/skill-bundle/insight-dotnet-stack/SKILL.md +1 -1
  45. package/skill-bundle/insight-dotnet-trace/SKILL.md +1 -1
  46. package/skill-bundle/insight-frida/SKILL.md +1 -1
  47. package/skill-bundle/insight-ghidra/SKILL.md +4 -3
  48. package/skill-bundle/insight-ghidra/references/debugger.md +5 -3
  49. package/skill-bundle/insight-ghidra/references/extensions-and-sync.md +7 -6
  50. package/skill-bundle/insight-ghidra/references/managed-runtime.md +4 -3
  51. package/skill-bundle/insight-ghidra/references/native-workflows.md +5 -3
  52. package/skill-bundle/insight-ghidra/references/query-semantics.md +3 -2
  53. package/skill-bundle/insight-ghidra/references/recovery.md +6 -0
  54. package/skill-bundle/insight-ghidra/references/setup.md +9 -2
  55. package/skill-bundle/insight-ilspy/SKILL.md +1 -1
  56. package/skill-bundle/insight-interop/SKILL.md +1 -1
  57. package/skill-bundle/insight-lldb/SKILL.md +1 -1
  58. package/skill-bundle/insight-llvm/SKILL.md +1 -1
  59. package/skill-bundle/insight-managed-heap/SKILL.md +1 -1
  60. package/skill-bundle/insight-managed-metadata/SKILL.md +1 -1
  61. package/skill-bundle/insight-mitmproxy/SKILL.md +1 -1
  62. package/skill-bundle/insight-overview/SKILL.md +1 -1
  63. package/skill-bundle/insight-procmon/SKILL.md +1 -1
  64. package/skill-bundle/insight-re/SKILL.md +1 -1
  65. package/skill-bundle/insight-re/references/recovery.md +6 -0
  66. package/skill-bundle/insight-sevenzip/SKILL.md +1 -1
  67. package/skill-bundle/insight-strace/SKILL.md +1 -1
  68. package/skill-bundle/insight-tshark/SKILL.md +1 -1
  69. package/skill-bundle/insight-windbg/SKILL.md +1 -1
  70. package/skill-bundle/manifest.json +1 -1
  71. package/skills/insight-artifacts/SKILL.md +1 -1
  72. package/skills/insight-artifacts/references/recovery.md +6 -0
  73. package/skills/insight-binary/SKILL.md +1 -1
  74. package/skills/insight-capture/SKILL.md +1 -1
  75. package/skills/insight-die/SKILL.md +1 -1
  76. package/skills/insight-dnspy/SKILL.md +1 -1
  77. package/skills/insight-dotnet-dump/SKILL.md +1 -1
  78. package/skills/insight-dotnet-stack/SKILL.md +1 -1
  79. package/skills/insight-dotnet-trace/SKILL.md +1 -1
  80. package/skills/insight-frida/SKILL.md +1 -1
  81. package/skills/insight-ghidra/SKILL.md +4 -3
  82. package/skills/insight-ghidra/references/debugger.md +5 -3
  83. package/skills/insight-ghidra/references/extensions-and-sync.md +7 -6
  84. package/skills/insight-ghidra/references/managed-runtime.md +4 -3
  85. package/skills/insight-ghidra/references/native-workflows.md +5 -3
  86. package/skills/insight-ghidra/references/query-semantics.md +3 -2
  87. package/skills/insight-ghidra/references/recovery.md +6 -0
  88. package/skills/insight-ghidra/references/setup.md +9 -2
  89. package/skills/insight-ilspy/SKILL.md +1 -1
  90. package/skills/insight-interop/SKILL.md +1 -1
  91. package/skills/insight-lldb/SKILL.md +1 -1
  92. package/skills/insight-llvm/SKILL.md +1 -1
  93. package/skills/insight-managed-heap/SKILL.md +1 -1
  94. package/skills/insight-managed-metadata/SKILL.md +1 -1
  95. package/skills/insight-mitmproxy/SKILL.md +1 -1
  96. package/skills/insight-overview/SKILL.md +1 -1
  97. package/skills/insight-procmon/SKILL.md +1 -1
  98. package/skills/insight-re/SKILL.md +1 -1
  99. package/skills/insight-re/references/recovery.md +6 -0
  100. package/skills/insight-sevenzip/SKILL.md +1 -1
  101. package/skills/insight-strace/SKILL.md +1 -1
  102. package/skills/insight-tshark/SKILL.md +1 -1
  103. package/skills/insight-windbg/SKILL.md +1 -1
@@ -1 +1 @@
1
- {"version":1,"artifact":"f4db353a202c2b3c6aacef612601b76a5fb0dff4ec7150e1c8b99f540d365661"}
1
+ {"version":1,"artifact":"5fcae8379d1baebd8bf0d30786436fe17adc8d137b5ff1dbed90ea98c7ec130d"}
package/SKILL.md CHANGED
@@ -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.6.3
6
+ # insight-cli 0.6.6
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
@@ -23,10 +23,12 @@ in the agent's long-lived runtime. Reuse it across calls to avoid repeated front
23
23
  runtime is not needed to discover what a tool does.
24
24
  2. Use `insight-cli tools show <tool> --json` for tasks, supported inputs/platforms,
25
25
  dependencies and its skill path. Read that skill before preparing or using the tool.
26
- 3. Select a profile for execution. Run the selected application's `status` and generated
27
- `--help`. `install` prepares its private runtime; archives/offline and external paths
28
- are tool-specific and described in its skill. Update permission is required for tool
29
- preparation/execution and saved changes: `insight-cli permissions grant Update`.
26
+ 3. Select a profile for execution and read the selected capability's generated `--help`.
27
+ If `tools show` reports `runtime.statusCommand`, run that advertised readiness probe.
28
+ Follow its skill for any `install`, archives/offline or external-path setup. Capabilities
29
+ with `runtime.required: false` follow their own skill without separate runtime preparation.
30
+ Update permission is required for tool preparation/execution and saved changes:
31
+ `insight-cli permissions grant Update`.
30
32
  4. Answer the question with focused queries and ordinary project files. Follow results to
31
33
  useful detail; a large raw dump is not an interpretation. External tools remain welcome.
32
34
  5. Preserve completed files with `insight-cli artifacts save <path> --json` when a retained
@@ -48,6 +50,6 @@ Reuse existing session/target selectors before opening another copy. Read [setup
48
50
  for explicit later analysis and passive first-open progress (`ghidra progress`).
49
51
 
50
52
  Use generated help as the syntax authority. Catalog metadata describes shipped capabilities;
51
- profile runtime readiness comes from the selected tool's `status`. Unavailable profile/IPC
52
- access means execution readiness is unknown. Preserve work and diagnose access before trying
53
+ profile runtime readiness comes from its advertised `runtime.statusCommand`, when present.
54
+ Unavailable profile/IPC access means execution readiness is unknown. Preserve work and diagnose access before trying
53
55
  again; stopping a shared owner does not grant a denied agent access to it.
package/dist/src/cli.js CHANGED
@@ -462,7 +462,7 @@ export function createDefinition(options = {}) {
462
462
  }, { permission: Permission.Update, options: [{ flags: '--initial-import-seconds <seconds>', description: 'Initial import/analysis: 1–86400 seconds' },
463
463
  { flags: '--save-seconds <seconds>', description: 'Native save/export: 1–3600 seconds' }] })
464
464
  ]),
465
- command('abandon', 'Retain an uncertain program attempt and resume its previous saved view', ({ options: o }, c) => owner.selected(c).research.abandon(scope(o), id(o.requestId), Boolean(o.acknowledgeUnknownEffects)), { permission: 'Destructive', options: [...scoped, { flags: '--request-id <id>', description: 'Original unresolved request ID from sessions status', required: true }, { flags: '--acknowledge-unknown-effects', description: 'Acknowledge that the abandoned effect remains unknown; no script is replayed' }] }),
465
+ command('abandon', 'Retain an uncertain legacy detached program attempt and resume its previous saved view', ({ options: o }, c) => owner.selected(c).research.abandon(scope(o), id(o.requestId), Boolean(o.acknowledgeUnknownEffects)), { permission: 'Destructive', options: [...scoped, { flags: '--request-id <id>', description: 'Original unresolved request ID from sessions status', required: true }, { flags: '--acknowledge-unknown-effects', description: 'Acknowledge that the abandoned effect remains unknown; no script is replayed' }] }),
466
466
  command('refresh', 'Receive safe shared changes while retaining local conflicts', ({ options: o }, c) => owner.selected(c).research.refresh(scope(o), o.requestId === undefined ? undefined : id(o.requestId)), { permission: Permission.Update, options: [...scoped, request] }),
467
467
  command('merge', 'Publish the complete selected context or retain every conflict', ({ options: o }, c) => owner.selected(c).research.merge(scope(o), o.requestId === undefined ? undefined : id(o.requestId)), { permission: Permission.Update, options: [...scoped, request] }),
468
468
  command('open [input]', 'Start independent work or continue a context', async ({ args, options: o }, c) => {
@@ -86,6 +86,14 @@ export declare class GhidraContexts {
86
86
  private initialModel;
87
87
  private model;
88
88
  private privateCopy;
89
+ private pristineNative;
90
+ /** A completed discard replaces its checkout inside the same root, retaining its process and backup receipts. */
91
+ private discardedPristine;
92
+ /**
93
+ * Opening a checkout lets Ghidra rewrite its saved buffers before any caller runs. A proved pristine initial or
94
+ * replacement checkout captures those bytes as its new receipt and a no-work state of that shared version.
95
+ */
96
+ private recordOpened;
89
97
  private createNative;
90
98
  updateNative(scope: Scope, request: string): Promise<{
91
99
  state: "conflict";
@@ -137,14 +145,19 @@ export declare class GhidraContexts {
137
145
  applied?: undefined;
138
146
  conflict?: undefined;
139
147
  }>;
140
- dropNative(scope: Scope): Promise<void>;
141
- finishEmptyNative(scope: Scope): Promise<void>;
148
+ dropNative(scope: Scope, request?: string): Promise<void>;
149
+ /** A lost release reply can mean undoCheckout succeeded. Only independent ownership readback permits reopening. */
150
+ private retainNative;
151
+ finishEmptyNative(scope: Scope, request?: string): Promise<void>;
142
152
  /** Close and GC drop a working copy only when Ghidra itself reports no private change. */
143
153
  releaseUnchanged(scope: Scope): Promise<boolean>;
144
- /** A missing current receipt means no worker was ever started; any other missing receipt is unproved. */
154
+ /** Absence of the ready receipt alone says nothing about an interrupted first start. */
145
155
  private neverStartedOrClosed;
146
156
  /** A pending checkout intent may own a server checkout, so it is never treated as detached work. */
147
157
  detachedStopped(scope: Scope): Promise<boolean>;
158
+ /** Absence is proved by the owned storage that remains: nothing of the context may survive beside the lost root. */
159
+ missingCheckout(scope: Scope): Promise<NativeCheckout>;
160
+ abandonMissing(scope: Scope, check: boolean): Promise<void>;
148
161
  collect(dryRun: boolean): Promise<{
149
162
  retained: {
150
163
  path: string;
@@ -175,6 +188,7 @@ export declare class GhidraContexts {
175
188
  retainedKeepFile: string;
176
189
  state: "verified";
177
190
  }>;
191
+ private nativeKeepName;
178
192
  private applyNativeDiscard;
179
193
  open(scope: Scope, request?: string): Promise<GhidraContext>;
180
194
  private retireUnresponsive;
@@ -200,6 +214,7 @@ export declare class GhidraContexts {
200
214
  snapshotFile(snapshot: Artifact): Promise<string>;
201
215
  private removePeer;
202
216
  private reconcilePeers;
217
+ private completePeer;
203
218
  private withPeer;
204
219
  pair(selected: Scope, other: Scope, snapshot: Artifact, operation: string, parameters: Record<string, unknown>): Promise<unknown>;
205
220
  transfer(selected: Scope, source: Artifact, dryRun: boolean): Promise<unknown>;
@@ -218,13 +233,15 @@ export declare class GhidraContexts {
218
233
  debuggerSelect(scope: Scope, trace: string): Promise<void>;
219
234
  debuggerLaunch(scope: Scope, p: Record<string, unknown>, request: string): Promise<unknown>;
220
235
  projectOutcome(requestId: string, expected: Record<string, unknown>): Promise<Record<string, unknown> | undefined>;
236
+ debuggerMetadata(snapshot: Artifact): Promise<string>;
221
237
  private debuggerMetadataChanges;
222
238
  close(scope: Scope): Promise<void>;
223
- /**
224
- * The worker that last used a context root. A start records process.json first and current.json only once its
225
- * program is open, so a failed start leaves an older current receipt. It is superseded only by a receipt of the
226
- * same context and root, and only after the older worker is proved gone.
227
- */
239
+ private workerEnded;
240
+ private retainStartedWorker;
241
+ private workerShape;
242
+ private workerReceipt;
243
+ /** Discover interrupted starts independently of the ready pointer. Every other retained root must
244
+ * be verifiably ended; no live or ambiguous start is adopted or overwritten by a replacement. */
228
245
  private lastWorker;
229
246
  closed(scope: Scope): Promise<boolean>;
230
247
  latest(targetId: string): Promise<{
@@ -243,9 +260,16 @@ export declare class GhidraContexts {
243
260
  state: 'verified';
244
261
  revision: number;
245
262
  snapshot: Artifact;
263
+ } | {
264
+ state: 'refused';
265
+ revision: number;
266
+ snapshot: Artifact;
267
+ conflict: string;
246
268
  } | {
247
269
  state: 'unknown';
248
270
  }>;
271
+ /** Only the completed head-race branch before checkin() has this journal shape. */
272
+ private recoverNativeRefusal;
249
273
  recoverModel(targetId: string): Promise<boolean>;
250
274
  dispose(): Promise<void>;
251
275
  private inventory;