invar-tools 1.15.3__py3-none-any.whl → 1.15.5__py3-none-any.whl

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.
@@ -141,8 +141,11 @@ const factory: CustomToolFactory = (pi) => {
141
141
  throw new Error("Sig command was cancelled");
142
142
  }
143
143
 
144
- if (result.exitCode !== 0) {
145
- throw new Error(`Failed to get signatures: ${result.stderr}`);
144
+ // Only treat as error if exitCode is explicitly non-zero
145
+ // (Pi's exec may return undefined/null for success)
146
+ if (result.exitCode && result.exitCode !== 0) {
147
+ const errorMsg = result.stderr || result.stdout || "Unknown error";
148
+ throw new Error(`Failed to get signatures: ${errorMsg}`);
146
149
  }
147
150
 
148
151
  return {
@@ -199,8 +202,10 @@ const factory: CustomToolFactory = (pi) => {
199
202
  throw new Error("Map command was cancelled");
200
203
  }
201
204
 
202
- if (result.exitCode !== 0) {
203
- throw new Error(`Failed to generate map: ${result.stderr}`);
205
+ // Only treat as error if exitCode is explicitly non-zero
206
+ if (result.exitCode && result.exitCode !== 0) {
207
+ const errorMsg = result.stderr || result.stdout || "Unknown error";
208
+ throw new Error(`Failed to generate map: ${errorMsg}`);
204
209
  }
205
210
 
206
211
  return {
@@ -261,8 +266,10 @@ const factory: CustomToolFactory = (pi) => {
261
266
  throw new Error("Doc toc command was cancelled");
262
267
  }
263
268
 
264
- if (result.exitCode !== 0) {
265
- throw new Error(`Failed to extract TOC: ${result.stderr}`);
269
+ // Only treat as error if exitCode is explicitly non-zero
270
+ if (result.exitCode && result.exitCode !== 0) {
271
+ const errorMsg = result.stderr || result.stdout || "Unknown error";
272
+ throw new Error(`Failed to extract TOC: ${errorMsg}`);
266
273
  }
267
274
 
268
275
  return {
@@ -327,8 +334,10 @@ const factory: CustomToolFactory = (pi) => {
327
334
  throw new Error("Doc read command was cancelled");
328
335
  }
329
336
 
330
- if (result.exitCode !== 0) {
331
- throw new Error(`Failed to read section: ${result.stderr}`);
337
+ // Only treat as error if exitCode is explicitly non-zero
338
+ if (result.exitCode && result.exitCode !== 0) {
339
+ const errorMsg = result.stderr || result.stdout || "Unknown error";
340
+ throw new Error(`Failed to read section: ${errorMsg}`);
332
341
  }
333
342
 
334
343
  return {
@@ -399,8 +408,10 @@ const factory: CustomToolFactory = (pi) => {
399
408
  throw new Error("Doc find command was cancelled");
400
409
  }
401
410
 
402
- if (result.exitCode !== 0) {
403
- throw new Error(`Failed to find sections: ${result.stderr}`);
411
+ // Only treat as error if exitCode is explicitly non-zero
412
+ if (result.exitCode && result.exitCode !== 0) {
413
+ const errorMsg = result.stderr || result.stdout || "Unknown error";
414
+ throw new Error(`Failed to find sections: ${errorMsg}`);
404
415
  }
405
416
 
406
417
  return {
@@ -485,8 +496,10 @@ const factory: CustomToolFactory = (pi) => {
485
496
  throw new Error("Doc replace command was cancelled");
486
497
  }
487
498
 
488
- if (result.exitCode !== 0) {
489
- throw new Error(`Failed to replace section: ${result.stderr}`);
499
+ // Only treat as error if exitCode is explicitly non-zero
500
+ if (result.exitCode && result.exitCode !== 0) {
501
+ const errorMsg = result.stderr || result.stdout || "Unknown error";
502
+ throw new Error(`Failed to replace section: ${errorMsg}`);
490
503
  }
491
504
 
492
505
  return {
@@ -580,8 +593,10 @@ const factory: CustomToolFactory = (pi) => {
580
593
  throw new Error("Doc insert command was cancelled");
581
594
  }
582
595
 
583
- if (result.exitCode !== 0) {
584
- throw new Error(`Failed to insert content: ${result.stderr}`);
596
+ // Only treat as error if exitCode is explicitly non-zero
597
+ if (result.exitCode && result.exitCode !== 0) {
598
+ const errorMsg = result.stderr || result.stdout || "Unknown error";
599
+ throw new Error(`Failed to insert content: ${errorMsg}`);
585
600
  }
586
601
 
587
602
  return {
@@ -655,8 +670,10 @@ const factory: CustomToolFactory = (pi) => {
655
670
  throw new Error("Doc delete command was cancelled");
656
671
  }
657
672
 
658
- if (result.exitCode !== 0) {
659
- throw new Error(`Failed to delete section: ${result.stderr}`);
673
+ // Only treat as error if exitCode is explicitly non-zero
674
+ if (result.exitCode && result.exitCode !== 0) {
675
+ const errorMsg = result.stderr || result.stdout || "Unknown error";
676
+ throw new Error(`Failed to delete section: ${errorMsg}`);
660
677
  }
661
678
 
662
679
  return {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: invar-tools
3
- Version: 1.15.3
3
+ Version: 1.15.5
4
4
  Summary: AI-native software engineering tools with design-by-contract verification
5
5
  Project-URL: Homepage, https://github.com/tefx/invar
6
6
  Project-URL: Documentation, https://github.com/tefx/invar#readme
@@ -143,7 +143,7 @@ invar/templates/onboard/assessment.md.jinja,sha256=EzqF0VUcxJZG2bVJLxTOyQlAERRbh
143
143
  invar/templates/onboard/roadmap.md.jinja,sha256=gmvZk4Hdwe0l3qSFV15QGcsr-OPMhsc6-1K9F2SFSIQ,3939
144
144
  invar/templates/onboard/patterns/python.md,sha256=3wwucAcQz0DlggtpqYo-ZCnmrXgBQ0aBgUHN_EZ1VW0,8681
145
145
  invar/templates/onboard/patterns/typescript.md,sha256=yOVfHtdAdjKkWNh66_dR7z2xEA4sggbIcCKthW-fqac,11983
146
- invar/templates/pi-tools/invar/index.ts,sha256=7xonqiDDUtY09gjRzxet-Xr7_Dxl1AfB0xqiUmBFeKE,22581
146
+ invar/templates/pi-tools/invar/index.ts,sha256=fLA7nOJRg7f8VjCYQ-B-AvWoc-E-cbJ7fP0os4AMN3c,23914
147
147
  invar/templates/protocol/INVAR.md.jinja,sha256=t2ZIQZJvzDTJMrRw_ijUo6ScZmeNK0-nV-H7ztTIyQQ,1464
148
148
  invar/templates/protocol/python/architecture-examples.md,sha256=O96LH9WFpk7G9MrhSbifLS5pyibTIDG-_EGFF7g3V4M,1175
149
149
  invar/templates/protocol/python/contracts-syntax.md,sha256=Q6supTQ3tChVrlN7xhcdb3Q8VGIESxQLA-mQvrNIZmo,1162
@@ -181,10 +181,10 @@ invar/templates/skills/invar-reflect/template.md,sha256=Rr5hvbllvmd8jSLf_0ZjyKt6
181
181
  invar/templates/skills/investigate/SKILL.md.jinja,sha256=cp6TBEixBYh1rLeeHOR1yqEnFqv1NZYePORMnavLkQI,3231
182
182
  invar/templates/skills/propose/SKILL.md.jinja,sha256=6BuKiCqO1AEu3VtzMHy1QWGqr_xqG9eJlhbsKT4jev4,3463
183
183
  invar/templates/skills/review/SKILL.md.jinja,sha256=ET5mbdSe_eKgJbi2LbgFC-z1aviKcHOBw7J5Q28fr4U,14105
184
- invar_tools-1.15.3.dist-info/METADATA,sha256=8cn5xZHmi9QvgHc1iPzFdol25Q302gRncWutGH6_ZgQ,28595
185
- invar_tools-1.15.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
186
- invar_tools-1.15.3.dist-info/entry_points.txt,sha256=RwH_EhqgtFPsnO6RcrwrAb70Zyfb8Mh6uUtztWnUxGk,102
187
- invar_tools-1.15.3.dist-info/licenses/LICENSE,sha256=qeFksp4H4kfTgQxPCIu3OdagXyiZcgBlVfsQ6M5oFyk,10767
188
- invar_tools-1.15.3.dist-info/licenses/LICENSE-GPL,sha256=IvZfC6ZbP7CLjytoHVzvpDZpD-Z3R_qa1GdMdWlWQ6Q,35157
189
- invar_tools-1.15.3.dist-info/licenses/NOTICE,sha256=joEyMyFhFY8Vd8tTJ-a3SirI0m2Sd0WjzqYt3sdcglc,2561
190
- invar_tools-1.15.3.dist-info/RECORD,,
184
+ invar_tools-1.15.5.dist-info/METADATA,sha256=zU4u2AF-x_H2DTuFNXka2IdQUQ20SVTdyhKv28dI2tA,28595
185
+ invar_tools-1.15.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
186
+ invar_tools-1.15.5.dist-info/entry_points.txt,sha256=RwH_EhqgtFPsnO6RcrwrAb70Zyfb8Mh6uUtztWnUxGk,102
187
+ invar_tools-1.15.5.dist-info/licenses/LICENSE,sha256=qeFksp4H4kfTgQxPCIu3OdagXyiZcgBlVfsQ6M5oFyk,10767
188
+ invar_tools-1.15.5.dist-info/licenses/LICENSE-GPL,sha256=IvZfC6ZbP7CLjytoHVzvpDZpD-Z3R_qa1GdMdWlWQ6Q,35157
189
+ invar_tools-1.15.5.dist-info/licenses/NOTICE,sha256=joEyMyFhFY8Vd8tTJ-a3SirI0m2Sd0WjzqYt3sdcglc,2561
190
+ invar_tools-1.15.5.dist-info/RECORD,,