niceeval 0.13.0 → 0.13.2-canary.35

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 (172) hide show
  1. package/INDEX.md +1 -0
  2. package/README.md +9 -10
  3. package/README.zh.md +9 -10
  4. package/dist/agents/ai-sdk.cjs.map +1 -1
  5. package/dist/agents/ai-sdk.d.cts +1 -1
  6. package/dist/agents/ai-sdk.d.mts +1 -1
  7. package/dist/agents/ai-sdk.d.ts +1 -1
  8. package/dist/agents/coding-cli-versions.cjs +10 -1
  9. package/dist/agents/coding-cli-versions.cjs.map +1 -1
  10. package/dist/agents/coding-cli-versions.d.cts +8 -3
  11. package/dist/agents/coding-cli-versions.d.mts +8 -3
  12. package/dist/agents/coding-cli-versions.d.ts +8 -3
  13. package/dist/agents/coding-cli-versions.js +18 -12
  14. package/dist/agents/deepseek-harness.cjs +103 -0
  15. package/dist/agents/deepseek-harness.cjs.map +1 -0
  16. package/dist/agents/deepseek-harness.d.cts +12 -0
  17. package/dist/agents/deepseek-harness.d.mts +12 -0
  18. package/dist/agents/deepseek-harness.d.ts +12 -0
  19. package/dist/agents/deepseek-harness.js +7 -0
  20. package/dist/agents/deepseek-harness.js.map +1 -0
  21. package/dist/agents/index.cjs +5 -1
  22. package/dist/agents/index.cjs.map +1 -1
  23. package/dist/agents/index.d.cts +4 -0
  24. package/dist/agents/index.d.mts +4 -0
  25. package/dist/agents/index.d.ts +4 -0
  26. package/dist/agents/index.js +54 -50
  27. package/dist/agents/index.mjs +54 -50
  28. package/dist/agents/omp.cjs +170 -0
  29. package/dist/agents/omp.cjs.map +1 -0
  30. package/dist/agents/omp.d.cts +14 -0
  31. package/dist/agents/omp.d.mts +14 -0
  32. package/dist/agents/omp.d.ts +14 -0
  33. package/dist/agents/omp.js +7 -0
  34. package/dist/agents/omp.js.map +1 -0
  35. package/dist/agents/types.cjs.map +1 -1
  36. package/dist/agents/types.d.cts +2 -2
  37. package/dist/agents/types.d.mts +2 -2
  38. package/dist/agents/types.d.ts +2 -2
  39. package/dist/analysis/api.cjs +9 -1
  40. package/dist/analysis/api.cjs.map +1 -1
  41. package/dist/analysis/api.d.cts +21 -0
  42. package/dist/analysis/api.d.mts +21 -0
  43. package/dist/analysis/api.d.ts +21 -0
  44. package/dist/analysis/api.js +8 -6
  45. package/dist/cli.cjs +10 -1
  46. package/dist/cli.cjs.map +1 -1
  47. package/dist/i18n/en.cjs +7 -2
  48. package/dist/i18n/en.cjs.map +1 -1
  49. package/dist/i18n/en.d.cts +7 -2
  50. package/dist/i18n/en.d.mts +7 -2
  51. package/dist/i18n/en.d.ts +7 -2
  52. package/dist/o11y/parsers/hermes.cjs +1 -1
  53. package/dist/o11y/parsers/hermes.cjs.map +1 -1
  54. package/dist/report/built-in/analysis-values.cjs +21 -5
  55. package/dist/report/built-in/analysis-values.cjs.map +1 -1
  56. package/dist/report/built-in/analysis-values.d.cts +11 -9
  57. package/dist/report/built-in/analysis-values.d.mts +11 -9
  58. package/dist/report/built-in/analysis-values.d.ts +11 -9
  59. package/dist/report/built-in/overview.cjs +1 -0
  60. package/dist/report/built-in/overview.cjs.map +1 -1
  61. package/dist/report/built-in/result-components.cjs +58 -12
  62. package/dist/report/built-in/result-components.cjs.map +1 -1
  63. package/dist/report/built-in/result-components.d.cts +15 -0
  64. package/dist/report/built-in/result-components.d.mts +15 -0
  65. package/dist/report/built-in/result-components.d.ts +15 -0
  66. package/dist/report/built-in/run-membership-overview.cjs +100 -4
  67. package/dist/report/built-in/run-membership-overview.cjs.map +1 -1
  68. package/dist/report/built-in/standard.cjs +1 -0
  69. package/dist/report/built-in/standard.cjs.map +1 -1
  70. package/dist/report/built-in/standard.d.cts +1 -0
  71. package/dist/report/built-in/standard.d.mts +1 -0
  72. package/dist/report/built-in/standard.d.ts +1 -0
  73. package/dist/report/components/entity-lists/compute.cjs +40 -3
  74. package/dist/report/components/entity-lists/compute.cjs.map +1 -1
  75. package/dist/report/components/entity-lists/compute.d.cts +8 -6
  76. package/dist/report/components/entity-lists/compute.d.mts +8 -6
  77. package/dist/report/components/entity-lists/compute.d.ts +8 -6
  78. package/dist/report/components/entity-lists/content.cjs +31 -6
  79. package/dist/report/components/entity-lists/content.cjs.map +1 -1
  80. package/dist/report/components/entity-lists/index.cjs +3 -2
  81. package/dist/report/components/entity-lists/index.cjs.map +1 -1
  82. package/dist/report/components/entity-lists/index.d.cts +1 -1
  83. package/dist/report/components/entity-lists/index.d.mts +1 -1
  84. package/dist/report/components/entity-lists/index.d.ts +1 -1
  85. package/dist/report/definition/cell.cjs +3 -0
  86. package/dist/report/definition/cell.cjs.map +1 -1
  87. package/dist/report/definition/cell.d.cts +2 -0
  88. package/dist/report/definition/cell.d.mts +2 -0
  89. package/dist/report/definition/cell.d.ts +2 -0
  90. package/dist/report/definition/primitives.cjs +9 -2
  91. package/dist/report/definition/primitives.cjs.map +1 -1
  92. package/dist/report/execution/machine.cjs +1 -1
  93. package/dist/report/execution/machine.cjs.map +1 -1
  94. package/dist/report/host/execute.cjs +14 -4
  95. package/dist/report/host/execute.cjs.map +1 -1
  96. package/dist/report/host/execute.d.cts +5 -0
  97. package/dist/report/host/execute.d.mts +5 -0
  98. package/dist/report/host/execute.d.ts +5 -0
  99. package/dist/report/host/from-record.cjs +6 -1
  100. package/dist/report/host/from-record.cjs.map +1 -1
  101. package/dist/report/host/from-record.d.cts +5 -0
  102. package/dist/report/host/from-record.d.mts +5 -0
  103. package/dist/report/host/from-record.d.ts +5 -0
  104. package/dist/report/runtime/resolved-page.cjs +16 -6
  105. package/dist/report/runtime/resolved-page.cjs.map +1 -1
  106. package/dist/report/runtime/resolved-page.d.cts +3 -0
  107. package/dist/report/runtime/resolved-page.d.mts +3 -0
  108. package/dist/report/runtime/resolved-page.d.ts +3 -0
  109. package/dist/report/runtime/text.cjs +1 -0
  110. package/dist/report/runtime/text.cjs.map +1 -1
  111. package/dist/report/runtime/text.d.cts +4 -0
  112. package/dist/report/runtime/text.d.mts +4 -0
  113. package/dist/report/runtime/text.d.ts +4 -0
  114. package/dist/runner/feedback/human.cjs +180 -16
  115. package/dist/runner/feedback/human.cjs.map +1 -1
  116. package/dist/runner/run.cjs +43 -0
  117. package/dist/runner/run.cjs.map +1 -1
  118. package/dist/sample/capability.cjs +93 -0
  119. package/dist/sample/capability.cjs.map +1 -1
  120. package/dist/sample/capability.d.cts +3 -1
  121. package/dist/sample/capability.d.mts +3 -1
  122. package/dist/sample/capability.d.ts +3 -1
  123. package/dist/sample/capability.js +8 -6
  124. package/dist/sandbox/docker-agent-image.cjs +5 -1
  125. package/dist/sandbox/docker-agent-image.cjs.map +1 -1
  126. package/dist/sandbox/docker-agent-image.d.cts +2 -0
  127. package/dist/sandbox/docker-agent-image.d.mts +2 -0
  128. package/dist/sandbox/docker-agent-image.d.ts +2 -0
  129. package/dist/sandbox/docker-agent-image.js +14 -10
  130. package/dist/sandbox/index.cjs +4 -2
  131. package/dist/sandbox/index.cjs.map +1 -1
  132. package/dist/sandbox/index.d.cts +1 -1
  133. package/dist/sandbox/index.d.mts +1 -1
  134. package/dist/sandbox/index.d.ts +1 -1
  135. package/dist/sandbox/index.js +120 -116
  136. package/dist/sandbox/index.mjs +120 -116
  137. package/docs-site/images/hitl-handshake-zh.svg +3 -3
  138. package/docs-site/zh/examples/integrations/ai-sdk-v7.mdx +3 -3
  139. package/docs-site/zh/examples/integrations/claude-sdk.mdx +3 -3
  140. package/docs-site/zh/examples/integrations/codex-sdk.mdx +5 -5
  141. package/docs-site/zh/examples/integrations/langgraph.mdx +3 -3
  142. package/docs-site/zh/examples/integrations/pi-sdk.mdx +5 -5
  143. package/docs-site/zh/explanation/adapter.mdx +5 -5
  144. package/docs-site/zh/explanation/assert.mdx +1 -1
  145. package/docs-site/zh/explanation/drive.mdx +3 -1
  146. package/docs-site/zh/explanation/evals.mdx +3 -1
  147. package/docs-site/zh/explanation/hitl.mdx +7 -7
  148. package/docs-site/zh/explanation/runner.mdx +2 -2
  149. package/docs-site/zh/index.mdx +2 -2
  150. package/docs-site/zh/reference/builtin-agents.mdx +4 -4
  151. package/docs-site/zh/reference/capabilities.mdx +1 -1
  152. package/docs-site/zh/reference/cli.mdx +14 -14
  153. package/docs-site/zh/reference/events.mdx +11 -11
  154. package/docs-site/zh/reference/official-adapters.mdx +1 -1
  155. package/docs-site/zh/reference/results-data.mdx +6 -0
  156. package/docs-site/zh/troubleshooting/debugging.mdx +2 -2
  157. package/docs-site/zh/tutorials/agent-feedback-loop.mdx +2 -2
  158. package/docs-site/zh/tutorials/ci-integration.mdx +1 -1
  159. package/docs-site/zh/tutorials/connect-your-agent.mdx +2 -2
  160. package/docs-site/zh/tutorials/custom-reports.mdx +4 -4
  161. package/docs-site/zh/tutorials/deploy-report-site.mdx +3 -3
  162. package/docs-site/zh/tutorials/docker-in-docker.mdx +3 -0
  163. package/docs-site/zh/tutorials/experiments.mdx +2 -2
  164. package/docs-site/zh/tutorials/handle-execution-failures.mdx +1 -1
  165. package/docs-site/zh/tutorials/install-custom-sandbox-agent.mdx +1 -1
  166. package/docs-site/zh/tutorials/nixos-managed-dind.mdx +160 -0
  167. package/docs-site/zh/tutorials/publish-report.mdx +4 -4
  168. package/docs-site/zh/tutorials/reporters.mdx +1 -1
  169. package/docs-site/zh/tutorials/rerun-and-cache.mdx +16 -0
  170. package/docs-site/zh/tutorials/viewing-results.mdx +28 -10
  171. package/docs-site/zh/tutorials/write-send.mdx +7 -6
  172. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepseek-harness.js","sourceRoot":"","sources":["deepseek-harness.ts"],"names":[],"mappings":";;AA+BA,oDA2EC;AA1GD,mCAAgC;AAChC,4CAAkD;AAClD,wCAAgD;AAEhD,kEAA8D;AAC9D,2CAAqC;AACrC,mDAA+E;AAC/E,qEAAiH;AACjH,MAAM,qBAAqB,GAAqB;IAC5C,MAAM,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,0DAA0D,EAAE;IACrG,OAAO,EAAE,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oB,EAAE,CAAC;gBACpD,CAAC;gBACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;aAC1B,CAAC,CAAC;QACP,CAAC,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC;KAC/B,CAAC,CAAC;AACP,CAAC;AACD,kBAAe,oBAAoB,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport { defineSandboxAgent } from \"../define.ts\";\nimport { getEnv, requireEnv } from \"../util.ts\";\nimport type { Agent, EvidenceCoverage, StreamEvent } from \"../types.ts\";\nimport { makeSendFailure } from \"../context/send-failures.ts\";\nimport { shared } from \"./shared.ts\";\nimport { createNpmCliInstaller, resolveAgentBinEffect } from \"./npm-staged.ts\";\nimport { AGENT_BASELINE_RECIPE_REVISION, DEFAULT_DEEPSEEK_HARNESS_CLI_VERSION, } from \"./coding-cli-versions.ts\";\nconst DSH_EVIDENCE_COVERAGE: EvidenceCoverage = {\n events: { status: \"unavailable\", reason: \"DSH headless mode exposes only the final assistant text.\" },\n actions: { status: \"unavailable\", reason: \"DSH headless mode does not expose tool lifecycle events.\" },\n messages: { status: \"complete\" },\n usage: { status: \"unavailable\", reason: \"DSH headless mode does not expose token usage.\" },\n status: { status: \"complete\" },\n data: { status: \"unavailable\", reason: \"DSH headless mode does not expose a separate Turn.data value.\" },\n};\nexport interface DeepSeekHarnessConfig {\n /** DeepSeek-compatible API key. Defaults to DSH_API_KEY, then DEEPSEEK_API_KEY. */\n apiKey?: string;\n /** DeepSeek-compatible endpoint. Defaults to DSH_BASE_URL, then DEEPSEEK_BASE_URL. */\n baseUrl?: string;\n /** Exact npm version of `@deepseek-ai/dsh`. */\n version?: string;\n}\nfunction resolveApiKey(config?: DeepSeekHarnessConfig): string {\n return config?.apiKey ?? getEnv(\"DSH_API_KEY\") ?? requireEnv(\"DEEPSEEK_API_KEY\");\n}\nfunction resolveBaseUrl(config?: DeepSeekHarnessConfig): string | undefined {\n return config?.baseUrl ?? getEnv(\"DSH_BASE_URL\") ?? getEnv(\"DEEPSEEK_BASE_URL\");\n}\n/** DeepSeek Harness sandbox adapter backed by its one-shot headless profile. */\nexport function deepSeekHarnessAgent(config?: DeepSeekHarnessConfig): Agent {\n const version = config?.version ?? DEFAULT_DEEPSEEK_HARNESS_CLI_VERSION;\n const install = createNpmCliInstaller({\n identity: {\n agent: \"deepseek-harness\",\n version,\n revision: String(AGENT_BASELINE_RECIPE_REVISION[\"deepseek-harness\"]),\n },\n packageName: \"@deepseek-ai/dsh\",\n bin: \"dsh\",\n });\n const homes = new Map<string, string>();\n return defineSandboxAgent({\n name: \"deepseek-harness\",\n evidenceCoverage: DSH_EVIDENCE_COVERAGE,\n ensure: install.ensure,\n installers: [install.installer],\n async setup(sb, ctx) {\n const homeResult = await sb.runShell('test -n \"$HOME\" && printf \"%s\" \"$HOME\"');\n const home = homeResult.stdout.trim();\n if (homeResult.exitCode !== 0 || !home.startsWith(\"/\")) {\n throw new Error(\"DeepSeek Harness setup requires an absolute sandbox HOME directory\");\n }\n const dshHome = `${home}/.niceeval-dsh`;\n homes.set(sb.sandboxId, dshHome);\n const settings = {\n \"agent-default-model\": {\n provider: \"deepseek-official\",\n model: ctx.model ?? \"deepseek-v4-flash\",\n },\n permission: {\n defaultPreset: \"danger-full-access\",\n },\n };\n await shared.writeFile(sb, `${dshHome}/settings.yaml`, JSON.stringify(settings, null, 2));\n },\n send: (input, ctx) => Effect.runPromise(Effect.scoped(Effect.gen(function* () {\n const dshBin = yield* resolveAgentBinEffect(ctx.sandbox, \"dsh\");\n return yield* Effect.tryPromise({\n try: async (signal) => {\n const apiKey = resolveApiKey(config);\n const dshHome = homes.get(ctx.sandbox.sandboxId);\n if (!dshHome)\n throw new Error(\"DeepSeek Harness setup state is unavailable\");\n const env: globalThis.Record<string, string> = {\n DEEPSEEK_API_KEY: apiKey,\n DSH_HOME: dshHome,\n ...ctx.telemetry?.env,\n };\n const baseUrl = resolveBaseUrl(config);\n if (baseUrl)\n env.DEEPSEEK_BASE_URL = baseUrl;\n const res = await ctx.sandbox.runCommand(dshBin, [\"--profile\", \"headless\", input.text], {\n env,\n sensitiveValues: [apiKey],\n stream: true,\n signal,\n });\n const text = res.stdout.trim();\n if (res.exitCode !== 0 || !text) {\n throw makeSendFailure({\n acceptance: \"unknown\",\n message: res.exitCode !== 0\n ? shared.diagnoseFailure(res, [], undefined)\n : \"DeepSeek Harness exited successfully without a final assistant message.\",\n process: res,\n });\n }\n const events: StreamEvent[] = [{ type: \"message\", role: \"assistant\", text }];\n return { events, status: \"completed\" as const };\n },\n catch: (cause) => cause,\n });\n })), { signal: ctx.signal }),\n });\n}\nexport default deepSeekHarnessAgent;\n"]}
