@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
@@ -57,13 +57,131 @@ public final class InsightNativeCheckout {
57
57
  /** Every file with local bytes, at any depth; unmodified server items have none. */
58
58
  static void local(DomainFolder folder,Set<String> names){
59
59
  for(DomainFile f:folder.getFiles())if(!f.isVersioned()||f.isCheckedOut()||f.isHijacked()||f.canRecover())names.add(f.getPathname().substring(1));
60
- for(DomainFolder child:folder.getFolders())if(!child.isLinked())local(child,names);
60
+ for(DomainFolder child:folder.getFolders())if(child.isLinked())names.add(child.getPathname().substring(1)+"/");else local(child,names);
61
+ }
62
+ static String authorized(JsonObject q){return text(q,q.has("opened")?"opened":"fingerprint");}
63
+ static boolean sameRelease(JsonObject receipt,JsonObject q){
64
+ if(!Objects.equals(receipt.get("checkoutId"),q.get("checkoutId"))||!Objects.equals(receipt.get("fingerprint"),q.get("fingerprint"))||
65
+ !Objects.equals(receipt.get("version"),q.get("verifiedVersion")))return false;
66
+ // Completed older receipts already ended the checkout. Preserve their deletion-only recovery.
67
+ if(!receipt.has("savedFingerprint")&&!receipt.has("fileId"))return true;
68
+ return Objects.equals(receipt.get("fileId"),q.get("fileId"))&&Objects.equals(receipt.get("savedFingerprint"),new JsonPrimitive(authorized(q)));
69
+ }
70
+ /** A new intent can prove the local file left between server termination and native undo's local deletion. */
71
+ static boolean survivingRelease(JsonObject receipt,JsonObject q,Map<String,Object> saved){
72
+ return receipt.has("fileId")&&receipt.has("savedFingerprint")&&Objects.equals(receipt.get("state"),new JsonPrimitive("release_intent"))&&sameRelease(receipt,q)&&
73
+ Objects.equals(saved.get("fileId"),text(receipt,"fileId"))&&Objects.equals(saved.get("fingerprint"),text(receipt,"savedFingerprint"));
74
+ }
75
+ static boolean backupName(String program,String name){
76
+ String keep=program+".keep";
77
+ return name.equals(keep)||name.startsWith(keep+".")&&name.substring(keep.length()+1).matches("[1-9][0-9]*");
78
+ }
79
+ /** Include occupied server names too: undoCheckout chooses a name absent from both filesystems. */
80
+ static Map<String,String> backupInventory(Project project,String program){
81
+ Map<String,String> files=new TreeMap<>();
82
+ for(DomainFile file:project.getProjectData().getRootFolder().getFiles())if(backupName(program,file.getName()))files.put(file.getName(),file.getFileID());
83
+ return files;
84
+ }
85
+ static String createdBackup(String program,JsonObject before,JsonObject after){
86
+ require(before!=null&&after!=null,"Native backup creation inventory is missing");
87
+ for(var entry:before.entrySet())require(backupName(program,entry.getKey())&&entry.getValue().equals(after.get(entry.getKey())),"Pre-existing native backup identity changed");
88
+ var added=new TreeSet<>(after.keySet());added.removeAll(before.keySet());
89
+ require(added.size()==1&&backupName(program,added.first()),"Native backup creation is ambiguous");
90
+ JsonElement id=after.get(added.first());require(id!=null&&id.isJsonPrimitive()&&id.getAsJsonPrimitive().isString()&&!id.getAsString().isEmpty(),"Native backup identity is missing");
91
+ return added.first();
92
+ }
93
+ static boolean backupMatches(JsonObject journal,String name,Map<String,Object> saved){try{
94
+ JsonObject files=journal.getAsJsonObject("result").getAsJsonObject("disposableBackups");
95
+ if(files==null||!files.has(name))return false;
96
+ JsonElement proof=files.get(name);
97
+ if(proof.isJsonPrimitive()){
98
+ // Older proofs were recorded only for a before-image-equal backup (not saveAs-created Update copies).
99
+ return name.endsWith(".keep")&&proof.equals(journal.getAsJsonObject("before").get("fingerprint"))&&saved.get("fingerprint").equals(proof.getAsString());
100
+ }
101
+ if(!proof.isJsonObject())return false;
102
+ JsonObject created=proof.getAsJsonObject();
103
+ if(!saved.get("fileId").equals(text(created,"fileId"))||!saved.get("fingerprint").equals(text(created,"fingerprint"))||
104
+ !journal.get("backupExpected").getAsBoolean())return false;
105
+ if(created.get("schema").getAsInt()==2){
106
+ String program=text(journal.getAsJsonObject("request").getAsJsonObject("owner"),"path").substring(1);
107
+ return text(journal.getAsJsonObject("request"),"operation").equals("discard")&&
108
+ name.equals(createdBackup(program,journal.getAsJsonObject("backupFilesBefore"),journal.getAsJsonObject("backupFilesAfter")))&&
109
+ journal.getAsJsonObject("backupFilesAfter").get(name).equals(created.get("fileId"))&&
110
+ name.equals(text(journal.getAsJsonObject("result"),"retainedKeepFile"))&&
111
+ created.get("fingerprint").equals(journal.getAsJsonObject("before").get("fingerprint"));
112
+ }
113
+ boolean newFile=journal.has("backupAbsent")&&(journal.get("backupAbsent").getAsBoolean()||journal.has("backupBeforeFileId")&&!journal.get("backupBeforeFileId").isJsonNull()&&
114
+ !journal.get("backupBeforeFileId").equals(created.get("fileId")));
115
+ return name.endsWith(".keep")&&newFile&&created.get("schema").getAsInt()==1;
116
+ }catch(RuntimeException unproved){return false;}}
117
+ static boolean ownedBackupJournal(String filename,JsonObject journal,JsonObject q,JsonObject owner){try{
118
+ JsonObject request=journal.getAsJsonObject("request"),result=journal.getAsJsonObject("result");
119
+ return request!=null&&result!=null&&owner.equals(request.getAsJsonObject("owner"))&&Objects.equals(request.get("root"),q.get("root"))&&
120
+ Objects.equals(request.get("fileId"),q.get("fileId"))&&text(request,"request").matches("q_[a-f0-9-]{36}")&&
121
+ filename.equals(text(request,"request")+"-"+text(request,"operation")+".json")&&
122
+ (text(request,"operation").equals("update")&&text(result,"state").equals("updated")||text(request,"operation").equals("discard")&&text(result,"state").equals("discarded"))&&
123
+ result.get("baseVersion").getAsInt()<=q.get("verifiedVersion").getAsInt();
124
+ }catch(RuntimeException unproved){return false;}}
125
+ /** A completed discard replaces one checkout in this same project. Incomplete intents never extend the chain. */
126
+ static Set<Long> backupCheckouts(List<JsonObject> journals,JsonObject q){
127
+ Set<Long> ids=new HashSet<>();ids.add(q.get("checkoutId").getAsLong());boolean changed;
128
+ do{changed=false;for(JsonObject journal:journals)try{
129
+ JsonObject request=journal.getAsJsonObject("request"),result=journal.getAsJsonObject("result"),saved=result.getAsJsonObject("saved");
130
+ if(text(request,"operation").equals("discard")&&text(result,"state").equals("discarded")&&ids.contains(result.get("checkoutId").getAsLong())&&
131
+ result.get("modified").getAsBoolean()==false&&Objects.equals(request.get("checkoutId"),journal.get("checkoutId"))&&
132
+ !Objects.equals(request.get("checkoutId"),result.get("checkoutId"))&&request.get("checkoutId").getAsLong()>=0&&
133
+ Objects.equals(saved.get("fileId"),q.get("fileId"))&&Objects.equals(saved.get("version"),result.get("baseVersion"))&&
134
+ text(saved,"fingerprint").matches("[a-f0-9]{64}")&&
135
+ result.get("baseVersion").getAsInt()>=journal.get("baseVersion").getAsInt())changed|=ids.add(request.get("checkoutId").getAsLong());
136
+ }catch(RuntimeException unproved){/* A partial receipt cannot connect checkouts. */}}while(changed);
137
+ return ids;
138
+ }
139
+ /** Only an expected backup newly created by a completed owned native operation, still at its recorded bytes, is disposable. */
140
+ static Map<String,String> backups(Project project,Path operations,JsonObject q,JsonObject owner)throws Exception {
141
+ String name=text(owner,"path").substring(1);Map<String,String> proved=new TreeMap<>();List<JsonObject> journals=new ArrayList<>();
142
+ try(var paths=Files.list(operations)){
143
+ for(Path path:paths.filter(p->p.getFileName().toString().matches("q_[a-f0-9-]{36}-(update|discard)\\.json")).sorted().toList()){
144
+ JsonObject journal=JsonParser.parseString(Files.readString(path)).getAsJsonObject();
145
+ if(ownedBackupJournal(path.getFileName().toString(),journal,q,owner))journals.add(journal);
146
+ }
147
+ }
148
+ Set<Long> checkouts=backupCheckouts(journals,q);
149
+ for(JsonObject journal:journals){
150
+ JsonObject result=journal.getAsJsonObject("result"),files=result.getAsJsonObject("disposableBackups");
151
+ if(files==null||!checkouts.contains(result.get("checkoutId").getAsLong()))continue;
152
+ for(String keep:files.keySet()){
153
+ if(!backupName(name,keep))continue;
154
+ DomainFile backup=project.getProjectData().getFile("/"+keep);
155
+ if(backup==null||backup.isVersioned()||backup.canRecover()||backup.isCheckedOut()||backup.isHijacked())continue;
156
+ try{Map<String,Object> current=saved(backup,owner);if(backupMatches(journal,keep,current))proved.put(keep,current.get("fingerprint").toString());}
157
+ catch(Exception unproved){/* Unreadable or foreign bytes remain private. */}
158
+ }
159
+ }
160
+ return proved;
161
+ }
162
+ /** Update's createKeepFile deletes an existing .keep. Prove that exact file disposable before entering native merge. */
163
+ static boolean replaceableBackup(Project project,Path operations,JsonObject q,JsonObject owner,int base,Map<String,Object> intent){
164
+ JsonObject proof=q.deepCopy();proof.addProperty("verifiedVersion",base);
165
+ try{
166
+ String keep=text(owner,"path").substring(1)+".keep";
167
+ DomainFile backup=project.getProjectData().getFile("/"+keep);
168
+ if(backup==null||!Objects.equals(backup.getFileID(),intent.get("backupBeforeFileId")))return false;
169
+ String fingerprint=backups(project,operations,proof,owner).get(keep);
170
+ if(fingerprint==null)return false;
171
+ intent.put("backupReplacementProof",Map.of("name",keep,"fileId",intent.get("backupBeforeFileId"),"fingerprint",fingerprint));
172
+ return true;
173
+ }catch(Exception unproved){return false;}
174
+ }
175
+ static Map<String,String> releaseFiles(Project project,Path operations,JsonObject q,JsonObject owner,boolean localProgram)throws Exception {
176
+ var files=new TreeSet<String>();local(project.getProjectData().getRootFolder(),files);
177
+ Map<String,String> backups=backups(project,operations,q,owner);var allowed=new TreeSet<>(backups.keySet());
178
+ if(localProgram)allowed.add(text(owner,"path").substring(1));
179
+ require(files.equals(allowed),"Unpublished native project files must be retained");return backups;
61
180
  }
62
181
  static boolean released(Path root,JsonObject q)throws Exception {
63
182
  Path path=root.resolve("released.json");if(!Files.exists(path))return false;
64
183
  var released=JsonParser.parseString(Files.readString(path)).getAsJsonObject();
65
- return text(released,"state").equals("released")&&released.get("checkoutId").equals(q.get("checkoutId"))&&
66
- released.get("fingerprint").equals(q.get("fingerprint"))&&released.get("version").equals(q.get("verifiedVersion"));
184
+ return text(released,"state").equals("released")&&sameRelease(released,q);
67
185
  }
68
186
  static void deleteReleased(Path root,ProjectLocator locator)throws Exception {
69
187
  for(Path target:List.of(locator.getProjectDir().toPath(),locator.getMarkerFile().toPath())){
@@ -86,13 +204,38 @@ public final class InsightNativeCheckout {
86
204
  out.put("checkouts",Arrays.stream(repository.getCheckouts("/",name)).map(c->Map.of("id",c.getCheckoutId(),"version",c.getCheckoutVersion(),"user",c.getUser())).toList());
87
205
  out.put("checkinActive",repository.isCheckinActive("/",name));
88
206
  }
207
+ /** Ends exactly one server checkout whose own project no longer exists; its private work cannot be recovered. */
208
+ static Map<String,Object> abandon(RepositoryAdapter repository,JsonObject q,JsonObject owner)throws Exception {
209
+ Path root=Path.of(text(q,"root"));String name=text(owner,"path").substring(1);long id=q.get("checkoutId").getAsLong();
210
+ require(root.isAbsolute()&&!Files.exists(root,LinkOption.NOFOLLOW_LINKS),"Native project still exists");
211
+ require(root.getParent().getFileName().toString().equals(text(owner,"context")),"Malformed native binding");
212
+ var item=repository.getItem("/",name);require(item!=null&&item.getFileID().equals(text(q,"fileId")),"Native file ID changed");
213
+ require(!repository.isCheckinActive("/",name),"A native check-in is active");
214
+ String owned="/"+text(owner,"context")+"/"+root.getFileName()+"/view";boolean present=false;
215
+ // Everything is proved before the only effect.
216
+ for(var checkout:repository.getCheckouts("/",name)){
217
+ boolean project=Objects.toString(checkout.getProjectPath(),"").replace('\\','/').endsWith(owned);
218
+ require(project==(checkout.getCheckoutId()==id),"Server checkout belongs to another project");
219
+ if(!project)continue;
220
+ require(checkout.getUser().equals(System.getenv("GHIDRA_SERVER_USER"))&&checkout.getCheckoutType()==ghidra.framework.store.CheckoutType.NORMAL&&
221
+ checkout.getCheckoutVersion()==q.get("baseVersion").getAsInt(),"Server checkout differs from its receipt");
222
+ present=true;
223
+ }
224
+ if(q.get("check").getAsBoolean())return Map.of("state","endable");
225
+ require(!Files.exists(root,LinkOption.NOFOLLOW_LINKS),"Native project still exists");
226
+ if(present)repository.terminateCheckout("/",name,id,false);
227
+ for(var checkout:repository.getCheckouts("/",name))require(checkout.getCheckoutId()!=id,"Owned checkout remains");
228
+ return Map.of("state","abandoned","terminated",present);
229
+ }
89
230
  public static void main(String[] args){
90
231
  var output=System.out;System.setOut(System.err);Project project=null;GhidraServerManager server=null;
91
232
  Map<String,Object> out=new LinkedHashMap<>();
92
233
  try {
93
234
  require(args.length==1,"Owned request required");
94
235
  JsonObject q=JsonParser.parseString(Files.readString(Path.of(args[0]))).getAsJsonObject();
95
- Path root=Path.of(text(q,"root")).toRealPath();JsonObject owner=JsonParser.parseString(Files.readString(root.resolve("native-owner.json"))).getAsJsonObject();
236
+ boolean abandoning=text(q,"operation").equals("abandon");
237
+ Path root=abandoning?Path.of(text(q,"root")):Path.of(text(q,"root")).toRealPath();
238
+ JsonObject owner=abandoning?q.getAsJsonObject("owner"):JsonParser.parseString(Files.readString(root.resolve("native-owner.json"))).getAsJsonObject();
96
239
  require(owner.equals(q.getAsJsonObject("owner")),"Native owner receipt changed");
97
240
  require(text(owner,"protocol").equals("native-checkout-v1")&&text(owner,"path").equals("/"+text(owner,"target")+".bin"),"Malformed native binding");
98
241
  String operation=text(q,"operation"),path=text(owner,"path"),name=path.substring(1);
@@ -102,6 +245,9 @@ public final class InsightNativeCheckout {
102
245
  server=new GhidraServerManager();server.connect();require(server.isConnected(),"Native repository disconnected");
103
246
  RepositoryAdapter repository=server.server().getRepository(text(owner,"repository"));repository.connect();
104
247
  require(repository.getUser().hasWritePermission()&&repository.getUser().getName().equals(System.getenv("GHIDRA_SERVER_USER")),"Publisher authority required");
248
+ if(abandoning){
249
+ out.putAll(abandon(repository,q,owner));repository.disconnect();server.disconnect();output.println(GSON.toJson(out));System.exit(0);
250
+ }
105
251
  ProjectLocator locator=new ProjectLocator(root.toString(),"view");Projects manager=new Projects();
106
252
  // After a proved release the project is never reopened: an interrupted deletion can leave it unreadable.
107
253
  if((operation.equals("release")||operation.equals("drop"))&&released(root,q)){
@@ -136,19 +282,43 @@ public final class InsightNativeCheckout {
136
282
  require(file.isCheckedOut(),"Native checkout missing");
137
283
  var before=saved(file,owner);long checkout=file.getCheckoutStatus().getCheckoutId();int base=file.getCheckoutStatus().getCheckoutVersion(),head=file.getLatestVersion();
138
284
  Map<String,Object> intent=new LinkedHashMap<>();intent.put("request",q);intent.put("before",before);intent.put("checkoutId",checkout);intent.put("baseVersion",base);intent.put("headVersion",head);
285
+ DomainFile priorKeep=project.getProjectData().getFile(path+".keep");boolean keepAbsent=priorKeep==null;
286
+ String priorKeepId=keepAbsent?null:priorKeep.getFileID();
287
+ boolean backupExpected=file.modifiedSinceCheckout()&&(operation.equals("discard")||operation.equals("update")&&head>base);
288
+ intent.put("backupAbsent",keepAbsent);intent.put("backupBeforeFileId",priorKeepId);intent.put("backupExpected",backupExpected);
139
289
  if(operation.equals("discard")){
290
+ var backupsBefore=backupInventory(project,name);intent.put("backupFilesBefore",backupsBefore);
140
291
  write(journal,intent);
141
- boolean dirty=file.modifiedSinceCheckout();file.undoCheckout(dirty);
292
+ file.undoCheckout(backupExpected);
293
+ out.put("state","discarded");out.put("retainedKeepFile","");
294
+ if(backupExpected){
295
+ var backupsAfter=backupInventory(project,name);intent.put("backupFilesAfter",backupsAfter);
296
+ String keep=createdBackup(name,GSON.toJsonTree(backupsBefore).getAsJsonObject(),GSON.toJsonTree(backupsAfter).getAsJsonObject());
297
+ DomainFile created=project.getProjectData().getFile("/"+keep);
298
+ require(created!=null&&!created.isVersioned()&&!created.canRecover()&&!created.isCheckedOut()&&!created.isHijacked(),"Native discard backup is not private");
299
+ var actual=saved(created,owner);
300
+ require(Objects.equals(actual.get("fileId"),backupsAfter.get(keep))&&Objects.equals(actual.get("fingerprint"),before.get("fingerprint")),"Native discard backup differs from saved private buffers");
301
+ out.put("retainedKeepFile",keep);out.put("disposableBackups",Map.of(keep,Map.of("schema",2,"fileId",actual.get("fileId"),"fingerprint",actual.get("fingerprint"))));
302
+ }
142
303
  file=project.getProjectData().getFile(path);require(file.checkout(false,MONITOR),"Native checkout after discard was refused");
143
- out.put("state","discarded");out.put("retainedKeepFile",dirty?name+".keep":"");
144
304
  }else if(operation.equals("update")){
145
305
  write(journal,intent);
146
- try{if(head>base)file.merge(false,MONITOR);
147
- require(file.getCheckoutStatus().getCheckoutId()==checkout&&file.getCheckoutStatus().getCheckoutVersion()>=head,"Native Update did not establish the requested ancestry");
148
- out.put("state","updated");}
149
- catch(HeadlessProgramMergeManager.UnresolvedNativeConflict conflict){
150
- require(before.equals(saved(file,owner))&&file.getCheckoutStatus().getCheckoutId()==checkout&&file.getCheckoutStatus().getCheckoutVersion()==base,"Native conflict did not preserve local state");
151
- out.put("state","conflict");out.put("conflict",conflict.getMessage());
306
+ // Only dirty incoming Update can replace .keep. A refusal is a completed pre-call outcome,
307
+ // carried by the existing conflict/recovery path; incomplete/legacy intents remain unknown.
308
+ if(backupExpected&&!keepAbsent&&!replaceableBackup(project,operations,q,owner,base,intent)){
309
+ require(before.equals(saved(file,owner))&&file.getCheckoutStatus().getCheckoutId()==checkout&&file.getCheckoutStatus().getCheckoutVersion()==base,"Backup refusal did not preserve local state");
310
+ out.put("state","conflict");out.put("conflict","Existing native backup is not proved disposable; retain and inspect this project before Update");
311
+ var refusal=new LinkedHashMap<String,Object>(Map.of("schema",1,"operation","update","invoked",false,"reason","protected_existing_backup"));
312
+ refusal.put("fileId",priorKeepId);out.put("preCallRefusal",refusal);
313
+ }else{
314
+ if(intent.containsKey("backupReplacementProof"))write(journal,intent);
315
+ try{if(head>base)file.merge(false,MONITOR);
316
+ require(file.getCheckoutStatus().getCheckoutId()==checkout&&file.getCheckoutStatus().getCheckoutVersion()>=head,"Native Update did not establish the requested ancestry");
317
+ out.put("state","updated");}
318
+ catch(HeadlessProgramMergeManager.UnresolvedNativeConflict conflict){
319
+ require(before.equals(saved(file,owner))&&file.getCheckoutStatus().getCheckoutId()==checkout&&file.getCheckoutStatus().getCheckoutVersion()==base,"Native conflict did not preserve local state");
320
+ out.put("state","conflict");out.put("conflict",conflict.getMessage());
321
+ }
152
322
  }
153
323
  }else{
154
324
  require(before.get("fingerprint").equals(text(q,"fingerprint")),"Prepared native publication changed");
@@ -170,18 +340,35 @@ public final class InsightNativeCheckout {
170
340
  }
171
341
  out.put("saved",saved(file,owner));out.put("checkoutId",file.getCheckoutStatus().getCheckoutId());out.put("baseVersion",file.getCheckoutStatus().getCheckoutVersion());
172
342
  out.put("modified",file.modifiedSinceCheckout());out.put("nativeMergeInvocations",HeadlessProgramMergeManager.invocations);out.put("nativePhases",HeadlessProgramMergeManager.phases);
343
+ if(backupExpected&&out.get("state").equals("updated")){
344
+ DomainFile keep=project.getProjectData().getFile(path+".keep");
345
+ // Ghidra's dirty Update uses createFile/saveAs, assigning the copy a new DB ID inside the fingerprinted bytes.
346
+ if(keep!=null&&(keepAbsent||priorKeepId!=null&&!priorKeepId.equals(keep.getFileID()))&&!keep.isVersioned()&&!keep.canRecover()&&!keep.isCheckedOut()&&!keep.isHijacked())try{
347
+ var actual=saved(keep,owner);out.put("disposableBackups",Map.of(name+".keep",Map.of("schema",1,"fileId",actual.get("fileId"),"fingerprint",actual.get("fingerprint"))));
348
+ }
349
+ catch(Exception unproved){/* An unreadable backup remains private; it cannot invalidate native completion. */}
350
+ }
173
351
  intent.put("result",out);write(journal,intent);
174
352
  }
175
353
  }else if(operation.equals("release")){
176
354
  Path releaseFile=root.resolve("released.json");
177
- Map<String,Object> release=new LinkedHashMap<>(Map.of("checkoutId",q.get("checkoutId").getAsLong(),"version",q.get("verifiedVersion").getAsInt(),"fingerprint",text(q,"fingerprint")));
355
+ Map<String,Object> release=new LinkedHashMap<>(Map.of("checkoutId",q.get("checkoutId").getAsLong(),"version",q.get("verifiedVersion").getAsInt(),"fingerprint",text(q,"fingerprint"),
356
+ "fileId",text(q,"fileId"),"savedFingerprint",authorized(q)));
178
357
  if(file.isCheckedOut()){
179
- require(!file.modifiedSinceCheckout()&&file.getCheckoutStatus().getCheckoutVersion()==q.get("verifiedVersion").getAsInt(),"Unpublished native work must be retained");
180
- require(saved(file,owner).get("fingerprint").equals(text(q,"fingerprint")),"Verified native buffers changed");
358
+ require(!q.has("opened")||q.has("openedVerified")&&q.get("openedVerified").getAsBoolean(),"Pristine-open proof is unverified; private work must be retained");
359
+ require(file.getCheckoutStatus().getCheckoutVersion()==q.get("verifiedVersion").getAsInt()&&!file.canRecover(),"Unpublished native work must be retained");
360
+ Object local=saved(file,owner).get("fingerprint");
361
+ // Ghidra's own rewrite on open marks a checkout modified; only bytes the coordinator proved to hold no work may carry it.
362
+ require(local.equals(authorized(q)),"Verified native buffers changed");
363
+ require(q.has("opened")||!file.modifiedSinceCheckout(),"Unpublished native work must be retained");
364
+ release.put("disposableBackups",releaseFiles(project,operations,q,owner,true));
181
365
  release.put("state","release_intent");write(releaseFile,release);file.undoCheckout(false);
182
366
  }else{
183
367
  var prior=JsonParser.parseString(Files.readString(releaseFile)).getAsJsonObject();
184
- require(prior.get("checkoutId").equals(q.get("checkoutId"))&&prior.get("version").equals(q.get("verifiedVersion"))&&prior.get("fingerprint").equals(q.get("fingerprint")),"Release intent changed");
368
+ require(text(prior,"state").equals("release_intent")&&sameRelease(prior,q),"Release intent changed");
369
+ boolean surviving=file.isHijacked();
370
+ if(surviving)require(!file.canRecover()&&survivingRelease(prior,q,saved(file,owner)),"Unproved surviving native file must be retained");
371
+ release.put("disposableBackups",releaseFiles(project,operations,q,owner,surviving));
185
372
  }
186
373
  require(Arrays.stream(repository.getCheckouts("/",name)).noneMatch(c->c.getCheckoutId()==q.get("checkoutId").getAsLong()),"Owned checkout remains");
187
374
  release.put("state","released");write(releaseFile,release);out.put("state","released");
@@ -10,6 +10,10 @@ native-merge-patches.ts extracts six SHA-256-pinned upstream source files from
10
10
  the selected Ghidra installation into owned compilation storage. The generated
11
11
  sources retain their original license headers. Headless entry/display assumptions
12
12
  are adapted. A separate native MemoryMergeManager compatibility correction covers
13
- unchanged-null comments and symmetric deletion/update conflicts. The generated
13
+ unchanged-null comments and symmetric deletion/update conflicts. The native Update
14
+ adapter also saves an unchanged merge result through Ghidra's DB save API so its
15
+ cumulative change files exist, then records that result as clean at the exact
16
+ merged version without replacing the checkout or inventing native edits.
17
+ The generated
14
18
  native-merge-provenance.json records upstream and compiled source hashes.
15
19
  Installed Ghidra JARs are not modified. No alternative object merger is provided.
@@ -2,9 +2,11 @@
2
2
 
3
3
  These commands extend the pinned MCP catalog. All program calls select both `--session` and
4
4
  `--target`; API callers use the same Factory command paths. Use generated help for flags.
5
- Programs remain private until explicit `ghidra merge`. Every new program edit is a complex
6
- change: saved-state verification is required, and a diverged shared base retains a conflict.
7
- `refresh` does not silently overwrite either complex version. Program edits require Destructive
5
+ By default, programs remain private until explicit `ghidra merge`; configured automatic policies
6
+ are described in [synchronization](extensions-and-sync.md). Saved-state verification is required.
7
+ Ghidra's native Update receives incoming changes for `merge` and `refresh`, including compatible
8
+ structural changes. Unresolved native conflicts receive no incoming changes and retain the
9
+ original private checkout, saved buffers and base. Program edits in these SDK workflows require Destructive
8
10
  permission. File/database creation and VT decisions require Update; reads require ReadOnly.
9
11
 
10
12
  ## Compare and edit a private program
@@ -104,5 +104,6 @@ the entire initialized-content digest before acknowledgment. `functions set-func
104
104
  also accepts `--calling-convention`; saved signature types and convention are verified.
105
105
 
106
106
  These remain complex private edits. Request IDs retrieve retained outcomes; lost responses are
107
- reconciled from saved effects, never blindly re-created. Publish with explicit merge on the
108
- unchanged shared base; structural divergence still retains a conflict.
107
+ reconciled from saved effects, never blindly re-created. Publish with explicit `ghidra merge`,
108
+ which runs native Update/check-in. Ghidra combines local and incoming analysis using checkout
109
+ ancestry and native change sets. A native conflict retains the original working copy and base.
@@ -7,6 +7,12 @@ without importing a snapshot or silently receiving a newer shared version. Priva
7
7
  have no publisher credentials; service-only Update/check-in temporarily owns the stopped project.
8
8
  Legacy detached contexts require explicit migration and remain retained.
9
9
 
10
+ If final checkout release refuses, saved private work remains retained. When the service
11
+ independently proves that the same checkout survived, reopen the same selectors to inspect
12
+ it. An empty merge can finish as failed/retained; an already published request keeps its
13
+ verified result. An unproved release or check-in outcome stays blocked for journal-based
14
+ recovery. Preserve its project and receipts rather than repeating a mutation with a new ID.
15
+
10
16
  If native `changes discard` loses its response, retry its original request ID or continue
11
17
  the same session/target. Recovery requires a completed native discard journal and matching
12
18
  new checkout identity/base and saved buffers, followed by independent server readback.
@@ -61,8 +61,15 @@ in the selected profile before creating contexts or editing. Research scope is e
61
61
  skill discovery and help require no authentication or native process startup.
62
62
  Deletion and replacement commands also require `permissions grant Destructive`.
63
63
 
64
- All target bytes, snapshots, journals, projects and process receipts derive from the selected
65
- profile's AppData. Stop the owner through `ipc-server stop` before changing its code/runtime
64
+ Inspect `insight-cli --profile <name> storage show --json`: research bytes, snapshots, journals,
65
+ projects, managed runtimes and materials use its effective analysis `directory`. Factory's `appData`
66
+ is the profile directory. Its parent also holds shared control metadata: `profiles.json` and
67
+ `.analysis-storage-default.json`. Grant access to the profile, effective analysis directory and
68
+ those parent metadata files, including parent traversal and owned lock/temporary entries needed
69
+ for configuration writes, while keeping unrelated profile directories outside the grant.
70
+ Credentials remain in the platform secret store. These locations may differ after configuration, migration or installation-default
71
+ selection; use the supported
72
+ [storage workflow](storage.md). Stop the owner through `ipc-server stop` before changing its code/runtime
66
73
  configuration. Restoring a saved context preserves its private view. Server settings and initial
67
74
  loader settings remain bound to the target/workspace, so changing those cannot silently replace
68
75
  retained work. This revision conservatively protects retained profile research state from deletion.
@@ -3,7 +3,7 @@ name: insight-artifacts
3
3
  description: Retain a completed reverse-engineering evidence file or directory as an ordinary checkpoint using insight-cli artifacts save. Use after Ghidra or any external tool; preserve existing project formats and source of truth.
4
4
  ---
5
5
 
6
- # Insight Artifacts 0.6.3
6
+ # Insight Artifacts 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
@@ -7,6 +7,12 @@ without importing a snapshot or silently receiving a newer shared version. Priva
7
7
  have no publisher credentials; service-only Update/check-in temporarily owns the stopped project.
8
8
  Legacy detached contexts require explicit migration and remain retained.
9
9
 
10
+ If final checkout release refuses, saved private work remains retained. When the service
11
+ independently proves that the same checkout survived, reopen the same selectors to inspect
12
+ it. An empty merge can finish as failed/retained; an already published request keeps its
13
+ verified result. An unproved release or check-in outcome stays blocked for journal-based
14
+ recovery. Preserve its project and receipts rather than repeating a mutation with a new ID.
15
+
10
16
  If native `changes discard` loses its response, retry its original request ID or continue
11
17
  the same session/target. Recovery requires a completed native discard journal and matching
12
18
  new checkout identity/base and saved buffers, followed by independent server readback.
@@ -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.6.3
6
+ # Insight Binary 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
@@ -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.6.3
6
+ # Insight Capture 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
@@ -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.
@@ -37,9 +37,17 @@ Codex is the first concrete supported-host gate.
37
37
 
38
38
  ## Execution access
39
39
 
40
- A skill link does not grant filesystem or IPC permissions. Allow the assigned profile's AppData
41
- and the CLI's `.runtime` directory, plus its exact local IPC endpoint. On macOS the application
42
- root is `~/Library/Application Support/insight-cli`; its Unix socket is `.runtime/host.sock`.
40
+ A skill link does not grant filesystem or IPC permissions. Run
41
+ `insight-cli --profile <name> storage show --json` through the selected executable to inspect
42
+ the assigned profile. Its `appData` is the profile directory, not the whole application control root.
43
+ Allow that directory and the shared metadata in its parent: `profiles.json` for profile discovery
44
+ and `.analysis-storage-default.json` for installation defaults. Permit parent traversal and the
45
+ metadata's owned lock/temporary entries when configuration writes need them; keep unrelated
46
+ profile directories outside the grant. Also allow the effective analysis `directory`, which may be elsewhere after
47
+ storage configuration, migration or installation-default selection. Follow the
48
+ [storage workflow](storage.md) for retained compatibility paths. Also allow the CLI's `.runtime`
49
+ directory and exact local IPC endpoint. On macOS the application root is
50
+ `~/Library/Application Support/insight-cli`; its Unix socket is `.runtime/host.sock`.
43
51
  Keep unrelated profiles outside the write scope and pass the assigned `--profile` explicitly.
44
52
  Do not grant broad external network access merely to reach a local socket.
45
53
 
@@ -139,9 +139,10 @@ Unsupported platforms fail explicitly and may use compatible external profile pa
139
139
  acceptance for this delivery is macOS ARM64; catalog availability is not Windows/Linux native proof.
140
140
 
141
141
  The host provides Node/npm, OS frameworks, display/keychain access and debugger authorization.
142
- macOS LLDB and its embedded Python come from Apple's developer tools; they are OS prerequisites,
143
- not downloaded third-party Python dependencies. `doctor` reports a missing host debugger as a partial
144
- failure even when static analysis/server pass. No root installation, developer-tools installer,
142
+ On macOS 15+ ARM64 the managed debugger below supplies private LLDB/Python; Apple developer
143
+ tools are not prerequisites for that backend. Other macOS system-debugger routes use LLDB and
144
+ its Python from Apple's developer tools. `doctor` probes the selected backend and can report
145
+ partial debugger failure while static analysis/server pass. No root installation, developer-tools installer,
145
146
  Gatekeeper disabling, shell-profile edit or global Java/Python selection is performed. Ghidra GUI
146
147
  agents receive private copies of the Ghidra SDK's pinned debugger Python wheels.
147
148
 
@@ -7,6 +7,12 @@ without importing a snapshot or silently receiving a newer shared version. Priva
7
7
  have no publisher credentials; service-only Update/check-in temporarily owns the stopped project.
8
8
  Legacy detached contexts require explicit migration and remain retained.
9
9
 
10
+ If final checkout release refuses, saved private work remains retained. When the service
11
+ independently proves that the same checkout survived, reopen the same selectors to inspect
12
+ it. An empty merge can finish as failed/retained; an already published request keeps its
13
+ verified result. An unproved release or check-in outcome stays blocked for journal-based
14
+ recovery. Preserve its project and receipts rather than repeating a mutation with a new ID.
15
+
10
16
  If native `changes discard` loses its response, retry its original request ID or continue
11
17
  the same session/target. Recovery requires a completed native discard journal and matching
12
18
  new checkout identity/base and saved buffers, followed by independent server readback.
@@ -61,8 +61,15 @@ in the selected profile before creating contexts or editing. Research scope is e
61
61
  skill discovery and help require no authentication or native process startup.
62
62
  Deletion and replacement commands also require `permissions grant Destructive`.
63
63
 
64
- All target bytes, snapshots, journals, projects and process receipts derive from the selected
65
- profile's AppData. Stop the owner through `ipc-server stop` before changing its code/runtime
64
+ Inspect `insight-cli --profile <name> storage show --json`: research bytes, snapshots, journals,
65
+ projects, managed runtimes and materials use its effective analysis `directory`. Factory's `appData`
66
+ is the profile directory. Its parent also holds shared control metadata: `profiles.json` and
67
+ `.analysis-storage-default.json`. Grant access to the profile, effective analysis directory and
68
+ those parent metadata files, including parent traversal and owned lock/temporary entries needed
69
+ for configuration writes, while keeping unrelated profile directories outside the grant.
70
+ Credentials remain in the platform secret store. These locations may differ after configuration, migration or installation-default
71
+ selection; use the supported
72
+ [storage workflow](storage.md). Stop the owner through `ipc-server stop` before changing its code/runtime
66
73
  configuration. Restoring a saved context preserves its private view. Server settings and initial
67
74
  loader settings remain bound to the target/workspace, so changing those cannot silently replace
68
75
  retained work. This revision conservatively protects retained profile research state from deletion.
@@ -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.6.3
6
+ # Insight Detect It Easy 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
@@ -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.6.3
6
+ # Insight dnSpyEx 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
@@ -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.6.3
6
+ # Insight .NET Dump 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
@@ -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.6.3
6
+ # Insight .NET Stack 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
@@ -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.6.3
6
+ # Insight .NET Trace 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
@@ -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.6.3
6
+ # Insight Frida 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
@@ -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.6.3
6
+ # Insight Ghidra 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
@@ -91,8 +91,9 @@ ordinary saved copy and its receipt. Neither operation requires a Ghidra install
91
91
  4. Rename functions or set/clear comments through ordinary commands. An `applied` result means
92
92
  verified saved private work. Other sessions keep their own views; local edits remain unpublished in the default manual mode.
93
93
  5. By default, publish explicitly with `ghidra merge`; receive safe shared changes with `ghidra refresh`.
94
- Resolve overlapping names/comments against an explicitly observed shared value. A conflict
95
- prevents the whole selected merge and retains local work.
94
+ Ghidra resolves local and incoming analysis using native checkout ancestry and change sets.
95
+ A native conflict prevents publication and retains the original checkout and base. Inspect
96
+ scoped status and the [recovery guidance](references/recovery.md) before choosing a resolution.
96
97
  6. Continue with `ghidra open --session <id> --target <id>`. For uncertain outcomes inspect
97
98
  `sessions status <id> --target <id>` and [recovery](references/recovery.md). Supplying a stable
98
99
  optional `--request-id` lets a repeated changing intent retrieve its outcome without rerunning.