opensip-cli 0.1.8 → 0.1.10

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 (138) hide show
  1. package/dist/bootstrap/admit-tool-package.d.ts +51 -11
  2. package/dist/bootstrap/admit-tool-package.d.ts.map +1 -1
  3. package/dist/bootstrap/admit-tool-package.js +46 -12
  4. package/dist/bootstrap/admit-tool-package.js.map +1 -1
  5. package/dist/bootstrap/baseline-seams.js +1 -1
  6. package/dist/bootstrap/baseline-seams.js.map +1 -1
  7. package/dist/bootstrap/bind-external-dispatch.d.ts +36 -0
  8. package/dist/bootstrap/bind-external-dispatch.d.ts.map +1 -0
  9. package/dist/bootstrap/bind-external-dispatch.js +81 -0
  10. package/dist/bootstrap/bind-external-dispatch.js.map +1 -0
  11. package/dist/bootstrap/build-command-registration-input.d.ts +13 -2
  12. package/dist/bootstrap/build-command-registration-input.d.ts.map +1 -1
  13. package/dist/bootstrap/build-command-registration-input.js +29 -2
  14. package/dist/bootstrap/build-command-registration-input.js.map +1 -1
  15. package/dist/bootstrap/build-per-run-scope.d.ts.map +1 -1
  16. package/dist/bootstrap/build-per-run-scope.js +19 -2
  17. package/dist/bootstrap/build-per-run-scope.js.map +1 -1
  18. package/dist/bootstrap/config-and-capabilities.d.ts +21 -6
  19. package/dist/bootstrap/config-and-capabilities.d.ts.map +1 -1
  20. package/dist/bootstrap/config-and-capabilities.js +79 -23
  21. package/dist/bootstrap/config-and-capabilities.js.map +1 -1
  22. package/dist/bootstrap/dispatch-external-tool-command.d.ts +67 -0
  23. package/dist/bootstrap/dispatch-external-tool-command.d.ts.map +1 -0
  24. package/dist/bootstrap/dispatch-external-tool-command.js +79 -0
  25. package/dist/bootstrap/dispatch-external-tool-command.js.map +1 -0
  26. package/dist/bootstrap/dispatch-external-tool-hook.d.ts +47 -0
  27. package/dist/bootstrap/dispatch-external-tool-hook.d.ts.map +1 -0
  28. package/dist/bootstrap/dispatch-external-tool-hook.js +49 -0
  29. package/dist/bootstrap/dispatch-external-tool-hook.js.map +1 -0
  30. package/dist/bootstrap/dispatch-fork-core.d.ts +48 -0
  31. package/dist/bootstrap/dispatch-fork-core.d.ts.map +1 -0
  32. package/dist/bootstrap/dispatch-fork-core.js +208 -0
  33. package/dist/bootstrap/dispatch-fork-core.js.map +1 -0
  34. package/dist/bootstrap/dispatch-host-rpc-handler.d.ts +27 -0
  35. package/dist/bootstrap/dispatch-host-rpc-handler.d.ts.map +1 -0
  36. package/dist/bootstrap/dispatch-host-rpc-handler.js +175 -0
  37. package/dist/bootstrap/dispatch-host-rpc-handler.js.map +1 -0
  38. package/dist/bootstrap/dispatch-replay-result.d.ts +51 -0
  39. package/dist/bootstrap/dispatch-replay-result.d.ts.map +1 -0
  40. package/dist/bootstrap/dispatch-replay-result.js +76 -0
  41. package/dist/bootstrap/dispatch-replay-result.js.map +1 -0
  42. package/dist/bootstrap/execute-post-bailout-bootstrap.d.ts.map +1 -1
  43. package/dist/bootstrap/execute-post-bailout-bootstrap.js +3 -1
  44. package/dist/bootstrap/execute-post-bailout-bootstrap.js.map +1 -1
  45. package/dist/bootstrap/owning-tool-init.d.ts +8 -2
  46. package/dist/bootstrap/owning-tool-init.d.ts.map +1 -1
  47. package/dist/bootstrap/owning-tool-init.js +11 -1
  48. package/dist/bootstrap/owning-tool-init.js.map +1 -1
  49. package/dist/bootstrap/register-authored-tools.d.ts +49 -0
  50. package/dist/bootstrap/register-authored-tools.d.ts.map +1 -0
  51. package/dist/bootstrap/register-authored-tools.js +132 -0
  52. package/dist/bootstrap/register-authored-tools.js.map +1 -0
  53. package/dist/bootstrap/register-tools-discovery.d.ts +0 -32
  54. package/dist/bootstrap/register-tools-discovery.d.ts.map +1 -1
  55. package/dist/bootstrap/register-tools-discovery.js +36 -100
  56. package/dist/bootstrap/register-tools-discovery.js.map +1 -1
  57. package/dist/bootstrap/register-tools-mount.d.ts.map +1 -1
  58. package/dist/bootstrap/register-tools-mount.js +20 -44
  59. package/dist/bootstrap/register-tools-mount.js.map +1 -1
  60. package/dist/bootstrap/register-tools.d.ts +2 -1
  61. package/dist/bootstrap/register-tools.d.ts.map +1 -1
  62. package/dist/bootstrap/register-tools.js +2 -1
  63. package/dist/bootstrap/register-tools.js.map +1 -1
  64. package/dist/bootstrap/run-plane.d.ts +11 -0
  65. package/dist/bootstrap/run-plane.d.ts.map +1 -1
  66. package/dist/bootstrap/run-plane.js.map +1 -1
  67. package/dist/bootstrap/synthesize-external-tool.d.ts +45 -0
  68. package/dist/bootstrap/synthesize-external-tool.d.ts.map +1 -0
  69. package/dist/bootstrap/synthesize-external-tool.js +112 -0
  70. package/dist/bootstrap/synthesize-external-tool.js.map +1 -0
  71. package/dist/bootstrap/tool-command-dispatch-types.d.ts +280 -0
  72. package/dist/bootstrap/tool-command-dispatch-types.d.ts.map +1 -0
  73. package/dist/bootstrap/tool-command-dispatch-types.js +34 -0
  74. package/dist/bootstrap/tool-command-dispatch-types.js.map +1 -0
  75. package/dist/bootstrap/tool-command-worker-config-pass.d.ts +24 -0
  76. package/dist/bootstrap/tool-command-worker-config-pass.d.ts.map +1 -0
  77. package/dist/bootstrap/tool-command-worker-config-pass.js +52 -0
  78. package/dist/bootstrap/tool-command-worker-config-pass.js.map +1 -0
  79. package/dist/bootstrap/tool-command-worker-context.d.ts +55 -0
  80. package/dist/bootstrap/tool-command-worker-context.d.ts.map +1 -0
  81. package/dist/bootstrap/tool-command-worker-context.js +163 -0
  82. package/dist/bootstrap/tool-command-worker-context.js.map +1 -0
  83. package/dist/bootstrap/tool-command-worker-entry.d.ts +66 -0
  84. package/dist/bootstrap/tool-command-worker-entry.d.ts.map +1 -0
  85. package/dist/bootstrap/tool-command-worker-entry.js +298 -0
  86. package/dist/bootstrap/tool-command-worker-entry.js.map +1 -0
  87. package/dist/bootstrap/tool-command-worker-rpc.d.ts +53 -0
  88. package/dist/bootstrap/tool-command-worker-rpc.d.ts.map +1 -0
  89. package/dist/bootstrap/tool-command-worker-rpc.js +78 -0
  90. package/dist/bootstrap/tool-command-worker-rpc.js.map +1 -0
  91. package/dist/bootstrap/tool-provenance.d.ts +85 -0
  92. package/dist/bootstrap/tool-provenance.d.ts.map +1 -0
  93. package/dist/bootstrap/tool-provenance.js +101 -0
  94. package/dist/bootstrap/tool-provenance.js.map +1 -0
  95. package/dist/cli-context.d.ts +17 -0
  96. package/dist/cli-context.d.ts.map +1 -1
  97. package/dist/cli-context.js +62 -1
  98. package/dist/cli-context.js.map +1 -1
  99. package/dist/commands/completion.d.ts.map +1 -1
  100. package/dist/commands/completion.js +3 -0
  101. package/dist/commands/completion.js.map +1 -1
  102. package/dist/commands/host-command-specs.d.ts +13 -15
  103. package/dist/commands/host-command-specs.d.ts.map +1 -1
  104. package/dist/commands/host-command-specs.js +27 -27
  105. package/dist/commands/host-command-specs.js.map +1 -1
  106. package/dist/commands/host-subcommand-groups.d.ts.map +1 -1
  107. package/dist/commands/host-subcommand-groups.js +63 -5
  108. package/dist/commands/host-subcommand-groups.js.map +1 -1
  109. package/dist/commands/internal-command-visibility.d.ts +13 -4
  110. package/dist/commands/internal-command-visibility.d.ts.map +1 -1
  111. package/dist/commands/internal-command-visibility.js +14 -5
  112. package/dist/commands/internal-command-visibility.js.map +1 -1
  113. package/dist/commands/mount-command-spec.d.ts.map +1 -1
  114. package/dist/commands/mount-command-spec.js +31 -0
  115. package/dist/commands/mount-command-spec.js.map +1 -1
  116. package/dist/commands/session-show.d.ts.map +1 -1
  117. package/dist/commands/session-show.js +4 -1
  118. package/dist/commands/session-show.js.map +1 -1
  119. package/dist/commands/tools/data-purge.js +2 -2
  120. package/dist/commands/tools/data-purge.js.map +1 -1
  121. package/dist/commands/tools/validate.js +1 -1
  122. package/dist/env/host-env-specs.d.ts.map +1 -1
  123. package/dist/env/host-env-specs.js +6 -0
  124. package/dist/env/host-env-specs.js.map +1 -1
  125. package/dist/index.js +6 -1
  126. package/dist/index.js.map +1 -1
  127. package/dist/report-compose.d.ts.map +1 -1
  128. package/dist/report-compose.js +85 -19
  129. package/dist/report-compose.js.map +1 -1
  130. package/dist/session-replay-registry.d.ts +33 -6
  131. package/dist/session-replay-registry.d.ts.map +1 -1
  132. package/dist/session-replay-registry.js +43 -6
  133. package/dist/session-replay-registry.js.map +1 -1
  134. package/dist/telemetry/profiling.d.ts +30 -0
  135. package/dist/telemetry/profiling.d.ts.map +1 -1
  136. package/dist/telemetry/profiling.js +16 -1
  137. package/dist/telemetry/profiling.js.map +1 -1
  138. package/package.json +32 -32