@@ -0,0 +1,12 @@
1
+ import type { Agent } from "../types.cjs";
2
+ export interface DeepSeekHarnessConfig {
3
+ /** DeepSeek-compatible API key. Defaults to DSH_API_KEY, then DEEPSEEK_API_KEY. */
4
+ apiKey?: string;
5
+ /** DeepSeek-compatible endpoint. Defaults to DSH_BASE_URL, then DEEPSEEK_BASE_URL. */
6
+ baseUrl?: string;
7
+ /** Exact npm version of `@deepseek-ai/dsh`. */
8
+ version?: string;
9
+ }
10
+ /** DeepSeek Harness sandbox adapter backed by its one-shot headless profile. */
11
+ export declare function deepSeekHarnessAgent(config?: DeepSeekHarnessConfig): Agent;
12
+ export default deepSeekHarnessAgent;
@@ -0,0 +1,12 @@
1
+ import type { Agent } from "../types.mjs";
2
+ export interface DeepSeekHarnessConfig {
3
+ /** DeepSeek-compatible API key. Defaults to DSH_API_KEY, then DEEPSEEK_API_KEY. */
4
+ apiKey?: string;
5
+ /** DeepSeek-compatible endpoint. Defaults to DSH_BASE_URL, then DEEPSEEK_BASE_URL. */
6
+ baseUrl?: string;
7
+ /** Exact npm version of `@deepseek-ai/dsh`. */
8
+ version?: string;
9
+ }
10
+ /** DeepSeek Harness sandbox adapter backed by its one-shot headless profile. */
11
+ export declare function deepSeekHarnessAgent(config?: DeepSeekHarnessConfig): Agent;
12
+ export default deepSeekHarnessAgent;
@@ -0,0 +1,12 @@
1
+ import type { Agent } from "../types.js";
2
+ export interface DeepSeekHarnessConfig {
3
+ /** DeepSeek-compatible API key. Defaults to DSH_API_KEY, then DEEPSEEK_API_KEY. */
4
+ apiKey?: string;
5
+ /** DeepSeek-compatible endpoint. Defaults to DSH_BASE_URL, then DEEPSEEK_BASE_URL. */
6
+ baseUrl?: string;
7
+ /** Exact npm version of `@deepseek-ai/dsh`. */
8
+ version?: string;
9
+ }
10
+ /** DeepSeek Harness sandbox adapter backed by its one-shot headless profile. */
11
+ export declare function deepSeekHarnessAgent(config?: DeepSeekHarnessConfig): Agent;
12
+ export default deepSeekHarnessAgent;
@@ -0,0 +1,7 @@
1
+ import { createRequire as __niceevalCreateRequire } from "node:module";
2
+ const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
3
+ const __niceevalCanonical = __niceevalRequire("./deepseek-harness.cjs");
4
+ const __niceevalExport0 = __niceevalCanonical["deepSeekHarnessAgent"];
5
+ export { __niceevalExport0 as deepSeekHarnessAgent };
6
+ export default __niceevalCanonical.default;
7
+ //# sourceMappingURL=deepseek-harness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepseek-harness.js","sources":[],"names":[],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.openClawAgent = exports.hermesAgent = exports.openCodeAgent = exports.bubAgent = exports.codexAgent = exports.claudeCodeAgent = exports.BUILTIN_AGENTS = exports.aiSdkAgent = exports.turnFromAiSdk = exports.deltaStream = exports.driveFrameStream = exports.createLangGraphEventStream = exports.createCodexThreadEventStream = exports.createPiAgentEventStream = exports.createClaudeSdkEventStream = exports.sseJsonFrames = exports.turnFromResponses = exports.turnFromChatCompletion = exports.responsesEvidenceCoverage = exports.chatCompletionEvidenceCoverage = exports.uiMessageStreamAgent = exports.mapCodexSpans = exports.heuristicTag = exports.tagSpan = exports.normalizeExternalCause = exports.externalCauseText = exports.externalCauseMessageChain = exports.sendFailureText = exports.makeSendFailure = exports.opaqueCommandProjection = exports.notCommandProjection = exports.normalizeLogicalCommand = exports.commandProjection = exports.LOGICAL_COMMAND_NORMALIZER = exports.completeEvidenceCoverage = exports.agentBin = exports.createNpmCliInstaller = exports.shared = exports.createSessionSlot = exports.defineSandboxAgent = exports.defineAgent = void 0;
3
+ exports.deepSeekHarnessAgent = exports.ompAgent = exports.openClawAgent = exports.hermesAgent = exports.openCodeAgent = exports.bubAgent = exports.codexAgent = exports.claudeCodeAgent = exports.BUILTIN_AGENTS = exports.aiSdkAgent = exports.turnFromAiSdk = exports.deltaStream = exports.driveFrameStream = exports.createLangGraphEventStream = exports.createCodexThreadEventStream = exports.createPiAgentEventStream = exports.createClaudeSdkEventStream = exports.sseJsonFrames = exports.turnFromResponses = exports.turnFromChatCompletion = exports.responsesEvidenceCoverage = exports.chatCompletionEvidenceCoverage = exports.uiMessageStreamAgent = exports.mapCodexSpans = exports.heuristicTag = exports.tagSpan = exports.normalizeExternalCause = exports.externalCauseText = exports.externalCauseMessageChain = exports.sendFailureText = exports.makeSendFailure = exports.opaqueCommandProjection = exports.notCommandProjection = exports.normalizeLogicalCommand = exports.commandProjection = exports.LOGICAL_COMMAND_NORMALIZER = exports.completeEvidenceCoverage = exports.agentBin = exports.createNpmCliInstaller = exports.shared = exports.createSessionSlot = exports.defineSandboxAgent = exports.defineAgent = void 0;
4
4
  // niceeval/adapter 公开导出:「连到哪个 AI」相关的类型 + 内置 adapter + 自定义 adapter 的入口。
