omp-fabric 1.20.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +6 -2
  3. package/dist/agents/manager.d.ts +4 -0
  4. package/dist/agents/manager.d.ts.map +1 -1
  5. package/dist/chunks/{chunk-BAHZYDFD.js → chunk-3FYXXYAG.js} +67 -1
  6. package/dist/chunks/{chunk-BAHZYDFD.js.map → chunk-3FYXXYAG.js.map} +2 -2
  7. package/dist/chunks/{chunk-PUGB6NGD.js → chunk-3GMSYFLT.js} +3 -3
  8. package/dist/chunks/{chunk-LWD4273F.js → chunk-5SSQD7TW.js} +52 -2
  9. package/dist/chunks/{chunk-LWD4273F.js.map → chunk-5SSQD7TW.js.map} +2 -2
  10. package/dist/chunks/{chunk-5FYSQRJ4.js → chunk-GUJNTA7Z.js} +22 -3
  11. package/dist/chunks/chunk-GUJNTA7Z.js.map +7 -0
  12. package/dist/chunks/{chunk-NP5U3BJZ.js → chunk-P4GPBAQS.js} +166 -17
  13. package/dist/chunks/chunk-P4GPBAQS.js.map +7 -0
  14. package/dist/chunks/{chunk-RAWYAQQJ.js → chunk-RGAGLSFG.js} +171 -1
  15. package/dist/chunks/chunk-RGAGLSFG.js.map +7 -0
  16. package/dist/config.d.ts +12 -0
  17. package/dist/config.d.ts.map +1 -1
  18. package/dist/execution-service.d.ts +2 -0
  19. package/dist/execution-service.d.ts.map +1 -1
  20. package/dist/fabric-runtime-state.d.ts +3 -0
  21. package/dist/fabric-runtime-state.d.ts.map +1 -1
  22. package/dist/fabric-runtime-state.js +390 -9
  23. package/dist/fabric-runtime-state.js.map +4 -4
  24. package/dist/fabric-state.d.ts +1 -0
  25. package/dist/fabric-state.d.ts.map +1 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +175 -20
  28. package/dist/index.js.map +4 -4
  29. package/dist/judgment/gates/delegation.d.ts +31 -0
  30. package/dist/judgment/gates/delegation.d.ts.map +1 -0
  31. package/dist/judgment/gates/skills.d.ts +20 -0
  32. package/dist/judgment/gates/skills.d.ts.map +1 -0
  33. package/dist/judgment/gates/tool-exec.d.ts +31 -0
  34. package/dist/judgment/gates/tool-exec.d.ts.map +1 -0
  35. package/dist/judgment/gates/tool-output.d.ts +40 -0
  36. package/dist/judgment/gates/tool-output.d.ts.map +1 -0
  37. package/dist/residency/host.js +3 -3
  38. package/dist/residency/omp-entry.js +3 -3
  39. package/dist/runtime/core-override-guest-types.js +1 -1
  40. package/dist/runtime/guest-types.d.ts +1 -1
  41. package/dist/runtime/guest-types.d.ts.map +1 -1
  42. package/dist/runtime/guest-types.js +1 -1
  43. package/dist/runtime/node-process-runtime.js +1 -1
  44. package/dist/runtime/quickjs-runtime.d.ts +1 -1
  45. package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
  46. package/dist/runtime/quickjs-runtime.js +1 -1
  47. package/dist/ui/dashboard.js +1 -1
  48. package/dist/ui/fabric-render.d.ts.map +1 -1
  49. package/dist/ui/settings.d.ts.map +1 -1
  50. package/dist/ui/settings.js +37 -3
  51. package/dist/ui/settings.js.map +2 -2
  52. package/docs/configuration.md +4 -0
  53. package/docs/judgment.md +45 -0
  54. package/package.json +2 -1
  55. package/dist/chunks/chunk-5FYSQRJ4.js.map +0 -7
  56. package/dist/chunks/chunk-NP5U3BJZ.js.map +0 -7
  57. package/dist/chunks/chunk-RAWYAQQJ.js.map +0 -7
  58. /package/dist/chunks/{chunk-PUGB6NGD.js.map → chunk-3GMSYFLT.js.map} +0 -0