@@ -1 +1 @@
1
- {"version":3,"file":"register-tools-mount.js","sourceRoot":"","sources":["../../src/bootstrap/register-tools-mount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAqD,MAAM,mBAAmB,CAAC;AAE9F,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAsB,EACtB,OAAmB,EACnB,GAAmB;IAEnB,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;QACnC,IAAI,CAAC;YACH,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;QACnC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACnE,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,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MAAM,CAAC,CAAC;QACjD,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,MAAM,CAAC,IAAI,CAAC;gBACV,GAAG,EAAE,iCAAiC;gBACtC,MAAM,EAAE,gBAAgB;gBACxB,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS;gBACnC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE;gBAChD,MAAM,EAAE,YAAY,IAAI,CAAC,IAAI,sBAAsB,IAAI,CAAC,MAAM,4EAA4E;aAC3I,CAAC,CAAC;YACH,gBAAgB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;YACzC,SAAS;QACX,CAAC;QACD,gBAAgB,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC;AAED,MAAM,gBAAgB,GAAG,6CAA6C,CAAC;AAEvE;;;;GAIG;AACH,SAAS,4BAA4B,CAAC,OAAmB;IACvD,MAAM,SAAS,GAAG,CAAC,GAAe,EAAQ,EAAE;QAC1C,GAAG,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAChE,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,QAAQ;YAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC,CAAC;IACF,SAAS,CAAC,OAAO,CAAC,CAAC;IACnB,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACjD,CAAC"}
@@ -57,6 +57,7 @@ export declare function resolveRequiredBundledPackageDir(packageName: string): s
57
57
  * — mapped to `EXIT_CODES.PLUGIN_INCOMPATIBLE` (exit 5) by the CLI boundary.
58
58
  */
59
59
  export declare function registerFirstPartyTools(registry: ToolRegistry, provenance?: ToolProvenance[], manifests?: ToolPluginManifest[], packages?: readonly string[]): Promise<void>;
60
- export { admitProjectLocalTool, admitUserGlobalTool, buildToolDiscoverySources, discoverAndRegisterAuthoredTools, discoverAndRegisterToolPackages, emitInstalledLoadFailure, type AuthoredAdmission, type DiscoveryOptions, } from './register-tools-discovery.js';
60
+ export { admitProjectLocalTool, admitUserGlobalTool, discoverAndRegisterAuthoredTools, type AuthoredAdmission, } from './register-authored-tools.js';
61
+ export { buildToolDiscoverySources, discoverAndRegisterToolPackages, emitInstalledLoadFailure, type DiscoveryOptions, } from './register-tools-discovery.js';
61
62
  export { mountAllToolCommands, mountOneTool } from './register-tools-mount.js';
62
63
  //# sourceMappingURL=register-tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register-tools.d.ts","sourceRoot":"","sources":["../../src/bootstrap/register-tools.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAMH,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAK/B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAkChF;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAO5E;AAQD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,YAAY,EACtB,UAAU,GAAE,cAAc,EAAO,EACjC,SAAS,GAAE,kBAAkB,EAAO,EACpC,QAAQ,GAAE,SAAS,MAAM,EAA0B,GAClD,OAAO,CAAC,IAAI,CAAC,CAwCf;AA8DD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,gCAAgC,EAChC,+BAA+B,EAC/B,wBAAwB,EACxB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"register-tools.d.ts","sourceRoot":"","sources":["../../src/bootstrap/register-tools.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAMH,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAK/B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAkChF;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAO5E;AAQD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,YAAY,EACtB,UAAU,GAAE,cAAc,EAAO,EACjC,SAAS,GAAE,kBAAkB,EAAO,EACpC,QAAQ,GAAE,SAAS,MAAM,EAA0B,GAClD,OAAO,CAAC,IAAI,CAAC,CAwCf;AA8DD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,gCAAgC,EAChC,KAAK,iBAAiB,GACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,wBAAwB,EACxB,KAAK,gBAAgB,GACtB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
@@ -184,6 +184,7 @@ function throwBundledAdmissionFailure(packageName, report) {
184
184
  /* v8 ignore next 4 -- defensive: a failed report always carries a failed section */
185
185
  throw new PluginIncompatibleError(`bundled tool '${packageName}' failed admission for an unknown reason`, { diagnostic: 'unknown admission failure' });
186
186
  }
187
- export { admitProjectLocalTool, admitUserGlobalTool, buildToolDiscoverySources, discoverAndRegisterAuthoredTools, discoverAndRegisterToolPackages, emitInstalledLoadFailure, } from './register-tools-discovery.js';
187
+ export { admitProjectLocalTool, admitUserGlobalTool, discoverAndRegisterAuthoredTools, } from './register-authored-tools.js';
188
+ export { buildToolDiscoverySources, discoverAndRegisterToolPackages, emitInstalledLoadFailure, } from './register-tools-discovery.js';
188
189
  export { mountAllToolCommands, mountOneTool } from './register-tools-mount.js';
189
190
  //# sourceMappingURL=register-tools.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"register-tools.js","sourceRoot":"","sources":["../../src/bootstrap/register-tools.ts"],"names":[],"mappings":"AAAA,2LAA2L;AAC3L;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EACL,MAAM,EACN,uBAAuB,GAIxB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,gBAAgB,EAAwB,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAE/B,uFAAuF;AACvF,MAAM,eAAe,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEvD;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,wBAAwB,CAAC,WAAmB;IAC1D,IAAI,aAAqB,CAAC;IAC1B,IAAI,CAAC;QACH,aAAa,GAAG,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACvD,C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BAAwB,GAEzB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
@@ -72,6 +72,17 @@ export interface RunActionHooks {
72
72
  * is no transitional generic-session writer left on the launch surface.
73
73
  */
74
74
  readonly completeRun?: (result: unknown) => void;
75
+ /**
76
+ * ADR-0054 out-of-process dispatch seam. When present AND the owning tool is
77
+ * EXTERNAL-provenance, the command action calls this INSTEAD of invoking
78
+ * `spec.handler(...)` in-process — the worker imports the untrusted runtime,
79
+ * runs the handler, and this seam replays the slim result through the host
80
+ * seams. Returns `true` when it dispatched (the action skips the in-process
81
+ * path); `false`/absent when the tool is bundled (the action runs the handler
82
+ * in-process as today). Bound per-tool by `mountOneTool` with the tool's
83
+ * provenance; absent for host commands (whose lean context has no run plane).
84
+ */
85
+ readonly maybeDispatchExternal?: (commandName: string, opts: Record<string, unknown>, positionals: readonly unknown[]) => Promise<boolean>;
75
86
  }
76
87
  /**
77
88
  * The factory `buildToolCliContext` creates. Holds only stable deps; the
@@ -1 +1 @@
1
- {"version":3,"file":"run-plane.d.ts","sourceRoot":"","sources":["../../src/bootstrap/run-plane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAIL,KAAK,MAAM,EACX,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EAEjB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC7B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAIxD,oFAAoF;AACpF,MAAM,WAAW,YAAY;IAC3B,yFAAyF;IACzF,QAAQ,CAAC,YAAY,EAAE,MAAM,SAAS,GAAG,SAAS,CAAC;IACnD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;A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AO,CAAC;YACpC,oEAAoE;YACpE,2DAA2D;YAC3D,IAAI,OAAO;gBAAE,OAAO,CAAC,OAAO,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * synthesize-external-tool — build a manifest-derived synthetic {@link Tool} for
3
+ * EXTERNAL provenance, so the HOST can register + mount an external tool's
4
+ * commands WITHOUT importing its untrusted runtime (ADR-0054 M4-G capstone).
5
+ *
6
+ * After M4-C…F every host consumer of an external tool's RUNTIME hooks either
7
+ * skips external provenance (config/capabilities/scope/report/replay all gate on
8
+ * `provenanceSourceFor`) or routes the hook to a worker. The ONLY thing the host
9
+ * still needs from an external `Tool` is the command SHELL for
10
+ * `mountAllToolCommands` (`commandSpecs`) — name, description, aliases, parent,
11
+ * commonFlags, options, args, scope, output, visibility. The capstone lifts that
12
+ * shell into the static manifest ({@link ToolCommandManifest}), so the host builds
13
+ * the registry entry from the manifest ALONE.
14
+ *
15
+ * The synthetic tool is a `Tool`-shaped object so EVERY `registry.list()` consumer
16
+ * keeps working unchanged. Its differences from a real runtime are exactly the
17
+ * things the host must never touch for external provenance:
18
+ *
19
+ * - NO `extensionPoints` — the host runs no external lifecycle/capability hooks
20
+ * (M4-F). The WORKER, which imports the real runtime, has the real hooks.
21
+ * - the per-command `handler` is a fail-loud DISPATCH STUB. The host NEVER calls
22
+ * it: `maybeDispatchExternal` (mount-command-spec.ts) intercepts external
23
+ * provenance and dispatches to the worker BEFORE the handler runs. The stub is
24
+ * insurance — if a refactor ever bypassed the hook, the run fails with a clear
25
+ * message instead of silently mis-running a no-op handler in-host.
26
+ *
27
+ * The WORKER never synthesizes: it re-runs the SAME bootstrap with
28
+ * `OPENSIP_CLI_IN_TOOL_WORKER=1`, so its discovery imports the real runtime (the
29
+ * isolation boundary). See `register-tools-discovery.ts` for the host/worker gate.
30
+ */
31
+ import { defineTool, type ToolPluginManifest } from '@opensip-cli/core';
32
+ /**
33
+ * Build a manifest-derived synthetic {@link Tool} for an EXTERNAL admitted tool.
34
+ * The host registers + mounts it WITHOUT importing the tool's runtime. The
35
+ * `metadata` mirrors the runtime shape a real tool registers with (post-ADR-0048:
36
+ * `metadata.id` = stable UUID for modern tools, `metadata.name` = human key), so
37
+ * every registry/provenance/conflict matcher resolves it identically. No
38
+ * `extensionPoints` (the host runs no external hooks); each command's handler is
39
+ * a fail-loud dispatch stub.
40
+ *
41
+ * @param manifest The admitted static manifest (from `loadToolManifest` + the
42
+ * compatibility gate). Carries the command shells (ADR-0054 M4-G).
43
+ */
44
+ export declare function synthesizeExternalTool(manifest: ToolPluginManifest): ReturnType<typeof defineTool>;
45
+ //# sourceMappingURL=synthesize-external-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"synthesize-external-tool.d.ts","sourceRoot":"","sources":["../../src/bootstrap/synthesize-external-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAEL,UAAU,EAOV,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AA0D3B;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,kBAAkB,GAC3B,UAAU,CAAC,OAAO,UAAU,CAAC,CAmB/B"}
@@ -0,0 +1,112 @@
1
+ /**
2
+ * synthesize-external-tool — build a manifest-derived synthetic {@link Tool} for
3
+ * EXTERNAL provenance, so the HOST can register + mount an external tool's
4
+ * commands WITHOUT importing its untrusted runtime (ADR-0054 M4-G capstone).
5
+ *
6
+ * After M4-C…F every host consumer of an external tool's RUNTIME hooks either
7
+ * skips external provenance (config/capabilities/scope/report/replay all gate on
8
+ * `provenanceSourceFor`) or routes the hook to a worker. The ONLY thing the host
9
+ * still needs from an external `Tool` is the command SHELL for
10
+ * `mountAllToolCommands` (`commandSpecs`) — name, description, aliases, parent,
11
+ * commonFlags, options, args, scope, output, visibility. The capstone lifts that
12
+ * shell into the static manifest ({@link ToolCommandManifest}), so the host builds
13
+ * the registry entry from the manifest ALONE.
14
+ *
15
+ * The synthetic tool is a `Tool`-shaped object so EVERY `registry.list()` consumer
16
+ * keeps working unchanged. Its differences from a real runtime are exactly the
17
+ * things the host must never touch for external provenance:
18
+ *
19
+ * - NO `extensionPoints` — the host runs no external lifecycle/capability hooks
20
+ * (M4-F). The WORKER, which imports the real runtime, has the real hooks.
21
+ * - the per-command `handler` is a fail-loud DISPATCH STUB. The host NEVER calls
22
+ * it: `maybeDispatchExternal` (mount-command-spec.ts) intercepts external
23
+ * provenance and dispatches to the worker BEFORE the handler runs. The stub is
24
+ * insurance — if a refactor ever bypassed the hook, the run fails with a clear
25
+ * message instead of silently mis-running a no-op handler in-host.
26
+ *
27
+ * The WORKER never synthesizes: it re-runs the SAME bootstrap with
28
+ * `OPENSIP_CLI_IN_TOOL_WORKER=1`, so its discovery imports the real runtime (the
29
+ * isolation boundary). See `register-tools-discovery.ts` for the host/worker gate.
30
+ */
31
+ import { assertCommandSpec, defineTool, SystemError, } from '@opensip-cli/core';
32
+ /**
33
+ * The fail-loud handler every synthetic external command carries. The host never
34
+ * reaches it (the dispatch hook intercepts external provenance first), so a call
35
+ * here means a bypass bug — fail loudly rather than silently no-op in-host.
36
+ *
37
+ * @throws {SystemError} always — a synthetic external handler must never run
38
+ * in-host (the worker owns the real handler).
39
+ */
40
+ function externalDispatchStub(commandName) {
41
+ return () => {
42
+ throw new SystemError(`external tool command '${commandName}' handler was invoked in the host process; ` +
43
+ 'external commands dispatch to a worker (ADR-0054). This indicates the ' +
44
+ 'maybeDispatchExternal hook was bypassed — refusing to run untrusted code in-host.', { code: 'SYSTEM.DISPATCH.EXTERNAL_HANDLER_UNREACHABLE' });
45
+ };
46
+ }
47
+ /** A `ManifestOptionDescriptor` IS an `OptionSpec` minus `parse` — carry it verbatim. */
48
+ function manifestOptionToSpec(option) {
49
+ // The descriptor has every OptionSpec field except `parse` (the non-serializable
50
+ // coercion closure). The host mounts the option WITHOUT a parse reducer; the
51
+ // worker (with the tool's real spec) coerces in its handler.
52
+ return { ...option };
53
+ }
54
+ /**
55
+ * Build one synthetic {@link CommandSpec} from a manifest command shell. Applies
56
+ * the runtime `CommandSpec` defaults for any omitted shell field
57
+ * (`commonFlags: []`, `scope: 'project'`, `output: 'command-result'`), then
58
+ * runs it through `assertCommandSpec` so a malformed external manifest fails
59
+ * loudly at synthesize time (the same guard `defineCommand` uses).
60
+ */
61
+ function manifestCommandToSpec(cmd) {
62
+ const spec = {
63
+ name: cmd.name,
64
+ description: cmd.description,
65
+ ...(cmd.aliases === undefined ? {} : { aliases: cmd.aliases }),
66
+ ...(cmd.visibility === undefined ? {} : { visibility: cmd.visibility }),
67
+ ...(cmd.parent === undefined ? {} : { parent: cmd.parent }),
68
+ commonFlags: cmd.commonFlags ?? [],
69
+ ...(cmd.options === undefined ? {} : { options: cmd.options.map(manifestOptionToSpec) }),
70
+ ...(cmd.args === undefined ? {} : { args: cmd.args }),
71
+ scope: cmd.scope ?? 'project',
72
+ output: cmd.output ?? 'command-result',
73
+ ...(cmd.rawStreamReason === undefined ? {} : { rawStreamReason: cmd.rawStreamReason }),
74
+ handler: externalDispatchStub(cmd.name),
75
+ };
76
+ // Fail loud on a malformed external manifest shell (mirrors defineCommand).
77
+ assertCommandSpec(spec);
78
+ return spec;
79
+ }
80
+ /**
81
+ * Build a manifest-derived synthetic {@link Tool} for an EXTERNAL admitted tool.
82
+ * The host registers + mounts it WITHOUT importing the tool's runtime. The
83
+ * `metadata` mirrors the runtime shape a real tool registers with (post-ADR-0048:
84
+ * `metadata.id` = stable UUID for modern tools, `metadata.name` = human key), so
85
+ * every registry/provenance/conflict matcher resolves it identically. No
86
+ * `extensionPoints` (the host runs no external hooks); each command's handler is
87
+ * a fail-loud dispatch stub.
88
+ *
89
+ * @param manifest The admitted static manifest (from `loadToolManifest` + the
90
+ * compatibility gate). Carries the command shells (ADR-0054 M4-G).
91
+ */
92
+ export function synthesizeExternalTool(manifest) {
93
+ return defineTool({
94
+ metadata: {
95
+ id: manifest.stableId ?? manifest.id,
96
+ name: manifest.id,
97
+ version: manifest.version,
98
+ // The manifest has no tool-level description (name/version derive from
99
+ // package.json); a display-only fallback — never asserted by the drift
100
+ // guard (which the host skips for synthetic external tools) or any matcher.
101
+ description: `${manifest.id} (external tool)`,
102
+ },
103
+ commandSpecs: manifest.commands.map(manifestCommandToSpec),
104
+ // ADR-0054 M4-G: carry the serializable plugin layout so the host mounts the
105
+ // domain-bound `<tool> plugin …` extension-pack group + drives `init`
106
+ // scaffolding identically to a bundled tool — without importing the runtime.
107
+ // A pack-supporting external tool declares it in its manifest; omitted ⇒ no
108
+ // `plugin` subgroup (the tool hosts no extension packs).
109
+ ...(manifest.pluginLayout === undefined ? {} : { pluginLayout: manifest.pluginLayout }),
110
+ });
111
+ }
112
+ //# sourceMappingURL=synthesize-external-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"synthesize-external-tool.js","sourceRoot":"","sources":["../../src/bootstrap/synthesize-external-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,WAAW,GAOZ,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;GAOG;AACH,SAAS,oBAAoB,CAC3B,WAAmB;IAEnB,OAAO,GAAG,EAAE;QACV,MAAM,IAAI,WAAW,CACnB,0BAA0B,WAAW,6CAA6C;YAChF,wEAAwE;YACxE,mFAAmF,EACrF,EAAE,IAAI,EAAE,8CAA8C,EAAE,CACzD,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,yFAAyF;AACzF,SAAS,oBAAoB,CAAC,MAAgC;IAC5D,iFAAiF;IACjF,6EAA6E;IAC7E,6DAA6D;IAC7D,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC;AACvB,CAAC;AAED;;;;;;GAMG;AACH,SAAS,qBAAqB,CAAC,G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CAAC;IACxB,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,sBAAsB,CACpC,QAA4B;IAE5B,OAAO,UAAU,CAAC;QAChB,QAAQ,EAAE;YACR,EAAE,EAAE,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE;YACpC,IAAI,EAAE,QAAQ,CAAC,EAAE;YACjB,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,uEAAuE;YACvE,uEAAuE;YACvE,4EAA4E;YAC5E,WAAW,EAAE,GAAG,QAAQ,CAAC,EAAE,kBAAkB;SAC9C;QACD,YAAY,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,qBAAqB,CAAC;QAC1D,6EAA6E;QAC7E,sEAAsE;QACtE,6EAA6E;QAC7E,4EAA4E;QAC5E,yDAAyD;QACzD,GAAG,CAAC,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,QAAQ,CAAC,YAAY,EAAE,CAAC;KACxF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,280 @@
1
+ /**
2
+ * tool-command-dispatch-types — the serializable wire contract for the
3
+ * out-of-process external-tool command dispatch plane (ADR-0054, increments
4
+ * M4-B / M4-C).
5
+ *
6
+ * These are the ONLY shapes that cross the host↔worker IPC boundary for a
7
+ * dispatched external-tool command. Everything here MUST be structured-clone
8
+ * safe (the transport forks with `serialization: 'advanced'`): plain data only,
9
+ * no functions, no class instances, no live handles (datastore, registries,
10
+ * Commander). The host marshals the spec → temp file → fork; the worker imports
11
+ * the tool runtime, runs the handler against a worker-side `ToolCliContext`
12
+ * shim, and posts back a {@link ToolCommandResult} (the final-result-return
13
+ * subset of the seam→RPC mapping in ADR-0054's Build Plan).
14
+ *
15
+ * Two transport strategies cross this boundary (ADR-0054 M4-C):
16
+ * - final-result-return (FRR): the worker accumulates the value and returns it
17
+ * ONCE in {@link ToolCommandResult} (`render` / `emitJson` / `emitEnvelope`
18
+ * / `emitRaw` / `emitError` / `setExitCode`); the host replays it after the
19
+ * worker resolves.
20
+ * - host-RPC-request (RPC): a streamed upcall ({@link HostRpcRequest}) — the
21
+ * worker BLOCKS on a reply ({@link RpcReply}) because the effect touches the
22
+ * datastore / network / filesystem / process exit, which only the host may
23
+ * do. The host performs the privileged effect through the REAL host
24
+ * `ToolCliContext` and replies. This is the M4-C addition over the M4-D FRR
25
+ * slice: `deliverSignals` / `writeSarif` / the four baseline seams /
26
+ * `toolState.*` / `hostPlanes.*` / `maybeOpenReport` / `getExitCode` now
27
+ * upcall instead of failing loud.
28
+ *
29
+ * Live-view seams (`registerLiveView` / `renderLive`) stay host-side-only and
30
+ * still fail loud in the worker — Ink/TTY rendering cannot leave the host
31
+ * (ADR-0054 M4-C mapping table; documented as a later increment).
32
+ */
33
+ import type { CommandOutputMode, ToolSessionContribution, ToolSource } from '@opensip-cli/core';
34
+ /**
35
+ * The request the host writes to a temp JSON spec file and forks the worker
36
+ * with (`fork(workerEntry, [specPath])`). The worker re-resolves + re-imports
37
+ * the tool runtime from `toolPackageDir` IN THE WORKER process — this is the
38
+ * isolation move: untrusted external runtime code never loads in the host.
39
+ *
40
+ * `correlation` rides the child env (`OPENSIP_*`), not this spec, symmetric to
41
+ * the graph fork path; it is intentionally absent here.
42
+ */
43
+ export interface ToolCommandWorkerSpec {
44
+ /** The tool's stable id (UUID) — for diagnostics + matching the imported runtime. */
45
+ readonly toolId: string;
46
+ /** The package directory the worker `importToolRuntime`s the runtime from. */
47
+ readonly toolPackageDir: string;
48
+ /**
49
+ * The tool's provenance source. External only — bundled tools never fork
50
+ * (they are the trusted computing base and stay in-process; ADR-0054 trust
51
+ * tiers). The worker passes this to `hostRuntimeImportPolicyFor`.
52
+ */
53
+ readonly source: Exclude<ToolSource, 'bundled'>;
54
+ /**
55
+ * Which of the tool's `commandSpecs` (by `name`) to run. Present for a COMMAND
56
+ * dispatch ({@link ToolCommandWorkerSpec} with no `hook`). Mutually exclusive
57
+ * with `hook`: a hook-mode spec runs a lifecycle hook, not a command.
58
+ */
59
+ readonly commandName?: string;
60
+ /**
61
+ * ADR-0054 M4-F: run a tool LIFECYCLE HOOK in the worker (instead of a command
62
+ * handler) and return its plain-data result in {@link ToolCommandResult.hookResult}.
63
+ * The host gathers an EXTERNAL tool's report/replay data this way so the hook's
64
+ * untrusted runtime code never executes in the host process. Mutually exclusive
65
+ * with `commandName`.
66
+ *
67
+ * - `collectReportData` — runs `extensionPoints.collectReportData(workerScope)`;
68
+ * `hookResult` is the contributed `Record<string, unknown>`.
69
+ * - `sessionReplay` — runs `extensionPoints.sessionReplay.replaySession(hookArg)`;
70
+ * `hookArg` is the stored {@link ToolSessionRecord}; `hookResult` is the
71
+ * `ToolSessionReplay`.
72
+ */
73
+ readonly hook?: 'collectReportData' | 'sessionReplay';
74
+ /** The serializable argument the hook needs (e.g. the stored session row for `sessionReplay`). */
75
+ readonly hookArg?: unknown;
76
+ /** The parsed Commander options for this invocation (serializable). Empty for hook-mode. */
77
+ readonly opts: Record<string, unknown>;
78
+ /** The trailing positionals (`_args`) for this invocation (serializable). Empty for hook-mode. */
79
+ readonly positionals: readonly unknown[];
80
+ /**
81
+ * The tool's RAW config namespace block (coarse-validated by the host pre-fork;
82
+ * ADR-0054 M4-E Config two-pass). The worker runs the tool's REAL Zod
83
+ * `ToolConfigDeclaration` against this AFTER load — the deep, authoritative
84
+ * semantic pass that the host (which must not import the tool's Zod) cannot do.
85
+ * `undefined` when the document declares no block for the tool's namespace (no
86
+ * deep validation needed). Plain serializable data.
87
+ */
88
+ readonly config?: unknown;
89
+ }
90
+ /**
91
+ * A structured error category for a dispatched-command failure, so the host can
92
+ * triage why a worker run failed (mirrors the transport's `failureClass`
93
+ * taxonomy but for the COMMAND layer, not the fork layer).
94
+ *
95
+ * - `tool-handler-throw` — the handler threw inside the worker.
96
+ * - `unsupported-seam` — the handler called a seam the worker cannot
97
+ * marshal (the live-view seams; Ink/TTY rendering
98
+ * cannot leave the host). The host-RPC seams are no
99
+ * longer in this class — they upcall (M4-C).
100
+ * - `host-rpc-failed` — a host-RPC upcall faulted host-side (the error
101
+ * crossed back as a structured {@link RpcReply}).
102
+ * - `command-not-found` — `commandName` did not match any `commandSpecs`.
103
+ * - `runtime-load-failed` — `importToolRuntime` failed in the worker.
104
+ * - `bad-spec` — the spec file was missing or unparseable.
105
+ * - `config-invalid` — the tool's REAL Zod (the worker deep pass)
106
+ * rejected its config namespace block (ADR-0054 M4-E
107
+ * Config two-pass). The host maps this to the SAME
108
+ * typed config error + exit code as the host coarse
109
+ * pass, so the UX is identical regardless of which
110
+ * pass caught the failure.
111
+ */
112
+ export type ToolCommandFailureClass = 'tool-handler-throw' | 'unsupported-seam' | 'host-rpc-failed' | 'command-not-found' | 'runtime-load-failed' | 'bad-spec' | 'config-invalid';
113
+ /**
114
+ * The final-result-return payload the worker posts back over IPC once the
115
+ * command handler resolves. The host replays it through the REAL host
116
+ * `ToolCliContext` seams so the output contract stays byte-identical to the
117
+ * in-process path. Every field is optional: a handler that only set an exit code
118
+ * (or returned void) yields a sparse result.
119
+ *
120
+ * `output` mirrors the command's declared {@link CommandOutputMode} so the host
121
+ * knows which dispatch arm to drive.
122
+ */
123
+ export interface ToolCommandResult {
124
+ readonly output: CommandOutputMode;
125
+ /** `ctx.render(...)` payload (CommandResult shape) — replayed via the host render seam. */
126
+ readonly render?: unknown;
127
+ /** `ctx.emitEnvelope(...)` payload (SignalEnvelope) — replayed via the host envelope seam. */
128
+ readonly envelope?: unknown;
129
+ /** `ctx.emitJson(...)` payload — replayed via the host JSON seam. */
130
+ readonly json?: unknown;
131
+ /** `ctx.emitRaw(...)` payload — replayed via the host raw seam. */
132
+ readonly raw?: unknown;
133
+ /** `ctx.emitError(...)` detail — replayed via the host error seam. */
134
+ readonly error?: {
135
+ readonly message: string;
136
+ readonly exitCode: number;
137
+ readonly suggestion?: string;
138
+ readonly code?: string;
139
+ };
140
+ /** The last `ctx.setExitCode(...)` value (last-write-wins). */
141
+ readonly exitCode?: number;
142
+ /**
143
+ * The session contribution a run-producing handler RETURNED (the `session` leg
144
+ * of its `ToolRunCompletion`). The host persists it after the worker resolves —
145
+ * the host owns run timing (host-owned-run-timing); the worker never writes the
146
+ * generic session row. `undefined` for a handler that produced no session.
147
+ */
148
+ readonly session?: ToolSessionContribution;
149
+ /**
150
+ * ADR-0054 M4-F: the plain-data result of a lifecycle HOOK run worker-side
151
+ * (when the spec set `hook`). For `collectReportData` it is the contributed
152
+ * `Record<string, unknown>`; for `sessionReplay` it is the `ToolSessionReplay`.
153
+ * The host merges/uses it without ever executing the external hook in-process.
154
+ * `undefined` for a normal command dispatch.
155
+ */
156
+ readonly hookResult?: unknown;
157
+ /**
158
+ * The handler's RAW return value for the RETURN-VALUED output modes
159
+ * (`command-result` / `signal-envelope`). For these modes the in-process path's
160
+ * single output-dispatch seam (`dispatchOutput`) routes the handler's RETURN —
161
+ * `--json` short-circuit vs. human `render` for `command-result`, envelope-vs-
162
+ * render for `signal-envelope` — so the worker must carry it back UNROUTED and
163
+ * the supervisor replays it through the SAME `dispatchOutput`, keeping the
164
+ * external (worker) and in-process output byte-identical (ADR-0027 parity). The
165
+ * FRR seam fields above (`render`/`json`/…) capture EXPLICIT `ctx.*` emitter
166
+ * calls; `raw-stream`/`live-view` produce no return payload. `undefined` when
167
+ * the handler returned nothing routable (e.g. a `raw-stream` command, or a void
168
+ * return).
169
+ */
170
+ readonly returned?: unknown;
171
+ }
172
+ /**
173
+ * The three datastore-backed host planes reachable via `ctx.hostPlanes.*`. A
174
+ * generic `hostPlane` upcall names the plane + method + serializable args so the
175
+ * host can dispatch to the real plane impl without a dedicated request variant
176
+ * per method (the planes carry several opaque-record methods each; one generic
177
+ * variant keeps this contract small and forward-compatible).
178
+ */
179
+ export type HostPlaneKind = 'governance' | 'audit' | 'entitlements';
180
+ /** The serializable subset of `deliverSignals`'s opts (no functions/handles). */
181
+ export interface DeliverSignalsOpts {
182
+ readonly cwd: string;
183
+ readonly reportTo?: string;
184
+ readonly apiKey?: string;
185
+ readonly runFailed?: boolean;
186
+ }
187
+ /**
188
+ * One host-RPC upcall, WITHOUT the correlation id — the shape the worker shim
189
+ * builds and the host switch consumes. Discriminated by `seam`; each variant's
190
+ * payload mirrors the arguments of the matching `ToolCliContext` seam (the
191
+ * envelope/opts/payloads are all plain-data on those seams already).
192
+ *
193
+ * Kept as a standalone union (rather than `Omit<HostRpcRequest, 'rpcId'>`)
194
+ * because `Omit` does not distribute over the `{ rpcId } & union` intersection
195
+ * — it would collapse to only the common keys.
196
+ */
197
+ export type HostRpcCall = {
198
+ readonly seam: 'deliverSignals';
199
+ readonly envelope: unknown;
200
+ readonly opts: DeliverSignalsOpts;
201
+ } | {
202
+ readonly seam: 'writeSarif';
203
+ readonly envelope: unknown;
204
+ readonly path: string;
205
+ } | {
206
+ readonly seam: 'saveBaseline';
207
+ readonly tool: string;
208
+ readonly envelope: unknown;
209
+ } | {
210
+ readonly seam: 'compareBaseline';
211
+ readonly tool: string;
212
+ readonly envelope: unknown;
213
+ } | {
214
+ readonly seam: 'exportBaselineSarif';
215
+ readonly tool: string;
216
+ readonly path: string;
217
+ } | {
218
+ readonly seam: 'exportBaselineFingerprints';
219
+ readonly tool: string;
220
+ readonly path: string;
221
+ } | {
222
+ readonly seam: 'toolState.get';
223
+ readonly tool: string;
224
+ readonly key: string;
225
+ } | {
226
+ readonly seam: 'toolState.put';
227
+ readonly tool: string;
228
+ readonly key: string;
229
+ readonly payload: unknown;
230
+ } | {
231
+ readonly seam: 'toolState.delete';
232
+ readonly tool: string;
233
+ readonly key: string;
234
+ } | {
235
+ readonly seam: 'toolState.list';
236
+ readonly tool: string;
237
+ } | {
238
+ readonly seam: 'maybeOpenReport';
239
+ readonly opts: {
240
+ readonly openRequested: boolean;
241
+ readonly jsonOutput: boolean;
242
+ };
243
+ } | {
244
+ readonly seam: 'getExitCode';
245
+ } | {
246
+ readonly seam: 'hostPlane';
247
+ readonly plane: HostPlaneKind;
248
+ readonly method: string;
249
+ readonly args: readonly unknown[];
250
+ };
251
+ /**
252
+ * One host-RPC upcall as it crosses the wire: a {@link HostRpcCall} stamped with
253
+ * the monotonic `rpcId` that correlates the matching {@link RpcReply}.
254
+ */
255
+ export type HostRpcRequest = HostRpcCall & {
256
+ readonly rpcId: number;
257
+ };
258
+ /**
259
+ * The host's reply to one {@link HostRpcRequest} (parent → child). Discriminated
260
+ * by `ok`: a resolved value crosses as `{ ok: true, value }`; a host-side fault
261
+ * crosses as `{ ok: false, error }` (a STRUCTURED rejection the worker shim
262
+ * re-throws so the handler sees it as a normal thrown error — never a host
263
+ * crash, never a silent no-op).
264
+ */
265
+ export type RpcReply = {
266
+ readonly kind: 'rpc-reply';
267
+ readonly rpcId: number;
268
+ readonly ok: true;
269
+ readonly value: unknown;
270
+ } | {
271
+ readonly kind: 'rpc-reply';
272
+ readonly rpcId: number;
273
+ readonly ok: false;
274
+ readonly error: {
275
+ readonly message: string;
276
+ readonly code?: string;
277
+ readonly stack?: string;
278
+ };
279
+ };
280
+ //# sourceMappingURL=tool-command-dispatch-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-command-dispatch-types.d.ts","sourceRoot":"","sources":["../../src/bootstrap/tool-command-dispatch-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEhG;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IACpC,qFAAqF;IACrF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAChD;;;;OAIG;IACH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AAI,EAAE,SAAS,OAAO,EAAE,CAAC;CACnC,CAAC;AAEN;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAChB;IACE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/F,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * tool-command-dispatch-types — the serializable wire contract for the
3
+ * out-of-process external-tool command dispatch plane (ADR-0054, increments
4
+ * M4-B / M4-C).
5
+ *
6
+ * These are the ONLY shapes that cross the host↔worker IPC boundary for a
7
+ * dispatched external-tool command. Everything here MUST be structured-clone
8
+ * safe (the transport forks with `serialization: 'advanced'`): plain data only,
9
+ * no functions, no class instances, no live handles (datastore, registries,
10
+ * Commander). The host marshals the spec → temp file → fork; the worker imports
11
+ * the tool runtime, runs the handler against a worker-side `ToolCliContext`
12
+ * shim, and posts back a {@link ToolCommandResult} (the final-result-return
13
+ * subset of the seam→RPC mapping in ADR-0054's Build Plan).
14
+ *
15
+ * Two transport strategies cross this boundary (ADR-0054 M4-C):
16
+ * - final-result-return (FRR): the worker accumulates the value and returns it
17
+ * ONCE in {@link ToolCommandResult} (`render` / `emitJson` / `emitEnvelope`
18
+ * / `emitRaw` / `emitError` / `setExitCode`); the host replays it after the
19
+ * worker resolves.
20
+ * - host-RPC-request (RPC): a streamed upcall ({@link HostRpcRequest}) — the
21
+ * worker BLOCKS on a reply ({@link RpcReply}) because the effect touches the
22
+ * datastore / network / filesystem / process exit, which only the host may
23
+ * do. The host performs the privileged effect through the REAL host
24
+ * `ToolCliContext` and replies. This is the M4-C addition over the M4-D FRR
25
+ * slice: `deliverSignals` / `writeSarif` / the four baseline seams /
26
+ * `toolState.*` / `hostPlanes.*` / `maybeOpenReport` / `getExitCode` now
27
+ * upcall instead of failing loud.
28
+ *
29
+ * Live-view seams (`registerLiveView` / `renderLive`) stay host-side-only and
30
+ * still fail loud in the worker — Ink/TTY rendering cannot leave the host
31
+ * (ADR-0054 M4-C mapping table; documented as a later increment).
32
+ */
33
+ export {};
34
+ //# sourceMappingURL=tool-command-dispatch-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-command-dispatch-types.js","sourceRoot":"","sources":["../../src/bootstrap/tool-command-dispatch-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG"}