5
5
  var define_ts_1 = require("../define.cjs");
6
6
  Object.defineProperty(exports, "defineAgent", { enumerable: true, get: function () { return define_ts_1.defineAgent; } });
@@ -89,4 +89,8 @@ var hermes_ts_1 = require("./hermes.cjs");
89
89
  Object.defineProperty(exports, "hermesAgent", { enumerable: true, get: function () { return hermes_ts_1.hermesAgent; } });
90
90
  var openclaw_ts_1 = require("./openclaw.cjs");
91
91
  Object.defineProperty(exports, "openClawAgent", { enumerable: true, get: function () { return openclaw_ts_1.openClawAgent; } });
92
+ var omp_ts_1 = require("./omp.cjs");
93
+ Object.defineProperty(exports, "ompAgent", { enumerable: true, get: function () { return omp_ts_1.ompAgent; } });
94
+ var deepseek_harness_ts_1 = require("./deepseek-harness.cjs");
95
+ Object.defineProperty(exports, "deepSeekHarnessAgent", { enumerable: true, get: function () { return deepseek_harness_ts_1.deepSeekHarnessAgent; } });
92
96
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,uEAAuE;AACvE,0CAA+D;AAAtD,wGAAA,WAAW,OAAA;AAAE,+GAAA,kBAAkB,OAAA;AACxC,qDAAsD;AAA7C,oHAAA,iBAAiB,OAAA;AAC1B,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AAEf,iDAAkE;AAAzD,sHAAA,qBAAqB,OAAA;AAAE,yGAAA,QAAQ,OAAA;AAExC,8DAA8D;AAC9D,iEAAiE;AACjE,yDAAqE;AAA5D,uHAAA,wBAAwB,OAAA;AAEjC,qDAAqD;AACrD,2EAA2E;AAC3E,uDAAuD;AACvD,uEAAuK;AAA9J,mIAAA,0BAA0B,OAAA;AAAE,0HAAA,iBAAiB,OAAA;AAAE,gIAAA,uBAAuB,OAAA;AAAE,6HAAA,oBAAoB,OAAA;AAAE,gIAAA,uBAAuB,OAAA;AAE9H,+DAA+D;AAC/D,qDAAqD;AACrD,wCAAwC;AACxC,qDAAqD;AACrD,gEAA+E;AAAtE,mHAAA,eAAe,OAAA;AAAE,mHAAA,eAAe,OAAA;AAGzC,iEAAmH;AAA1G,8HAAA,yBAAyB,OAAA;AAAE,sHAAA,iBAAiB,OAAA;AAAE,2HAAA,sBAAsB,OAAA;AAE7E,iEAAiE;AACjE,mEAAmE;AACnE,2DAA2D;AAC3D,yEAAyE;AACzE,0DAAkE;AAAzD,uGAAA,OAAO,OAAA;AAAE,4GAAA,YAAY,OAAA;AAE9B,0DAA8D;AAArD,yGAAA,aAAa,OAAA;AACtB,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAE7B,qDAAqD;AACrD,yBAAyB;AACzB,uDAA2I;AAAlI,kIAAA,8BAA8B,OAAA;AAAE,6HAAA,yBAAyB,OAAA;AAAE,0HAAA,sBAAsB,OAAA;AAAE,qHAAA,iBAAiB,OAAA;AAE7G,0DAA0D;AAC1D,mDAAqI;AAA5H,+GAAA,aAAa,OAAA;AAAE,4HAAA,0BAA0B,OAAA;AAAE,0HAAA,wBAAwB,OAAA;AAAE,8HAAA,4BAA4B,OAAA;AAE1G,2DAA2D;AAC3D,+CAA4D;AAAnD,0HAAA,0BAA0B,OAAA;AAEnC,6EAA6E;AAC7E,qDAAqD;AACrD,iDAAiD;AACjD,+DAA+D;AAC/D,+CAA+D;AAAtD,gHAAA,gBAAgB,OAAA;AAAE,2GAAA,WAAW,OAAA;AAEtC,mEAAmE;AACnE,yDAAyD;AACzD,yCAAwD;AAA/C,0GAAA,aAAa,OAAA;AAAE,uGAAA,UAAU,OAAA;AAElC,2CAA8C;AAArC,4GAAA,cAAc,OAAA;AACvB,mDAAmD;AAA1C,iHAAA,eAAe,OAAA;AACxB,uCAAwC;AAA/B,sGAAA,UAAU,OAAA;AACnB,mCAAoC;AAA3B,kGAAA,QAAQ,OAAA;AACjB,6CAA8C;AAArC,4GAAA,aAAa,OAAA;AACtB,yCAA0C;AAAjC,wGAAA,WAAW,OAAA;AACpB,6CAA8C;AAArC,4GAAA,aAAa,OAAA","sourcesContent":["// niceeval/adapter 公开导出:「连到哪个 AI」相关的类型 + 内置 adapter + 自定义 adapter 的入口。\nexport { defineAgent, defineSandboxAgent } from \"../define.ts\";\nexport { createSessionSlot } from \"./session-slot.ts\";\nexport { shared } from \"./shared.ts\";\nexport type { Shared } from \"./shared.ts\";\nexport { createNpmCliInstaller, agentBin } from \"./npm-staged.ts\";\nexport type { NpmCliInstallerOptions } from \"./npm-staged.ts\";\n// 证据覆盖声明:官方 SDK 适配器声明全通道 complete 用 completeEvidenceCoverage;\n// 手写映射按实际情况声明(见 docs/feature/adapters/architecture/evidence.md)。\nexport { completeEvidenceCoverage } from \"../assertions/coverage.ts\";\nexport type { EvidenceCoverageStatus, EvidenceCoverageEntry, EvidenceCoverage, TurnEvidenceCoverage, } from \"../types.ts\";\n// tool operation 的 command 分类只能由 Adapter 根据原生协议事实产生。\n// structured argv 走 commandProjection() 与同一 logical-command/v1 normalizer;\n// 无法安全取得 argv 时显式 opaque,确认不是 command 时显式 not-command。\nexport { LOGICAL_COMMAND_NORMALIZER, commandProjection, normalizeLogicalCommand, notCommandProjection, opaqueCommandProjection, } from \"../o11y/command-projection.ts\";\nexport type { CommandProjection, LogicalCommandInvocation, LogicalCommandNormalizer, OriginalCommandInvocation, OriginalCommandOpaqueReason, } from \"../o11y/types.ts\";\n// 执行失败分类:`Agent.classifySendFailure` 认的结构化 envelope 与同源摘要。两轴词表\n// (FailureClass / FailureScope)与包根导出的是同一个形状——adapter\n// 作者与 eval 作者各自的入口拿到同一份类型。判据、分类链与重试执行体见\n// docs/feature/error-classification/architecture.md。\nexport { makeSendFailure, sendFailureText } from \"../context/send-failures.ts\";\nexport type { SendFailure, SendFailureClassifier } from \"../context/send-failures.ts\";\nexport type { FailureClass, FailureScope } from \"../shared/failure-class.ts\";\nexport { externalCauseMessageChain, externalCauseText, normalizeExternalCause } from \"../shared/external-cause.ts\";\nexport type { ExternalCause, ExternalCauseFact, ExternalCauseLink } from \"../shared/external-cause.ts\";\n// span → canonical GenAI 归一(只服务瀑布图,不喂断言)。私有埋点写自己的 spanMapper 时用:\n// tagSpan 把判定写回 span(原属性只增不改),heuristicTag 是通用兜底判定;mapCodexSpans 是\n// 现成的参考实现(无侵入接 codex 后端时直接声明 `spanMapper: mapCodexSpans`)。\n// 映射目标(什么属性亮起瀑布图的什么)见 docs-site/zh/tutorials/connect-otel.mdx「瀑布图画得准不准」。\nexport { tagSpan, heuristicTag } from \"../o11y/otlp/canonical.ts\";\nexport type { SpanTag } from \"../o11y/otlp/canonical.ts\";\nexport { mapCodexSpans } from \"../o11y/otlp/mappers/codex.ts\";\nexport { uiMessageStreamAgent } from \"./ui-message-stream.ts\";\nexport type { UiMessageStreamAgentOptions, UIMessageLike, UIMessagePartLike } from \"./ui-message-stream.ts\";\n// 两种 OpenAI 响应形状(不限于 OpenAI 官方,任何声明兼容这两种协议形状的服务都能用)的\n// 官方转换器:整段响应 → Turn,零映射。\nexport { chatCompletionEvidenceCoverage, responsesEvidenceCoverage, turnFromChatCompletion, turnFromResponses, } from \"./openai-compat.ts\";\nexport type { ChatCompletionLike, ChatCompletionCustomToolCallLike, ChatCompletionFunctionToolCallLike, ChatCompletionMessageLike, ChatCompletionToolCallLike, ChatCompletionUnknownToolCallLike, ChatCompletionUsageLike, ResponseFunctionCallItemLike, ResponseLike, ResponseMessageItemLike, ResponseOutputItemLike, ResponseOutputTextLike, ResponseUsageLike, } from \"./openai-compat.ts\";\n// SDK 原生事件流 → 标准事件的官方转换器(无侵入 adapter 只剩传输粘合)+ 通用 SSE 读帧器。\nexport { sseJsonFrames, createClaudeSdkEventStream, createPiAgentEventStream, createCodexThreadEventStream } from \"./sdk-streams.ts\";\nexport type { SseFrameCursor, ClaudeSdkMessageLike, ClaudeSdkStream, PiAgentEventLike, PiAgentStream, CodexThreadEventLike, CodexThreadStream, } from \"./sdk-streams.ts\";\n// LangGraph 官方事件流转换器(不绑定 transport,不提供 langGraphAgent 工厂)。\nexport { createLangGraphEventStream } from \"./langgraph.ts\";\nexport type { LangGraphEventLike, LangGraphContentBlockLike, LangGraphStream } from \"./langgraph.ts\";\n// 通用「拼装方式」件:逐帧驱动循环、逐 token/参数增量累加器。见 docs-site/zh/tutorials/write-send.mdx——\n// 这些和任何具体协议无关,自己写 adapter 时优先拿这些拼,只有 transport(怎么发)与\n// 「帧类型 → 操作」这张映射表才是真正要手写的。会话续接与 HITL 停轮现场不再是可选件,\n// 而是 ctx.session(AgentSession)本身的 typed slot 与 id/capture 存取器。\nexport { driveFrameStream, deltaStream } from \"./streaming.ts\";\nexport type { FrameReducer, FrameHook, DeltaOp, DeltaStreamSpec } from \"./streaming.ts\";\n// tracing 管线的内置实现 aiSdkOtel() 在 `niceeval/adapter/otel`(独立子路径,不从这里\n// re-export):OTel 三件套是可选 peer 依赖,只有 import 那个入口的项目才需要安装。\nexport { turnFromAiSdk, aiSdkAgent } from \"./ai-sdk.ts\";\nexport type { AiSdkAgentOptions, AiSdkGenerateContext, AiSdkResultLike, AiSdkStepLike, AiSdkTelemetrySettings, AiSdkToolCallLike, AiSdkToolResultLike, AiSdkTracing, AiSdkTurn, AiSdkTurnTelemetry, AiSdkUsageLike, } from \"./ai-sdk.ts\";\nexport { BUILTIN_AGENTS } from \"./builtin.ts\";\nexport { claudeCodeAgent } from \"./claude-code.ts\";\nexport { codexAgent } from \"./codex.ts\";\nexport { bubAgent } from \"./bub.ts\";\nexport { openCodeAgent } from \"./opencode.ts\";\nexport { hermesAgent } from \"./hermes.ts\";\nexport { openClawAgent } from \"./openclaw.ts\";\nexport type { ClaudeCodeConfig, ClaudeCodePluginSpec } from \"./claude-code.ts\";\nexport type { CodexConfig, CodexPluginSpec } from \"./codex.ts\";\nexport type { BubConfig, PythonPluginSpec } from \"./bub.ts\";\nexport type { OpenCodeConfig } from \"./opencode.ts\";\nexport type { HermesConfig } from \"./hermes.ts\";\nexport type { OpenClawConfig } from \"./openclaw.ts\";\nexport type { Agent, AgentContext, AgentIdentity, AgentInstallMode, AgentArtifactPlatform, AgentStagedArtifact, AgentEnsureOutcome, AgentEnsure, AgentInstaller, AgentArtifactContext, AgentInstallContext, StagedAgentInstallContext, DirectAgent, DirectAgentDef, DirectAgentSetup, DirectAgentTeardown, AgentSession, SessionSlot, AgentSetup, AgentSetupManifest, AgentSetupSkill, AgentTeardown, AgentTracing, SpanMapper, Telemetry, SandboxAgentDef, SandboxAgent, SandboxAgentContext, SandboxAgentSetupContext, McpServer, SkillSpec, } from \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OAAA;AAAE,4HAAA,0BAA0B,OAAA;AAAE,0HAAA,wBAAwB,OAAA;AAAE,8HAAA,4BAA4B,OAAA;AAE1G,2DAA2D;AAC3D,+CAA4D;AAAnD,0HAAA,0BAA0B,OAAA;AAEnC,6EAA6E;AAC7E,qDAAqD;AACrD,iDAAiD;AACjD,+DAA+D;AAC/D,+CAA+D;AAAtD,gHAAA,gBAAgB,OAAA;AAAE,2GAAA,WAAW,OAAA;AAEtC,mEAAmE;AACnE,yDAAyD;AACzD,yCAAwD;AAA/C,0GAAA,aAAa,OAAA;AAAE,uGAAA,UAAU,OAAA;AAElC,2CAA8C;AAArC,4GAAA,cAAc,OAAA;AACvB,mDAAmD;AAA1C,iHAAA,eAAe,OAAA;AACxB,uCAAwC;AAA/B,sGAAA,UAAU,OAAA;AACnB,mCAAoC;AAA3B,kGAAA,QAAQ,OAAA;AACjB,6CAA8C;AAArC,4GAAA,aAAa,OAAA;AACtB,yCAA0C;AAAjC,wGAAA,WAAW,OAAA;AACpB,6CAA8C;AAArC,4GAAA,aAAa,OAAA;AACtB,mCAAoC;AAA3B,kGAAA,QAAQ,OAAA;AACjB,6DAA6D;AAApD,2HAAA,oBAAoB,OAAA","sourcesContent":["// niceeval/adapter 公开导出:「连到哪个 AI」相关的类型 + 内置 adapter + 自定义 adapter 的入口。\nexport { defineAgent, defineSandboxAgent } from \"../define.ts\";\nexport { createSessionSlot } from \"./session-slot.ts\";\nexport { shared } from \"./shared.ts\";\nexport type { Shared } from \"./shared.ts\";\nexport { createNpmCliInstaller, agentBin } from \"./npm-staged.ts\";\nexport type { NpmCliInstallerOptions } from \"./npm-staged.ts\";\n// 证据覆盖声明:官方 SDK 适配器声明全通道 complete 用 completeEvidenceCoverage;\n// 手写映射按实际情况声明(见 docs/feature/adapters/architecture/evidence.md)。\nexport { completeEvidenceCoverage } from \"../assertions/coverage.ts\";\nexport type { EvidenceCoverageStatus, EvidenceCoverageEntry, EvidenceCoverage, TurnEvidenceCoverage, } from \"../types.ts\";\n// tool operation 的 command 分类只能由 Adapter 根据原生协议事实产生。\n// structured argv 走 commandProjection() 与同一 logical-command/v1 normalizer;\n// 无法安全取得 argv 时显式 opaque,确认不是 command 时显式 not-command。\nexport { LOGICAL_COMMAND_NORMALIZER, commandProjection, normalizeLogicalCommand, notCommandProjection, opaqueCommandProjection, } from \"../o11y/command-projection.ts\";\nexport type { CommandProjection, LogicalCommandInvocation, LogicalCommandNormalizer, OriginalCommandInvocation, OriginalCommandOpaqueReason, } from \"../o11y/types.ts\";\n// 执行失败分类:`Agent.classifySendFailure` 认的结构化 envelope 与同源摘要。两轴词表\n// (FailureClass / FailureScope)与包根导出的是同一个形状——adapter\n// 作者与 eval 作者各自的入口拿到同一份类型。判据、分类链与重试执行体见\n// docs/feature/error-classification/architecture.md。\nexport { makeSendFailure, sendFailureText } from \"../context/send-failures.ts\";\nexport type { SendFailure, SendFailureClassifier } from \"../context/send-failures.ts\";\nexport type { FailureClass, FailureScope } from \"../shared/failure-class.ts\";\nexport { externalCauseMessageChain, externalCauseText, normalizeExternalCause } from \"../shared/external-cause.ts\";\nexport type { ExternalCause, ExternalCauseFact, ExternalCauseLink } from \"../shared/external-cause.ts\";\n// span → canonical GenAI 归一(只服务瀑布图,不喂断言)。私有埋点写自己的 spanMapper 时用:\n// tagSpan 把判定写回 span(原属性只增不改),heuristicTag 是通用兜底判定;mapCodexSpans 是\n// 现成的参考实现(无侵入接 codex 后端时直接声明 `spanMapper: mapCodexSpans`)。\n// 映射目标(什么属性亮起瀑布图的什么)见 docs-site/zh/tutorials/connect-otel.mdx「瀑布图画得准不准」。\nexport { tagSpan, heuristicTag } from \"../o11y/otlp/canonical.ts\";\nexport type { SpanTag } from \"../o11y/otlp/canonical.ts\";\nexport { mapCodexSpans } from \"../o11y/otlp/mappers/codex.ts\";\nexport { uiMessageStreamAgent } from \"./ui-message-stream.ts\";\nexport type { UiMessageStreamAgentOptions, UIMessageLike, UIMessagePartLike } from \"./ui-message-stream.ts\";\n// 两种 OpenAI 响应形状(不限于 OpenAI 官方,任何声明兼容这两种协议形状的服务都能用)的\n// 官方转换器:整段响应 → Turn,零映射。\nexport { chatCompletionEvidenceCoverage, responsesEvidenceCoverage, turnFromChatCompletion, turnFromResponses, } from \"./openai-compat.ts\";\nexport type { ChatCompletionLike, ChatCompletionCustomToolCallLike, ChatCompletionFunctionToolCallLike, ChatCompletionMessageLike, ChatCompletionToolCallLike, ChatCompletionUnknownToolCallLike, ChatCompletionUsageLike, ResponseFunctionCallItemLike, ResponseLike, ResponseMessageItemLike, ResponseOutputItemLike, ResponseOutputTextLike, ResponseUsageLike, } from \"./openai-compat.ts\";\n// SDK 原生事件流 → 标准事件的官方转换器(无侵入 adapter 只剩传输粘合)+ 通用 SSE 读帧器。\nexport { sseJsonFrames, createClaudeSdkEventStream, createPiAgentEventStream, createCodexThreadEventStream } from \"./sdk-streams.ts\";\nexport type { SseFrameCursor, ClaudeSdkMessageLike, ClaudeSdkStream, PiAgentEventLike, PiAgentStream, CodexThreadEventLike, CodexThreadStream, } from \"./sdk-streams.ts\";\n// LangGraph 官方事件流转换器(不绑定 transport,不提供 langGraphAgent 工厂)。\nexport { createLangGraphEventStream } from \"./langgraph.ts\";\nexport type { LangGraphEventLike, LangGraphContentBlockLike, LangGraphStream } from \"./langgraph.ts\";\n// 通用「拼装方式」件:逐帧驱动循环、逐 token/参数增量累加器。见 docs-site/zh/tutorials/write-send.mdx——\n// 这些和任何具体协议无关,自己写 adapter 时优先拿这些拼,只有 transport(怎么发)与\n// 「帧类型 → 操作」这张映射表才是真正要手写的。会话续接与 HITL 停轮现场不再是可选件,\n// 而是 ctx.session(AgentSession)本身的 typed slot 与 id/capture 存取器。\nexport { driveFrameStream, deltaStream } from \"./streaming.ts\";\nexport type { FrameReducer, FrameHook, DeltaOp, DeltaStreamSpec } from \"./streaming.ts\";\n// tracing 管线的内置实现 aiSdkOtel() 在 `niceeval/adapter/otel`(独立子路径,不从这里\n// re-export):OTel 三件套是可选 peer 依赖,只有 import 那个入口的项目才需要安装。\nexport { turnFromAiSdk, aiSdkAgent } from \"./ai-sdk.ts\";\nexport type { AiSdkAgentOptions, AiSdkGenerateContext, AiSdkResultLike, AiSdkStepLike, AiSdkTelemetrySettings, AiSdkToolCallLike, AiSdkToolResultLike, AiSdkTracing, AiSdkTurn, AiSdkTurnTelemetry, AiSdkUsageLike, } from \"./ai-sdk.ts\";\nexport { BUILTIN_AGENTS } from \"./builtin.ts\";\nexport { claudeCodeAgent } from \"./claude-code.ts\";\nexport { codexAgent } from \"./codex.ts\";\nexport { bubAgent } from \"./bub.ts\";\nexport { openCodeAgent } from \"./opencode.ts\";\nexport { hermesAgent } from \"./hermes.ts\";\nexport { openClawAgent } from \"./openclaw.ts\";\nexport { ompAgent } from \"./omp.ts\";\nexport { deepSeekHarnessAgent } from \"./deepseek-harness.ts\";\nexport type { ClaudeCodeConfig, ClaudeCodePluginSpec } from \"./claude-code.ts\";\nexport type { CodexConfig, CodexPluginSpec } from \"./codex.ts\";\nexport type { BubConfig, PythonPluginSpec } from \"./bub.ts\";\nexport type { OpenCodeConfig } from \"./opencode.ts\";\nexport type { HermesConfig } from \"./hermes.ts\";\nexport type { OpenClawConfig } from \"./openclaw.ts\";\nexport type { OmpConfig } from \"./omp.ts\";\nexport type { DeepSeekHarnessConfig } from \"./deepseek-harness.ts\";\nexport type { Agent, AgentContext, AgentIdentity, AgentInstallMode, AgentArtifactPlatform, AgentStagedArtifact, AgentEnsureOutcome, AgentEnsure, AgentInstaller, AgentArtifactContext, AgentInstallContext, StagedAgentInstallContext, DirectAgent, DirectAgentDef, DirectAgentSetup, DirectAgentTeardown, AgentSession, SessionSlot, AgentSetup, AgentSetupManifest, AgentSetupSkill, AgentTeardown, AgentTracing, SpanMapper, Telemetry, SandboxAgentDef, SandboxAgent, SandboxAgentContext, SandboxAgentSetupContext, McpServer, SkillSpec, } from \"../types.ts\";\n"]}
@@ -35,10 +35,14 @@ export { bubAgent } from "./bub.cjs";
35
35
  export { openCodeAgent } from "./opencode.cjs";