@@ -4333,6 +4333,31 @@ var renderFabricWriteArgumentPreview = (input, theme, invalidate) => {
4333
4333
  var shortIdOf = (value) => typeof value === "string" ? value.slice(0, 8) : void 0;
4334
4334
  var countOf = (result) => Array.isArray(result) ? String(result.length) : "";
4335
4335
  var providerCallDetail = (provider, tool, args, result, preview, previewHeadline) => {
4336
+ if (provider === "judgment") {
4337
+ if (previewHeadline) return previewHeadline;
4338
+ const questions = args.questions;
4339
+ let qSummary = "";
4340
+ if (questions && typeof questions === "object" && !Array.isArray(questions)) {
4341
+ const keys = Object.keys(questions);
4342
+ if (keys.length === 1) {
4343
+ const first = questions[keys[0]];
4344
+ const instruction = first && typeof first === "object" && !Array.isArray(first) && typeof first.instructions === "string" ? first.instructions : "";
4345
+ qSummary = instruction ? truncateOneLine(instruction, 44) : "1 question";
4346
+ } else if (keys.length > 1) {
4347
+ qSummary = `${keys.length} questions`;
4348
+ }
4349
+ }
4350
+ let backend = "";
4351
+ if (result && typeof result === "object" && !Array.isArray(result)) {
4352
+ const resObj = result;
4353
+ if (typeof resObj.backend === "string") {
4354
+ backend = resObj.backend.split("/").pop() ?? resObj.backend;
4355
+ } else if (resObj.ok === false && typeof resObj.reason === "string") {
4356
+ backend = resObj.reason;
4357
+ }
4358
+ }
4359
+ return [qSummary, backend].filter(Boolean).join(" \xB7 ");
4360
+ }
4336
4361
  if (provider === "agents") {
4337
4362
  if (previewHeadline) return previewHeadline;
4338
4363
  const name = argString2(args, "name");
@@ -4454,7 +4479,8 @@ var nestedCallTitleText = (audit, theme, invalidate, core) => {
4454
4479
  const ref = audit.ref;
4455
4480
  const provider = audit.provider ?? ref.split(".")[0] ?? ref;
4456
4481
  const tool = audit.tool ?? ref.split(".")[1] ?? ref;
4457
- const title = theme.fg("toolTitle", theme.bold(tool));
4482
+ const toolLabel = provider === "judgment" && tool === "ask" ? "judgment.ask" : tool;
4483
+ const title = theme.fg("toolTitle", theme.bold(toolLabel));
4458
4484
  const args = audit.args ?? {};
4459
4485
  const providerDetail = providerCallDetail(
4460
4486
  provider,
@@ -4792,6 +4818,30 @@ function nestedCallBody(audit) {
4792
4818
  const obj = result;
4793
4819
  if (typeof obj.output === "string") return obj.output;
4794
4820
  if (typeof obj.text === "string") return obj.text;
4821
+ if (audit.provider === "judgment" || audit.ref === "judgment.ask") {
4822
+ if (obj.ok === true && obj.answers && typeof obj.answers === "object" && !Array.isArray(obj.answers)) {
4823
+ const lines = [];
4824
+ if (typeof obj.backend === "string") lines.push(`backend: ${obj.backend}`);
4825
+ for (const [key, answer] of Object.entries(obj.answers)) {
4826
+ if (answer && typeof answer === "object" && !Array.isArray(answer)) {
4827
+ const ans = answer;
4828
+ if (ans.type === "bool" && typeof ans.bool === "number") {
4829
+ lines.push(`\u2022 ${key}: ${ans.bool} (${ans.bool >= 0.5 ? "yes" : "no"})`);
4830
+ } else if (ans.type === "choice" && typeof ans.choice === "string") {
4831
+ const conf = typeof ans.confidence === "number" ? ` (${Math.round(ans.confidence * 100)}%)` : "";
4832
+ lines.push(`\u2022 ${key}: ${ans.choice}${conf}`);
4833
+ } else if (ans.type === "score" && typeof ans.score === "number") {
4834
+ lines.push(`\u2022 ${key}: score ${ans.score}`);
4835
+ } else {
4836
+ lines.push(`\u2022 ${key}: ${JSON.stringify(ans)}`);
4837
+ }
4838
+ }
4839
+ }
4840
+ if (lines.length > 0) return lines.join("\n");
4841
+ } else if (obj.ok === false) {
4842
+ return `rejected: ${obj.reason ?? "failed"}${obj.detail ? ` (${obj.detail})` : ""}`;
4843
+ }
4844
+ }
4795
4845
  }
4796
4846
  return void 0;
4797
4847
  }
@@ -4980,4 +5030,4 @@ export {
4980
5030
  formatJsonAsYaml,
4981
5031
  formatFabricValue
4982
5032
  };
4983
- //# sourceMappingURL=chunk-LWD4273F.js.map
5033
+ //# sourceMappingURL=chunk-5SSQD7TW.js.map