36
36
  export { hermesAgent } from "./hermes.cjs";
37
37
  export { openClawAgent } from "./openclaw.cjs";
38
+ export { ompAgent } from "./omp.cjs";
39
+ export { deepSeekHarnessAgent } from "./deepseek-harness.cjs";
38
40
  export type { ClaudeCodeConfig, ClaudeCodePluginSpec } from "./claude-code.cjs";
39
41
  export type { CodexConfig, CodexPluginSpec } from "./codex.cjs";
40
42
  export type { BubConfig, PythonPluginSpec } from "./bub.cjs";
41
43
  export type { OpenCodeConfig } from "./opencode.cjs";
42
44
  export type { HermesConfig } from "./hermes.cjs";
43
45
  export type { OpenClawConfig } from "./openclaw.cjs";
46
+ export type { OmpConfig } from "./omp.cjs";
47
+ export type { DeepSeekHarnessConfig } from "./deepseek-harness.cjs";
44
48
  export type { Agent, AgentContext, AgentIdentity, AgentInstallMode, AgentArtifactPlatform, AgentStagedArtifact, AgentEnsureOutcome, AgentEnsure, AgentInstaller, AgentArtifactContext, AgentInstallContext, StagedAgentInstallContext, DirectAgent, DirectAgentDef, DirectAgentSetup, DirectAgentTeardown, AgentSession, SessionSlot, AgentSetup, AgentSetupManifest, AgentSetupSkill, AgentTeardown, AgentTracing, SpanMapper, Telemetry, SandboxAgentDef, SandboxAgent, SandboxAgentContext, SandboxAgentSetupContext, McpServer, SkillSpec, } from "../types.cjs";
@@ -35,10 +35,14 @@ export { bubAgent } from "./bub.mjs";
35
35
  export { openCodeAgent } from "./opencode.mjs";
36
36
  export { hermesAgent } from "./hermes.mjs";
37
37
  export { openClawAgent } from "./openclaw.mjs";
38
+ export { ompAgent } from "./omp.mjs";
39
+ export { deepSeekHarnessAgent } from "./deepseek-harness.mjs";
38
40
  export type { ClaudeCodeConfig, ClaudeCodePluginSpec } from "./claude-code.mjs";
39
41
  export type { CodexConfig, CodexPluginSpec } from "./codex.mjs";
40
42
  export type { BubConfig, PythonPluginSpec } from "./bub.mjs";
41
43
  export type { OpenCodeConfig } from "./opencode.mjs";
42
44
  export type { HermesConfig } from "./hermes.mjs";
43
45
  export type { OpenClawConfig } from "./openclaw.mjs";
46
+ export type { OmpConfig } from "./omp.mjs";
47
+ export type { DeepSeekHarnessConfig } from "./deepseek-harness.mjs";
44
48
  export type { Agent, AgentContext, AgentIdentity, AgentInstallMode, AgentArtifactPlatform, AgentStagedArtifact, AgentEnsureOutcome, AgentEnsure, AgentInstaller, AgentArtifactContext, AgentInstallContext, StagedAgentInstallContext, DirectAgent, DirectAgentDef, DirectAgentSetup, DirectAgentTeardown, AgentSession, SessionSlot, AgentSetup, AgentSetupManifest, AgentSetupSkill, AgentTeardown, AgentTracing, SpanMapper, Telemetry, SandboxAgentDef, SandboxAgent, SandboxAgentContext, SandboxAgentSetupContext, McpServer, SkillSpec, } from "../types.mjs";
@@ -35,10 +35,14 @@ export { bubAgent } from "./bub.js";
35
35
  export { openCodeAgent } from "./opencode.js";
36
36
  export { hermesAgent } from "./hermes.js";
37
37
  export { openClawAgent } from "./openclaw.js";
38
+ export { ompAgent } from "./omp.js";
39
+ export { deepSeekHarnessAgent } from "./deepseek-harness.js";
38
40
  export type { ClaudeCodeConfig, ClaudeCodePluginSpec } from "./claude-code.js";
39
41
  export type { CodexConfig, CodexPluginSpec } from "./codex.js";
40
42
  export type { BubConfig, PythonPluginSpec } from "./bub.js";
41
43
  export type { OpenCodeConfig } from "./opencode.js";
42
44
  export type { HermesConfig } from "./hermes.js";
43
45
  export type { OpenClawConfig } from "./openclaw.js";
46
+ export type { OmpConfig } from "./omp.js";
47
+ export type { DeepSeekHarnessConfig } from "./deepseek-harness.js";
44
48
  export type { Agent, AgentContext, AgentIdentity, AgentInstallMode, AgentArtifactPlatform, AgentStagedArtifact, AgentEnsureOutcome, AgentEnsure, AgentInstaller, AgentArtifactContext, AgentInstallContext, StagedAgentInstallContext, DirectAgent, DirectAgentDef, DirectAgentSetup, DirectAgentTeardown, AgentSession, SessionSlot, AgentSetup, AgentSetupManifest, AgentSetupSkill, AgentTeardown, AgentTracing, SpanMapper, Telemetry, SandboxAgentDef, SandboxAgent, SandboxAgentContext, SandboxAgentSetupContext, McpServer, SkillSpec, } from "../types.js";
@@ -33,54 +33,58 @@ const __niceevalExport14 = __niceevalCanonical["createPiAgentEventStream"];
33
33
  export { __niceevalExport14 as createPiAgentEventStream };
34
34
  const __niceevalExport15 = __niceevalCanonical["createSessionSlot"];
35
35
  export { __niceevalExport15 as createSessionSlot };
36
- const __niceevalExport16 = __niceevalCanonical["defineAgent"];
37
- export { __niceevalExport16 as defineAgent };
38
- const __niceevalExport17 = __niceevalCanonical["defineSandboxAgent"];
39
- export { __niceevalExport17 as defineSandboxAgent };
40
- const __niceevalExport18 = __niceevalCanonical["deltaStream"];
41
- export { __niceevalExport18 as deltaStream };
42
- const __niceevalExport19 = __niceevalCanonical["driveFrameStream"];
43
- export { __niceevalExport19 as driveFrameStream };
44
- const __niceevalExport20 = __niceevalCanonical["externalCauseMessageChain"];
45
- export { __niceevalExport20 as externalCauseMessageChain };
46
- const __niceevalExport21 = __niceevalCanonical["externalCauseText"];
47
- export { __niceevalExport21 as externalCauseText };
48
- const __niceevalExport22 = __niceevalCanonical["hermesAgent"];
49
- export { __niceevalExport22 as hermesAgent };
50
- const __niceevalExport23 = __niceevalCanonical["heuristicTag"];
51
- export { __niceevalExport23 as heuristicTag };
52
- const __niceevalExport24 = __niceevalCanonical["makeSendFailure"];
53
- export { __niceevalExport24 as makeSendFailure };
54
- const __niceevalExport25 = __niceevalCanonical["mapCodexSpans"];
55
- export { __niceevalExport25 as mapCodexSpans };
56
- const __niceevalExport26 = __niceevalCanonical["normalizeExternalCause"];
57
- export { __niceevalExport26 as normalizeExternalCause };
58
- const __niceevalExport27 = __niceevalCanonical["normalizeLogicalCommand"];
59
- export { __niceevalExport27 as normalizeLogicalCommand };
60
- const __niceevalExport28 = __niceevalCanonical["notCommandProjection"];
61
- export { __niceevalExport28 as notCommandProjection };
62
- const __niceevalExport29 = __niceevalCanonical["opaqueCommandProjection"];
63
- export { __niceevalExport29 as opaqueCommandProjection };
64
- const __niceevalExport30 = __niceevalCanonical["openClawAgent"];
65
- export { __niceevalExport30 as openClawAgent };
66
- const __niceevalExport31 = __niceevalCanonical["openCodeAgent"];
67
- export { __niceevalExport31 as openCodeAgent };
68
- const __niceevalExport32 = __niceevalCanonical["responsesEvidenceCoverage"];
69
- export { __niceevalExport32 as responsesEvidenceCoverage };
70
- const __niceevalExport33 = __niceevalCanonical["sendFailureText"];
71
- export { __niceevalExport33 as sendFailureText };
72
- const __niceevalExport34 = __niceevalCanonical["shared"];
73
- export { __niceevalExport34 as shared };
74
- const __niceevalExport35 = __niceevalCanonical["sseJsonFrames"];
75
- export { __niceevalExport35 as sseJsonFrames };
76
- const __niceevalExport36 = __niceevalCanonical["tagSpan"];
77
- export { __niceevalExport36 as tagSpan };
78
- const __niceevalExport37 = __niceevalCanonical["turnFromAiSdk"];
79
- export { __niceevalExport37 as turnFromAiSdk };
80
- const __niceevalExport38 = __niceevalCanonical["turnFromChatCompletion"];
81
- export { __niceevalExport38 as turnFromChatCompletion };
82
- const __niceevalExport39 = __niceevalCanonical["turnFromResponses"];
83
- export { __niceevalExport39 as turnFromResponses };
84
- const __niceevalExport40 = __niceevalCanonical["uiMessageStreamAgent"];
85
- export { __niceevalExport40 as uiMessageStreamAgent };
36
+ const __niceevalExport16 = __niceevalCanonical["deepSeekHarnessAgent"];
37
+ export { __niceevalExport16 as deepSeekHarnessAgent };
38
+ const __niceevalExport17 = __niceevalCanonical["defineAgent"];
39
+ export { __niceevalExport17 as defineAgent };
40
+ const __niceevalExport18 = __niceevalCanonical["defineSandboxAgent"];
41
+ export { __niceevalExport18 as defineSandboxAgent };
42
+ const __niceevalExport19 = __niceevalCanonical["deltaStream"];
43
+ export { __niceevalExport19 as deltaStream };
44
+ const __niceevalExport20 = __niceevalCanonical["driveFrameStream"];
45
+ export { __niceevalExport20 as driveFrameStream };
46
+ const __niceevalExport21 = __niceevalCanonical["externalCauseMessageChain"];
47
+ export { __niceevalExport21 as externalCauseMessageChain };
48
+ const __niceevalExport22 = __niceevalCanonical["externalCauseText"];
49
+ export { __niceevalExport22 as externalCauseText };
50
+ const __niceevalExport23 = __niceevalCanonical["hermesAgent"];
51
+ export { __niceevalExport23 as hermesAgent };
52
+ const __niceevalExport24 = __niceevalCanonical["heuristicTag"];
53
+ export { __niceevalExport24 as heuristicTag };
54
+ const __niceevalExport25 = __niceevalCanonical["makeSendFailure"];
55
+ export { __niceevalExport25 as makeSendFailure };
56
+ const __niceevalExport26 = __niceevalCanonical["mapCodexSpans"];
57
+ export { __niceevalExport26 as mapCodexSpans };
58
+ const __niceevalExport27 = __niceevalCanonical["normalizeExternalCause"];
59
+ export { __niceevalExport27 as normalizeExternalCause };
60
+ const __niceevalExport28 = __niceevalCanonical["normalizeLogicalCommand"];
61
+ export { __niceevalExport28 as normalizeLogicalCommand };
62
+ const __niceevalExport29 = __niceevalCanonical["notCommandProjection"];
63
+ export { __niceevalExport29 as notCommandProjection };
64
+ const __niceevalExport30 = __niceevalCanonical["ompAgent"];
65
+ export { __niceevalExport30 as ompAgent };
66
+ const __niceevalExport31 = __niceevalCanonical["opaqueCommandProjection"];
67
+ export { __niceevalExport31 as opaqueCommandProjection };
68
+ const __niceevalExport32 = __niceevalCanonical["openClawAgent"];
69
+ export { __niceevalExport32 as openClawAgent };
70
+ const __niceevalExport33 = __niceevalCanonical["openCodeAgent"];
71
+ export { __niceevalExport33 as openCodeAgent };
72
+ const __niceevalExport34 = __niceevalCanonical["responsesEvidenceCoverage"];
73
+ export { __niceevalExport34 as responsesEvidenceCoverage };
74
+ const __niceevalExport35 = __niceevalCanonical["sendFailureText"];
75
+ export { __niceevalExport35 as sendFailureText };
76
+ const __niceevalExport36 = __niceevalCanonical["shared"];
77
+ export { __niceevalExport36 as shared };
78
+ const __niceevalExport37 = __niceevalCanonical["sseJsonFrames"];
79
+ export { __niceevalExport37 as sseJsonFrames };
80
+ const __niceevalExport38 = __niceevalCanonical["tagSpan"];
81
+ export { __niceevalExport38 as tagSpan };
82
+ const __niceevalExport39 = __niceevalCanonical["turnFromAiSdk"];
83
+ export { __niceevalExport39 as turnFromAiSdk };
84
+ const __niceevalExport40 = __niceevalCanonical["turnFromChatCompletion"];
85
+ export { __niceevalExport40 as turnFromChatCompletion };
86
+ const __niceevalExport41 = __niceevalCanonical["turnFromResponses"];
87
+ export { __niceevalExport41 as turnFromResponses };
88
+ const __niceevalExport42 = __niceevalCanonical["uiMessageStreamAgent"];
89
+ export { __niceevalExport42 as uiMessageStreamAgent };
86
90
  //# sourceMappingURL=index.js.map
@@ -33,54 +33,58 @@ const __niceevalExport14 = __niceevalCanonical["createPiAgentEventStream"];
33
33
  export { __niceevalExport14 as createPiAgentEventStream };
34
34
  const __niceevalExport15 = __niceevalCanonical["createSessionSlot"];
35
35
  export { __niceevalExport15 as createSessionSlot };
36
- const __niceevalExport16 = __niceevalCanonical["defineAgent"];
37
- export { __niceevalExport16 as defineAgent };
38
- const __niceevalExport17 = __niceevalCanonical["defineSandboxAgent"];
39
- export { __niceevalExport17 as defineSandboxAgent };
40
- const __niceevalExport18 = __niceevalCanonical["deltaStream"];
41
- export { __niceevalExport18 as deltaStream };
42
- const __niceevalExport19 = __niceevalCanonical["driveFrameStream"];
43
- export { __niceevalExport19 as driveFrameStream };
44
- const __niceevalExport20 = __niceevalCanonical["externalCauseMessageChain"];
45
- export { __niceevalExport20 as externalCauseMessageChain };
46
- const __niceevalExport21 = __niceevalCanonical["externalCauseText"];
47
- export { __niceevalExport21 as externalCauseText };
48
- const __niceevalExport22 = __niceevalCanonical["hermesAgent"];
49
- export { __niceevalExport22 as hermesAgent };
50
- const __niceevalExport23 = __niceevalCanonical["heuristicTag"];
51
- export { __niceevalExport23 as heuristicTag };
52
- const __niceevalExport24 = __niceevalCanonical["makeSendFailure"];
53
- export { __niceevalExport24 as makeSendFailure };
54
- const __niceevalExport25 = __niceevalCanonical["mapCodexSpans"];
55
- export { __niceevalExport25 as mapCodexSpans };
56
- const __niceevalExport26 = __niceevalCanonical["normalizeExternalCause"];
57
- export { __niceevalExport26 as normalizeExternalCause };
58
- const __niceevalExport27 = __niceevalCanonical["normalizeLogicalCommand"];
59
- export { __niceevalExport27 as normalizeLogicalCommand };
60
- const __niceevalExport28 = __niceevalCanonical["notCommandProjection"];
61
- export { __niceevalExport28 as notCommandProjection };
62
- const __niceevalExport29 = __niceevalCanonical["opaqueCommandProjection"];
63
- export { __niceevalExport29 as opaqueCommandProjection };
64
- const __niceevalExport30 = __niceevalCanonical["openClawAgent"];
65
- export { __niceevalExport30 as openClawAgent };
66
- const __niceevalExport31 = __niceevalCanonical["openCodeAgent"];
67
- export { __niceevalExport31 as openCodeAgent };
68
- const __niceevalExport32 = __niceevalCanonical["responsesEvidenceCoverage"];
69
- export { __niceevalExport32 as responsesEvidenceCoverage };
70
- const __niceevalExport33 = __niceevalCanonical["sendFailureText"];
71
- export { __niceevalExport33 as sendFailureText };
72
- const __niceevalExport34 = __niceevalCanonical["shared"];
73
- export { __niceevalExport34 as shared };
74
- const __niceevalExport35 = __niceevalCanonical["sseJsonFrames"];
75
- export { __niceevalExport35 as sseJsonFrames };
76
- const __niceevalExport36 = __niceevalCanonical["tagSpan"];
77
- export { __niceevalExport36 as tagSpan };
78
- const __niceevalExport37 = __niceevalCanonical["turnFromAiSdk"];
79
- export { __niceevalExport37 as turnFromAiSdk };
80
- const __niceevalExport38 = __niceevalCanonical["turnFromChatCompletion"];
81
- export { __niceevalExport38 as turnFromChatCompletion };
82
- const __niceevalExport39 = __niceevalCanonical["turnFromResponses"];
83
- export { __niceevalExport39 as turnFromResponses };
84
- const __niceevalExport40 = __niceevalCanonical["uiMessageStreamAgent"];
85
- export { __niceevalExport40 as uiMessageStreamAgent };
36
+ const __niceevalExport16 = __niceevalCanonical["deepSeekHarnessAgent"];
37
+ export { __niceevalExport16 as deepSeekHarnessAgent };
38
+ const __niceevalExport17 = __niceevalCanonical["defineAgent"];
39
+ export { __niceevalExport17 as defineAgent };
40
+ const __niceevalExport18 = __niceevalCanonical["defineSandboxAgent"];
41
+ export { __niceevalExport18 as defineSandboxAgent };
42
+ const __niceevalExport19 = __niceevalCanonical["deltaStream"];
43
+ export { __niceevalExport19 as deltaStream };
44
+ const __niceevalExport20 = __niceevalCanonical["driveFrameStream"];
45
+ export { __niceevalExport20 as driveFrameStream };
46
+ const __niceevalExport21 = __niceevalCanonical["externalCauseMessageChain"];
47
+ export { __niceevalExport21 as externalCauseMessageChain };
48
+ const __niceevalExport22 = __niceevalCanonical["externalCauseText"];
49
+ export { __niceevalExport22 as externalCauseText };
50
+ const __niceevalExport23 = __niceevalCanonical["hermesAgent"];
51
+ export { __niceevalExport23 as hermesAgent };
52
+ const __niceevalExport24 = __niceevalCanonical["heuristicTag"];
53
+ export { __niceevalExport24 as heuristicTag };
54
+ const __niceevalExport25 = __niceevalCanonical["makeSendFailure"];
55
+ export { __niceevalExport25 as makeSendFailure };
56
+ const __niceevalExport26 = __niceevalCanonical["mapCodexSpans"];
57
+ export { __niceevalExport26 as mapCodexSpans };
58
+ const __niceevalExport27 = __niceevalCanonical["normalizeExternalCause"];
59
+ export { __niceevalExport27 as normalizeExternalCause };
60
+ const __niceevalExport28 = __niceevalCanonical["normalizeLogicalCommand"];
61
+ export { __niceevalExport28 as normalizeLogicalCommand };
62
+ const __niceevalExport29 = __niceevalCanonical["notCommandProjection"];
63
+ export { __niceevalExport29 as notCommandProjection };
64
+ const __niceevalExport30 = __niceevalCanonical["ompAgent"];
65
+ export { __niceevalExport30 as ompAgent };
66
+ const __niceevalExport31 = __niceevalCanonical["opaqueCommandProjection"];
67
+ export { __niceevalExport31 as opaqueCommandProjection };
68
+ const __niceevalExport32 = __niceevalCanonical["openClawAgent"];
69
+ export { __niceevalExport32 as openClawAgent };
70
+ const __niceevalExport33 = __niceevalCanonical["openCodeAgent"];
71
+ export { __niceevalExport33 as openCodeAgent };
72
+ const __niceevalExport34 = __niceevalCanonical["responsesEvidenceCoverage"];
73
+ export { __niceevalExport34 as responsesEvidenceCoverage };
74
+ const __niceevalExport35 = __niceevalCanonical["sendFailureText"];
75
+ export { __niceevalExport35 as sendFailureText };
76
+ const __niceevalExport36 = __niceevalCanonical["shared"];
77
+ export { __niceevalExport36 as shared };
78
+ const __niceevalExport37 = __niceevalCanonical["sseJsonFrames"];
79
+ export { __niceevalExport37 as sseJsonFrames };
80
+ const __niceevalExport38 = __niceevalCanonical["tagSpan"];
81
+ export { __niceevalExport38 as tagSpan };
82
+ const __niceevalExport39 = __niceevalCanonical["turnFromAiSdk"];
83
+ export { __niceevalExport39 as turnFromAiSdk };
84
+ const __niceevalExport40 = __niceevalCanonical["turnFromChatCompletion"];
85
+ export { __niceevalExport40 as turnFromChatCompletion };
86
+ const __niceevalExport41 = __niceevalCanonical["turnFromResponses"];
87
+ export { __niceevalExport41 as turnFromResponses };
88
+ const __niceevalExport42 = __niceevalCanonical["uiMessageStreamAgent"];
89
+ export { __niceevalExport42 as uiMessageStreamAgent };
86
90
  //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ompAgent = ompAgent;
4
+ const effect_1 = require("effect");
5
+ const define_ts_1 = require("../define.cjs");
6
+ const util_ts_1 = require("../util.cjs");
7
+ const send_failures_ts_1 = require("../context/send-failures.cjs");
8
+ const shared_ts_1 = require("./shared.cjs");
9
+ const sdk_streams_ts_1 = require("./sdk-streams.cjs");
10
+ const npm_staged_ts_1 = require("./npm-staged.cjs");
11
+ const coding_cli_versions_ts_1 = require("./coding-cli-versions.cjs");
12
+ const COMPAT_PROVIDER = "niceeval-compat";
13
+ const API_KEY_ENV = "NICEEVAL_OMP_API_KEY";
14
+ const OMP_EVIDENCE_COVERAGE = {
15
+ events: { status: "complete" },
16
+ actions: { status: "complete" },
17
+ messages: { status: "complete" },
18
+ usage: { status: "complete" },
19
+ status: { status: "complete" },
20
+ data: { status: "unavailable", reason: "OMP print mode does not expose a separate Turn.data value." },
21
+ };
22
+ function resolveApiKey(config) {
23
+ return config?.apiKey ?? (0, util_ts_1.getEnv)("OMP_API_KEY") ?? (0, util_ts_1.requireEnv)("OPENAI_API_KEY");
24
+ }
25
+ function resolveBaseUrl(config) {
26
+ return config?.baseUrl ?? (0, util_ts_1.getEnv)("OMP_BASE_URL") ?? (0, util_ts_1.getEnv)("OPENAI_BASE_URL");
27
+ }
28
+ function bunPlatformPackage(version, platform) {
29
+ if (platform.os === "linux") {
30
+ const arch = platform.arch === "arm64" ? "aarch64" : platform.arch;
31
+ if (arch !== "x64" && arch !== "aarch64")
32
+ return undefined;
33
+ const musl = platform.libc === "musl" ? "-musl" : "";
34
+ return { spec: `@oven/bun-linux-${arch}${musl}@${version}`, binPath: "bin/bun" };
35
+ }
36
+ if (platform.os === "darwin") {
37
+ const arch = platform.arch === "arm64" ? "aarch64" : platform.arch;
38
+ if (arch !== "x64" && arch !== "aarch64")
39
+ return undefined;
40
+ return { spec: `@oven/bun-darwin-${arch}@${version}`, binPath: "bin/bun" };
41
+ }
42
+ return undefined;
43
+ }
44
+ function parseJsonl(raw) {
45
+ return raw.split(/\r?\n/).filter((line) => line.trim()).map((line, index) => {
46
+ let value;
47
+ try {
48
+ value = JSON.parse(line);
49
+ }
50
+ catch (cause) {
51
+ throw new Error(`OMP emitted invalid JSONL at line ${index + 1}`, { cause });
52
+ }
53
+ if (typeof value !== "object" || value === null || typeof value.type !== "string") {
54
+ throw new Error(`OMP emitted an invalid event at line ${index + 1}`);
55
+ }
56
+ return value;
57
+ });
58
+ }
59
+ /** Oh My Pi sandbox adapter backed by `omp --print --mode json`. */
60
+ function ompAgent(config) {
61
+ const version = config?.version ?? coding_cli_versions_ts_1.DEFAULT_OMP_CLI_VERSION;
62
+ const bunVersion = config?.bunVersion ?? coding_cli_versions_ts_1.DEFAULT_BUN_VERSION;
63
+ const ompInstall = (0, npm_staged_ts_1.createNpmCliInstaller)({
64
+ identity: { agent: "omp", version, revision: String(coding_cli_versions_ts_1.AGENT_BASELINE_RECIPE_REVISION.omp) },
65
+ packageName: "@oh-my-pi/pi-coding-agent",
66
+ bin: "omp",
67
+ });
68
+ const bunInstall = (0, npm_staged_ts_1.createNpmCliInstaller)({
69
+ identity: { agent: "bun", version: bunVersion, revision: "1" },
70
+ packageName: "bun",
71
+ bin: "bun",
72
+ platformPackage: (platform) => bunPlatformPackage(bunVersion, platform),
73
+ });
74
+ const configDirs = new Map();
75
+ return (0, define_ts_1.defineSandboxAgent)({
76
+ name: "omp",
77
+ evidenceCoverage: OMP_EVIDENCE_COVERAGE,
78
+ ensure: [bunInstall.ensure, ompInstall.ensure],
79
+ installers: [bunInstall.installer, ompInstall.installer],
80
+ async setup(sb, ctx) {
81
+ const homeResult = await sb.runShell('test -n "$HOME" && printf "%s" "$HOME"');
82
+ const home = homeResult.stdout.trim();
83
+ if (homeResult.exitCode !== 0 || !home.startsWith("/")) {
84
+ throw new Error("OMP setup requires an absolute sandbox HOME directory");
85
+ }
86
+ const dir = `${home}/.niceeval-omp`;
87
+ configDirs.set(sb.sandboxId, dir);
88
+ const baseUrl = resolveBaseUrl(config);
89
+ const model = ctx.model ?? "deepseek-v4-flash";
90
+ const models = {
91
+ providers: {
92
+ [COMPAT_PROVIDER]: {
93
+ ...(baseUrl ? { baseUrl } : {}),
94
+ api: "openai-completions",
95
+ apiKey: API_KEY_ENV,
96
+ models: [{ id: model, name: model, contextWindow: 1000000, maxTokens: 64000 }],
97
+ },
98
+ },
99
+ };
100
+ await shared_ts_1.shared.writeFile(sb, `${dir}/models.yml`, JSON.stringify(models, null, 2));
101
+ },
102
+ send: (input, ctx) => effect_1.Effect.runPromise(effect_1.Effect.scoped(effect_1.Effect.gen(function* () {
103
+ const ompBin = yield* (0, npm_staged_ts_1.resolveAgentBinEffect)(ctx.sandbox, "omp");
104
+ return yield* effect_1.Effect.tryPromise({
105
+ try: async (signal) => {
106
+ const apiKey = resolveApiKey(config);
107
+ const dir = configDirs.get(ctx.sandbox.sandboxId);
108
+ if (!dir)
109
+ throw new Error("OMP setup state is unavailable");
110
+ const model = ctx.model ?? "deepseek-v4-flash";
111
+ const env = {
112
+ [API_KEY_ENV]: apiKey,
113
+ PI_CODING_AGENT_DIR: dir,
114
+ ...ctx.telemetry?.env,
115
+ };
116
+ const args = [
117
+ "--print",
118
+ "--mode", "json",
119
+ "--model", `${COMPAT_PROVIDER}/${model}`,
120
+ "--approval-mode", "yolo",
121
+ "--no-pty",
122
+ "--no-title",
123
+ input.text,
124
+ ];
125
+ const res = await ctx.sandbox.runCommand(ompBin, args, {
126
+ env,
127
+ sensitiveValues: [apiKey],
128
+ stream: true,
129
+ signal,
130
+ });
131
+ let nativeEvents;
132
+ try {
133
+ nativeEvents = parseJsonl(res.stdout);
134
+ }
135
+ catch (cause) {
136
+ throw (0, send_failures_ts_1.makeSendFailure)({
137
+ acceptance: "unknown",
138
+ message: cause instanceof Error ? cause.message : "OMP transcript could not be parsed",
139
+ process: res,
140
+ });
141
+ }
142
+ const stream = (0, sdk_streams_ts_1.createPiAgentEventStream)();
143
+ const events = nativeEvents.flatMap((event) => stream.add(event));
144
+ const terminal = nativeEvents.filter((event) => event.type === "agent_end" &&
145
+ event.isTerminal !== false &&
146
+ Array.isArray(event.messages));
147
+ if (res.exitCode !== 0 || terminal.length !== 1) {
148
+ throw (0, send_failures_ts_1.makeSendFailure)({
149
+ acceptance: (0, send_failures_ts_1.sendAcceptanceFromEvents)(events),
150
+ message: res.exitCode !== 0
151
+ ? shared_ts_1.shared.diagnoseFailure(res, events, res.stdout)
152
+ : `OMP produced ${terminal.length} valid terminal agent_end events; expected exactly one.`,
153
+ events,
154
+ usage: stream.usage,
155
+ process: res,
156
+ });
157
+ }
158
+ return {
159
+ events,
160
+ usage: stream.usage,
161
+ status: stream.failed ? "failed" : "completed",
162
+ };
163
+ },
164
+ catch: (cause) => cause,
165
+ });
166
+ })), { signal: ctx.signal }),
167
+ });
168
+ }
169
+ exports.default = ompAgent;
170
+ //# sourceMappingURL=omp.cjs.map