openpond 0.0.49 → 0.0.51

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 (133) hide show
  1. package/dist/chunks/{app-layer-E2JWCA6D.js → app-layer-DCUTQ4TM.js} +2 -2
  2. package/dist/chunks/{app-server-runtime-OWEIHFEU.js → app-server-runtime-Q3IGU5YB.js} +6 -6
  3. package/dist/chunks/{apps-VQDIVGST.js → apps-JDRCDAPE.js} +2 -2
  4. package/dist/chunks/{chunk-7G472COA.js → chunk-35OYRVVH.js} +1491 -4
  5. package/dist/chunks/{chunk-3BR4ACFF.js → chunk-3PYU3XCS.js} +484 -201
  6. package/dist/chunks/{chunk-NR2N6JAC.js → chunk-CSN3DLWJ.js} +1 -1
  7. package/dist/chunks/{chunk-ZJBJQCQZ.js → chunk-EJURKADM.js} +4 -2
  8. package/dist/chunks/{chunk-NRLI3S72.js → chunk-IGSEFSMA.js} +187 -21
  9. package/dist/chunks/{chunk-UJV3UYLP.js → chunk-J4LLKY6E.js} +1 -1
  10. package/dist/chunks/{chunk-64LWPRGN.js → chunk-LYEXNSCO.js} +2 -2
  11. package/dist/chunks/{chunk-LRLDBKTI.js → chunk-PFNX5XOT.js} +1 -1
  12. package/dist/chunks/{chunk-QD4FR3O4.js → chunk-R4PRXXTC.js} +40 -35
  13. package/dist/chunks/{chunk-CNIMJPM5.js → chunk-UDTHREHB.js} +2231 -2125
  14. package/dist/chunks/{chunk-7M4HGT5X.js → chunk-V3HADQL5.js} +1 -1
  15. package/dist/chunks/{cli-T6TTMVSU.js → cli-2FTM4SXH.js} +5 -5
  16. package/dist/chunks/{core-commands-UW4XTGXK.js → core-commands-5BRR7TU4.js} +3 -3
  17. package/dist/chunks/{desktop-test-JTBPE7CH.js → desktop-test-EQ2BGZOM.js} +2 -2
  18. package/dist/chunks/{extension-VP7LMA32.js → extension-V3NZ7MU7.js} +305 -170
  19. package/dist/chunks/{help-OZNCHHO3.js → help-WJBMX37U.js} +1 -1
  20. package/dist/chunks/{opchat-RY3QU5UJ.js → opchat-W7DSKNNB.js} +2 -2
  21. package/dist/chunks/{organizations-GLKSXK3Q.js → organizations-RHOF5H4Z.js} +4 -4
  22. package/dist/chunks/{profile-JWUYJF23.js → profile-B62ZWPTQ.js} +3 -3
  23. package/dist/chunks/{project-agent-L4EB7QFO.js → project-agent-QA25HHDV.js} +2 -2
  24. package/dist/chunks/{sandbox-command-26255MSV.js → sandbox-command-JFEVPU4X.js} +2 -2
  25. package/dist/chunks/{sandbox-template-6UDA3AEY.js → sandbox-template-GEWTAWAR.js} +3 -3
  26. package/dist/chunks/{src-7S66FU4P.js → src-JOTV67WO.js} +4944 -3831
  27. package/dist/chunks/{src-GCZ2GMG3.js → src-P2BL3KCV.js} +3 -4
  28. package/dist/chunks/{teams-bot-PO3GOLWU.js → teams-bot-ODSMRNE4.js} +2 -2
  29. package/dist/chunks/{training-BR5A7SPU.js → training-5CPTZRVC.js} +81 -2
  30. package/dist/chunks/{workspaces-26IF6TQV.js → workspaces-7YHBJG5P.js} +2 -2
  31. package/dist/cli.js +13 -13
  32. package/dist/index.js +7 -5
  33. package/dist/profile/profile-git.d.ts +22 -0
  34. package/dist/skills/openpond-taskset-authoring/SKILL.md +9 -1
  35. package/dist/skills/openpond-taskset-authoring/artifact.json +10 -5
  36. package/dist/skills/openpond-taskset-authoring/references/benchmarking.md +26 -0
  37. package/dist/web/assets/{AppDialog-BTOxCNC5.js → AppDialog-DylZeiI-.js} +1 -1
  38. package/dist/web/assets/{AppsView-Cm5x09IS.js → AppsView-Bz6C0a1u.js} +1 -1
  39. package/dist/web/assets/{BrowserSidebar-CIPh5JIn.js → BrowserSidebar-xXFxZP2-.js} +1 -1
  40. package/dist/web/assets/CommandMenu-C9k5VdaR.js +1 -0
  41. package/dist/web/assets/CommunityView-DaIS0cHw.css +1 -0
  42. package/dist/web/assets/CommunityView-DcJlUNgd.js +1 -0
  43. package/dist/web/assets/{ComposerCreateImproveStrip-CW2QuI7r.js → ComposerCreateImproveStrip-Yt3irJVo.js} +1 -1
  44. package/dist/web/assets/{GetStartedView--CbCnzFQ.js → GetStartedView-BhD0Ij7c.js} +1 -1
  45. package/dist/web/assets/LabModelVersionDetailPage-B-OoSJYT.js +1 -0
  46. package/dist/web/assets/LabSkillSidebar-dqdSTmHG.js +1 -0
  47. package/dist/web/assets/LabsRoute-BMPI4vB8.js +3 -0
  48. package/dist/web/assets/LabsRoute-DDTgtCul.css +1 -0
  49. package/dist/web/assets/MainChatThread-B0ajKiNL.js +2 -0
  50. package/dist/web/assets/{MainPane-Bky_Rqcx.css → MainPane-BfVDe9f7.css} +1 -1
  51. package/dist/web/assets/MainPane-COs4xUGo.js +6 -0
  52. package/dist/web/assets/{MarkdownText-DTBS9xe7.js → MarkdownText-CzZ60aWs.js} +4 -4
  53. package/dist/web/assets/Messages-DGrK4iIj.js +9 -0
  54. package/dist/web/assets/{NativeSkillSidebar-DSoPD42b.js → NativeSkillSidebar-BkpgGLSO.js} +1 -1
  55. package/dist/web/assets/{NewProjectDialog-CmXg2GK7.js → NewProjectDialog-BOdCdNcG.js} +1 -1
  56. package/dist/web/assets/OutputsPage-CSBWIFdi.js +1 -0
  57. package/dist/web/assets/RightChatPanelStack-PZR6NYJj.js +1 -0
  58. package/dist/web/assets/ScheduledWorkPage-WXLnwju_.js +1 -0
  59. package/dist/web/assets/{SettingsView-CrXwXjZ1.css → SettingsView-C39BqlSI.css} +1 -1
  60. package/dist/web/assets/SettingsView-CQJoEx-y.js +6 -0
  61. package/dist/web/assets/{TeamChatView-CB_0oRid.js → TeamChatView-BRnuD-lV.js} +2 -2
  62. package/dist/web/assets/TeamChatView-Br3VdxhD.css +1 -0
  63. package/dist/web/assets/{TerminalOverlay-XhABQsCB.js → TerminalOverlay-B5m8j4_C.js} +1 -1
  64. package/dist/web/assets/{TrainingCreationPanel-ChsDr2GP.js → TrainingCreationPanel-CA1rt7XZ.js} +1 -1
  65. package/dist/web/assets/{TrainingDraftPanel-CDlpnno6.js → TrainingDraftPanel-C0p3GP1n.js} +1 -1
  66. package/dist/web/assets/{UsageSettingsSection-NbX7_3Uz.js → UsageSettingsSection-CpIKj4p-.js} +1 -1
  67. package/dist/web/assets/WorkspaceDiffPanel-BXk8mdZB.js +14 -0
  68. package/dist/web/assets/WorkspaceEnvironmentMenu-BO60uNVj.js +32 -0
  69. package/dist/web/assets/{WorkspaceGitDialogs-C0PMpVfj.js → WorkspaceGitDialogs-hWBfhgaP.js} +1 -1
  70. package/dist/web/assets/{WorkspaceMonacoEditor-6QNGzQUi.js → WorkspaceMonacoEditor-ULPyacH8.js} +3 -3
  71. package/dist/web/assets/{arrow-up-right-Cx2xjktp.js → arrow-up-right-CkfCgokz.js} +1 -1
  72. package/dist/web/assets/{chevron-up-UF_r7JHT.js → chevron-up-B5URpgIH.js} +1 -1
  73. package/dist/web/assets/{circle-alert-BUHAQ7Du.js → circle-alert-CAvjRdlQ.js} +1 -1
  74. package/dist/web/assets/{cloud-upload-Cc_ZQEAm.js → cloud-upload-DeQEwz1o.js} +1 -1
  75. package/dist/web/assets/{cssMode-CrigFsxI.js → cssMode-B4V5a3OX.js} +1 -1
  76. package/dist/web/assets/folder-DgS_U9Lq.js +1 -0
  77. package/dist/web/assets/folder-git-2-BTtbxKWf.js +1 -0
  78. package/dist/web/assets/{folder-open-D7a4t258.js → folder-open-CqjIkaDK.js} +1 -1
  79. package/dist/web/assets/{folder-plus-CmeHTj5W.js → folder-plus-CsS0KPW5.js} +1 -1
  80. package/dist/web/assets/{git-branch-CaVUghsI.js → git-branch-BN2ijBYt.js} +1 -1
  81. package/dist/web/assets/{git-commit-horizontal-oiDAVV_Y.js → git-commit-horizontal-CVsl4u1O.js} +1 -1
  82. package/dist/web/assets/{htmlMode-CLzM5GNi.js → htmlMode-DRksGWJA.js} +1 -1
  83. package/dist/web/assets/index-CE2hroF6.css +1 -0
  84. package/dist/web/assets/index-Cxq5q-6B.js +174 -0
  85. package/dist/web/assets/index-SKvMOpII.js +1 -0
  86. package/dist/web/assets/{info-dTkimobU.js → info-DwVXRQli.js} +1 -1
  87. package/dist/web/assets/{jsonMode-BBF67cOE.js → jsonMode-eJvgtAy-.js} +1 -1
  88. package/dist/web/assets/{lspLanguageFeatures-DHtN2nxz.js → lspLanguageFeatures-DCk7zUI-.js} +1 -1
  89. package/dist/web/assets/{monaco.contribution-DtM9AdPi.js → monaco.contribution-B02C5mDa.js} +2 -2
  90. package/dist/web/assets/{monaco.contribution-BClTZJd2.js → monaco.contribution-CPnN-lZN.js} +2 -2
  91. package/dist/web/assets/{monaco.contribution-riAIDf7J.js → monaco.contribution-DWVguH46.js} +2 -2
  92. package/dist/web/assets/{monaco.contribution-C_GWU01R.js → monaco.contribution-WGT1eYvk.js} +2 -2
  93. package/dist/web/assets/{play-CjWTsI9z.js → play-DGCzapdE.js} +1 -1
  94. package/dist/web/assets/{python-CvZQM_g2.js → python-DRPzruv8.js} +1 -1
  95. package/dist/web/assets/{refresh-cw-CeHT_tXT.js → refresh-cw-BKF4NhDI.js} +1 -1
  96. package/dist/web/assets/{save-CmJ92Odx.js → save-DQXtfx_4.js} +1 -1
  97. package/dist/web/assets/{square-B00f_944.js → square-Dp5eGICS.js} +1 -1
  98. package/dist/web/assets/square-pen-j-mZ_UkO.js +1 -0
  99. package/dist/web/assets/{toggleHighContrast-C6N52VOS.js → toggleHighContrast-wDmA5YPb.js} +1 -1
  100. package/dist/web/assets/{training-model-data-B7-1Bxil.js → training-model-data-V8276E5q.js} +1 -1
  101. package/dist/web/assets/{tsMode-CDIfvnHn.js → tsMode-DELTv39m.js} +1 -1
  102. package/dist/web/assets/{upload-DK0-5jXz.js → upload-_rNli8wK.js} +1 -1
  103. package/dist/web/assets/{useLocalAgentSchedules-BUkZjV9E.js → useLocalAgentSchedules-DRVUfTbv.js} +1 -1
  104. package/dist/web/assets/wifi-off-uKPwd8A7.js +1 -0
  105. package/dist/web/assets/{workers-BfcjsZ3C.js → workers-CXbluSB3.js} +1 -1
  106. package/dist/web/assets/{yaml-CNqgAihH.js → yaml-BMqi-3ui.js} +1 -1
  107. package/dist/web/index.html +2 -2
  108. package/docs/command-reference.md +6 -1
  109. package/package.json +1 -1
  110. package/dist/web/assets/CommandMenu-DdR82TLd.js +0 -1
  111. package/dist/web/assets/CommunityView-DSik4sd2.css +0 -1
  112. package/dist/web/assets/CommunityView-Dqu4cos1.js +0 -1
  113. package/dist/web/assets/LabModelVersionDetailPage-BPUvR5XP.js +0 -1
  114. package/dist/web/assets/LabSkillSidebar-CnuyFZ1G.js +0 -1
  115. package/dist/web/assets/LabsRoute-CYk2dzQp.js +0 -3
  116. package/dist/web/assets/LabsRoute-CoSPO4HR.css +0 -1
  117. package/dist/web/assets/MainChatThread-0Tc95p0t.js +0 -2
  118. package/dist/web/assets/MainPane-Bke4JEHC.js +0 -6
  119. package/dist/web/assets/Messages-Bae_sFx5.js +0 -9
  120. package/dist/web/assets/OutputsPage-XmIreC0M.js +0 -1
  121. package/dist/web/assets/RightChatPanelStack-BMOtbjus.js +0 -1
  122. package/dist/web/assets/ScheduledWorkPage-Cn5a9VLV.js +0 -1
  123. package/dist/web/assets/SettingsView-DXF8z3P2.js +0 -6
  124. package/dist/web/assets/TeamChatView-Cgxm-pKA.css +0 -1
  125. package/dist/web/assets/WorkspaceDiffPanel-jaJU08NH.js +0 -14
  126. package/dist/web/assets/WorkspaceEnvironmentMenu-D0nvQmmj.js +0 -32
  127. package/dist/web/assets/index-De6p2npi.js +0 -1
  128. package/dist/web/assets/index-UUM3pwfd.css +0 -1
  129. package/dist/web/assets/index-Ure41UF0.js +0 -178
  130. package/dist/web/assets/monitor-POfnZCWw.js +0 -1
  131. package/dist/web/assets/reply-BkH8nKWG.js +0 -1
  132. package/dist/web/assets/square-pen-LHr8bFfZ.js +0 -1
  133. package/dist/web/assets/wifi-off-BQGq-son.js +0 -1
@@ -3,7 +3,7 @@ import { createRequire as __openpondCreateRequire } from "node:module"; var requ
3
3
  import {
4
4
  createReadyLineParser,
5
5
  openUrlWithSystemBrowser
6
- } from "./chunk-NRLI3S72.js";
6
+ } from "./chunk-IGSEFSMA.js";
7
7
  import {
8
8
  ApprovalSchema,
9
9
  ContextUsageSnapshotSchema,
@@ -12,12 +12,12 @@ import {
12
12
  DEFAULT_OPENPOND_CHAT_MODEL,
13
13
  DEFAULT_OPENPOND_COMMAND_ACCESS_MODE,
14
14
  OpenPondCommandAccessModeSchema
15
- } from "./chunk-3BR4ACFF.js";
15
+ } from "./chunk-3PYU3XCS.js";
16
16
  import {
17
17
  CONNECTED_APP_CATALOG,
18
18
  buildConnectedAppInstallUrl,
19
19
  connectedAppById
20
- } from "./chunk-7G472COA.js";
20
+ } from "./chunk-35OYRVVH.js";
21
21
  import "./chunk-WYDVQOBL.js";
22
22
  import "./chunk-KHNHUA2H.js";
23
23
  import "./chunk-UACZUFIA.js";
@@ -962,7 +962,6 @@ var TERMINAL_MODEL_OPTIONS = [
962
962
  }
963
963
  ];
964
964
  var OPENAI_COMPATIBLE_CHAT_PROVIDER_IDS = [
965
- "local-adapter",
966
965
  "openai",
967
966
  "xai",
968
967
  "openrouter",
@@ -3,9 +3,9 @@ import {
3
3
  resolveSandboxClient
4
4
  } from "./chunk-FCVVOMIP.js";
5
5
  import "./chunk-KHNHUA2H.js";
6
- import "./chunk-LRLDBKTI.js";
6
+ import "./chunk-PFNX5XOT.js";
7
7
  import "./chunk-SMNFI2FU.js";
8
- import "./chunk-QD4FR3O4.js";
8
+ import "./chunk-R4PRXXTC.js";
9
9
  import "./chunk-DBHSOTYZ.js";
10
10
  import "./chunk-KSRWKXRB.js";
11
11
  import {
@@ -33,12 +33,14 @@ async function runTrainingCommand(options, rest, dependencies = {}) {
33
33
  "watch",
34
34
  "logs",
35
35
  "cancel",
36
- "artifacts"
36
+ "resume",
37
+ "artifacts",
38
+ "benchmark"
37
39
  ].includes(
38
40
  subcommand
39
41
  ) || !id) {
40
42
  throw new Error(
41
- "usage: training <start|status|watch|logs|cancel|artifacts> <model-run-id|run-id>"
43
+ "usage: training <start|status|watch|logs|cancel|resume|artifacts|benchmark> <model-run-id|run-id|model-id>"
42
44
  );
43
45
  }
44
46
  if (rest.length > 2) {
@@ -50,6 +52,28 @@ async function runTrainingCommand(options, rest, dependencies = {}) {
50
52
  request: dependencies.request ?? await createLocalAuthenticatedRequest(baseUrl)
51
53
  });
52
54
  const json = parseBooleanOption(options.json);
55
+ if (subcommand === "benchmark") {
56
+ await startHarnessRefinerBenchmark({
57
+ client,
58
+ modelId: id,
59
+ options,
60
+ json,
61
+ sleep: dependencies.sleep
62
+ });
63
+ return;
64
+ }
65
+ if (subcommand === "resume") {
66
+ const run = await client.modelRun(id, "resume", "POST");
67
+ printResult(run, json);
68
+ await watchTraining({
69
+ client,
70
+ runId: id,
71
+ json,
72
+ intervalMs: parseIntegerOption(options.intervalMs, "interval-ms") ?? 2e3,
73
+ sleep: dependencies.sleep
74
+ });
75
+ return;
76
+ }
53
77
  if (subcommand === "start") {
54
78
  await startTraining({
55
79
  client,
@@ -169,6 +193,16 @@ var TrainingApiClient = class {
169
193
  body
170
194
  );
171
195
  }
196
+ trainingState() {
197
+ return this.json("/v1/training", "GET");
198
+ }
199
+ startHarnessRefinerBenchmark(modelId, body) {
200
+ return this.json(
201
+ `/v1/training/models/${encodeURIComponent(modelId)}/harness-refiner-benchmark`,
202
+ "POST",
203
+ body
204
+ );
205
+ }
172
206
  async json(pathname, method, body) {
173
207
  const response = await this.request(`${this.baseUrl}${pathname}`, {
174
208
  method,
@@ -194,6 +228,51 @@ var TrainingApiClient = class {
194
228
  return payload;
195
229
  }
196
230
  };
231
+ async function startHarnessRefinerBenchmark(input) {
232
+ const state = await input.client.trainingState();
233
+ const project = modelProject(state, input.modelId);
234
+ const providerId = optionString(input.options, "provider") ?? "openpond";
235
+ const modelId = optionString(input.options, "model") ?? "openpond-chat";
236
+ const effort = optionString(input.options, "reasoningEffort") ?? "high";
237
+ const maximumSpendUsd = parseNumberOption(input.options.maxSpend, "max-spend") ?? 10;
238
+ if (maximumSpendUsd <= 0) throw new Error("max-spend must be greater than zero");
239
+ if (parseBooleanOption(input.options.detach)) {
240
+ throw new Error("Harness Refiner benchmark runs must be watched to terminal state.");
241
+ }
242
+ const run = await input.client.startHarnessRefinerBenchmark(input.modelId, {
243
+ profileId: project.profileId,
244
+ model: { providerId, modelId },
245
+ reasoningEffort: effort === "none" ? "none" : effort,
246
+ maximumSpendUsd
247
+ });
248
+ printResult(run, input.json);
249
+ const runId = objectString(run, "id");
250
+ if (!runId) throw new Error("Benchmark start did not return a Model Run id.");
251
+ await watchTraining({
252
+ client: input.client,
253
+ runId,
254
+ json: input.json,
255
+ intervalMs: parseIntegerOption(input.options.intervalMs, "interval-ms") ?? 2e3,
256
+ sleep: input.sleep
257
+ });
258
+ }
259
+ function modelProject(value, modelId) {
260
+ if (!value || typeof value !== "object" || !("modelProjects" in value)) {
261
+ throw new Error("Training state did not include Models.");
262
+ }
263
+ const projects = Array.isArray(value.modelProjects) ? value.modelProjects : [];
264
+ const project = projects.find(
265
+ (candidate) => candidate && typeof candidate === "object" && "id" in candidate && candidate.id === modelId
266
+ );
267
+ const profileId = project && typeof project === "object" ? objectString(project, "profileId") : null;
268
+ if (!profileId) throw new Error(`Model ${modelId} was not found.`);
269
+ return { profileId };
270
+ }
271
+ function objectString(value, key) {
272
+ if (!value || typeof value !== "object" || !(key in value)) return null;
273
+ const candidate = value[key];
274
+ return typeof candidate === "string" && candidate ? candidate : null;
275
+ }
197
276
  async function startTraining(input) {
198
277
  const maximumSpendUsd = parseNumberOption(
199
278
  input.options.maxSpend,
@@ -45,8 +45,8 @@ import {
45
45
  truncatePatch,
46
46
  uniqueSortedPaths,
47
47
  workspaceImageContentType
48
- } from "./chunk-7M4HGT5X.js";
49
- import "./chunk-UJV3UYLP.js";
48
+ } from "./chunk-V3HADQL5.js";
49
+ import "./chunk-J4LLKY6E.js";
50
50
  import "./chunk-UACZUFIA.js";
51
51
  export {
52
52
  MACOS_GIT_MISSING_DEVELOPER_TOOLS_ERROR,
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
3
3
  import {
4
4
  parseArgs
5
- } from "./chunks/chunk-LRLDBKTI.js";
5
+ } from "./chunks/chunk-PFNX5XOT.js";
6
6
  import {
7
7
  resolveAccountOption,
8
8
  resolveBaseUrlOption
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  getInstalledCliVersion,
12
12
  runCliCommand
13
- } from "./chunks/chunk-QD4FR3O4.js";
13
+ } from "./chunks/chunk-R4PRXXTC.js";
14
14
  import "./chunks/chunk-KSRWKXRB.js";
15
15
  import {
16
16
  parseBooleanOption
@@ -37,11 +37,11 @@ async function runOpenPondCli(argv = process.argv.slice(2)) {
37
37
  return;
38
38
  }
39
39
  if (action === "check-update") {
40
- await (await import("./chunks/core-commands-UW4XTGXK.js")).runCheckUpdate();
40
+ await (await import("./chunks/core-commands-5BRR7TU4.js")).runCheckUpdate();
41
41
  return;
42
42
  }
43
43
  if (action === "help") {
44
- (await import("./chunks/help-OZNCHHO3.js")).printHelp();
44
+ (await import("./chunks/help-WJBMX37U.js")).printHelp();
45
45
  return;
46
46
  }
47
47
  const selectedAccount = resolveAccountOption(options);
@@ -53,25 +53,25 @@ async function runOpenPondCli(argv = process.argv.slice(2)) {
53
53
  process.env.OPENPOND_BASE_URL = selectedBaseUrl;
54
54
  }
55
55
  if (action === "tui") {
56
- await (await import("./chunks/app-layer-E2JWCA6D.js")).runOpenPondTerminalCommand(options, rest);
56
+ await (await import("./chunks/app-layer-DCUTQ4TM.js")).runOpenPondTerminalCommand(options, rest);
57
57
  return;
58
58
  }
59
59
  if (action === "ui") {
60
- await (await import("./chunks/app-layer-E2JWCA6D.js")).runOpenPondServerCommand("web", options, rest);
60
+ await (await import("./chunks/app-layer-DCUTQ4TM.js")).runOpenPondServerCommand("web", options, rest);
61
61
  return;
62
62
  }
63
63
  if (await runCliCommand({ command, options, rest })) {
64
64
  return;
65
65
  }
66
- (await import("./chunks/help-OZNCHHO3.js")).printHelp();
66
+ (await import("./chunks/help-WJBMX37U.js")).printHelp();
67
67
  process.exit(1);
68
68
  }
69
69
  async function runEmbeddedCompanion(argv) {
70
70
  if (argv[0] === "__app-server") {
71
71
  process.argv = [process.execPath, "openpond-app-server", ...argv.slice(1)];
72
72
  const [{ createOpenPondAppServer }, { runOpenPondAppServerCli }] = await Promise.all([
73
- import("./chunks/app-server-runtime-OWEIHFEU.js"),
74
- import("./chunks/cli-T6TTMVSU.js")
73
+ import("./chunks/app-server-runtime-Q3IGU5YB.js"),
74
+ import("./chunks/cli-2FTM4SXH.js")
75
75
  ]);
76
76
  await runOpenPondAppServerCli(createOpenPondAppServer);
77
77
  return true;
@@ -79,15 +79,15 @@ async function runEmbeddedCompanion(argv) {
79
79
  if (argv[0] === "__server") {
80
80
  process.argv = [process.execPath, "openpond-server", ...argv.slice(1)];
81
81
  const [{ createOpenPondServer }, { runOpenPondServerCli }] = await Promise.all([
82
- import("./chunks/src-7S66FU4P.js"),
83
- import("./chunks/cli-T6TTMVSU.js")
82
+ import("./chunks/src-JOTV67WO.js"),
83
+ import("./chunks/cli-2FTM4SXH.js")
84
84
  ]);
85
- const { createOpenPondAppServer } = await import("./chunks/app-server-runtime-OWEIHFEU.js");
85
+ const { createOpenPondAppServer } = await import("./chunks/app-server-runtime-Q3IGU5YB.js");
86
86
  await runOpenPondServerCli({ createOpenPondServer, createOpenPondAppServer });
87
87
  return true;
88
88
  }
89
89
  if (argv[0] === "__terminal") {
90
- await (await import("./chunks/src-GCZ2GMG3.js")).runOpenPondTerminalCli(argv.slice(1));
90
+ await (await import("./chunks/src-P2BL3KCV.js")).runOpenPondTerminalCli(argv.slice(1));
91
91
  return true;
92
92
  }
93
93
  return false;
package/dist/index.js CHANGED
@@ -23261,7 +23261,7 @@ import {
23261
23261
  readFile as readFile5,
23262
23262
  readdir as readdir2,
23263
23263
  rename,
23264
- rm,
23264
+ rm as rm2,
23265
23265
  symlink,
23266
23266
  writeFile as writeFile2
23267
23267
  } from "node:fs/promises";
@@ -23930,7 +23930,7 @@ function text3(value) {
23930
23930
  // ../../packages/cloud/src/profile/profile-git.ts
23931
23931
  import { spawn } from "node:child_process";
23932
23932
  import { existsSync as existsSync3 } from "node:fs";
23933
- import { readFile as readFile3, writeFile } from "node:fs/promises";
23933
+ import { readFile as readFile3, rm, writeFile } from "node:fs/promises";
23934
23934
  import path6 from "node:path";
23935
23935
  var PROFILE_REPO_GITIGNORE = [
23936
23936
  "**/node_modules/",
@@ -24154,6 +24154,8 @@ async function runGitCommand(repoPath, args, options = {}) {
24154
24154
  proc.on("close", (code) => {
24155
24155
  resolve({ code, stdout, stderr });
24156
24156
  });
24157
+ if (options.input !== void 0) proc.stdin?.end(options.input);
24158
+ else proc.stdin?.end();
24157
24159
  });
24158
24160
  }
24159
24161
 
@@ -24717,10 +24719,10 @@ async function installAgentPackageIntoActiveProfile(input) {
24717
24719
  [agentPackage.agentId]: agentPackage.title
24718
24720
  };
24719
24721
  await writeProfileManifest(active.config.repoPath, manifest);
24720
- if (movedExisting) await rm(backup, { recursive: true, force: true });
24722
+ if (movedExisting) await rm2(backup, { recursive: true, force: true });
24721
24723
  } catch (error51) {
24722
- await rm(temporary, { recursive: true, force: true });
24723
- if (installed) await rm(target, { recursive: true, force: true });
24724
+ await rm2(temporary, { recursive: true, force: true });
24725
+ if (installed) await rm2(target, { recursive: true, force: true });
24724
24726
  if (movedExisting && existsSync4(backup)) await rename(backup, target);
24725
24727
  if (JSON.stringify(manifest) !== originalManifest) {
24726
24728
  await writeProfileManifest(
@@ -8,8 +8,30 @@ export declare function commitProfileChanges(repoPath: string, message: string):
8
8
  state: OpenPondProfileGitState;
9
9
  }>;
10
10
  export declare function profileGitHead(repoPath: string): Promise<string | null>;
11
+ export type ProfileBenchmarkGitReceipt = {
12
+ ref: string;
13
+ commit: string;
14
+ baseCommit: string;
15
+ paths: string[];
16
+ };
17
+ /**
18
+ * Preserves a benchmark result without changing the checked-out branch, index,
19
+ * or worktree. The caller supplies the complete bounded files to add on top of
20
+ * the admitted Profile commit; large run artifacts remain in managed storage.
21
+ */
22
+ export declare function commitProfileBenchmarkRef(input: {
23
+ repoPath: string;
24
+ runId: string;
25
+ baseCommit?: string | null;
26
+ files: Array<{
27
+ path: string;
28
+ contents: string | Uint8Array;
29
+ }>;
30
+ message?: string;
31
+ }): Promise<ProfileBenchmarkGitReceipt>;
11
32
  export declare function runGitCommand(repoPath: string, args: string[], options?: {
12
33
  env?: NodeJS.ProcessEnv;
34
+ input?: string | Uint8Array;
13
35
  }): Promise<{
14
36
  code: number | null;
15
37
  stdout: string;
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: openpond-taskset-authoring
3
- description: Create, improve, inspect, test, or prepare an OpenPond Taskset from a capability, Profile Agent, consented conversations, imported datasets, examples, and traces. Use when the user asks for training or evaluation tasks, graders, GRPO/RFT environments, baseline evaluation, Taskset readiness, or help deciding what a model should practice.
3
+ description: Create, improve, inspect, test, or prepare an OpenPond Taskset from a capability, Profile Agent, consented conversations, imported datasets, examples, and traces. Use when the user asks for training or evaluation tasks, controlled benchmarks, graders, GRPO/RFT environments, baseline evaluation, Taskset readiness, or help deciding what a model should practice.
4
4
  ---
5
5
 
6
6
  # OpenPond Taskset Authoring
@@ -69,6 +69,13 @@ general capability. Historical assistant messages are candidate outcomes, not
69
69
  automatically approved demonstrations. Frozen evaluation tasks never become
70
70
  prompt examples, repair context, demonstrations, or grader calibration data.
71
71
 
72
+ When the user asks for a benchmark, distinguish a normal Taskset that happens
73
+ to contain frozen evaluation cases from a controlled benchmark that compares
74
+ two policies, Models, or Harness releases. Author the latter from the user's
75
+ claim and evidence, freeze its protocol and held-out cases, and keep its run
76
+ separate from training. Do not substitute a built-in catalog fixture merely
77
+ because its name sounds related.
78
+
72
79
  Read only the reference needed for the current decision:
73
80
 
74
81
  - Task contracts, task reconstruction, and split isolation:
@@ -78,3 +85,4 @@ Read only the reference needed for the current decision:
78
85
  - Method selection and readiness: `references/method-selection.md`
79
86
  - Privacy, consent, and provenance:
80
87
  `references/privacy-and-provenance.md`
88
+ - Controlled benchmark design and comparison: `references/benchmarking.md`
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "artifactVersion": "openpond.taskset-authoring.2026-08-04.1",
3
+ "artifactVersion": "openpond.taskset-authoring.2026-08-09.1",
4
4
  "skillName": "openpond-taskset-authoring",
5
5
  "source": {
6
6
  "repository": "openpond/openpond",
@@ -10,8 +10,8 @@
10
10
  "files": [
11
11
  {
12
12
  "path": "SKILL.md",
13
- "sha256": "9e1e8a071103b485f8ce7975081bbbc2f11e3510a1fb653b3754406dd7180cd6",
14
- "contents": "---\nname: openpond-taskset-authoring\ndescription: Create, improve, inspect, test, or prepare an OpenPond Taskset from a capability, Profile Agent, consented conversations, imported datasets, examples, and traces. Use when the user asks for training or evaluation tasks, graders, GRPO/RFT environments, baseline evaluation, Taskset readiness, or help deciding what a model should practice.\n---\n\n# OpenPond Taskset Authoring\n\nTurn a normal chat request into a tested, reusable Taskset. The user should only\nneed a short sentence, for example:\n\n> Build a Taskset that teaches a support triage agent to make consistent routing decisions.\n\nDo not ask the user to provide internal names, IDs, schema fields, split-family\nIDs, action names, approval booleans, or orchestration instructions. Infer\nreversible defaults from the selected Profile, Agent, evidence, and current\nconversation.\n\nWhen a missing choice would materially change the tasks or their grading, ask\none plain-language question at a time. Ask only about:\n\n- the repeated behavior the model should learn;\n- the starting evidence or state it may see;\n- the tools or actions it may use;\n- what observable result should count as success;\n- privacy, licensing, or data boundaries;\n- task variety or run budget when the default is unsuitable.\n\n## What a Taskset contains\n\nA Taskset is a versioned, executable training and evaluation package:\n\n- task instances and their source/data references;\n- isolated training, validation, and frozen-evaluation splits;\n- the Profile, Agent, Harness, tools, reset, and termination contract;\n- graders, reward components, fixtures, and aggregate metrics;\n- resource, network, private-verifier, and artifact boundaries;\n- provenance plus an immutable, content-addressed release.\n\nThe dataset is the task collection or source data inside that package. It is\nnot the whole Taskset. A Model is also separate: submitting the first rollout or\ntraining run should resolve a Model project, record base-policy version 0, and\nattach the run to it. Taskset creation alone does not imply trained weights.\n\n## Authoring workflow\n\n1. Infer the capability and claim from the user's sentence.\n2. Inspect only the selected Profile, Agent, tools, and consented evidence.\n3. Separate stable behavior from changing knowledge. Recommend prompting,\n retrieval, or `no_training` when weights are not the right intervention.\n4. Ask one focused question only when a material decision cannot be inferred.\n5. Draft a compact proposal in product language, keeping policy-visible input\n separate from expected outcomes and private grader state.\n6. Author varied tasks with semantic families isolated by split. Label examples\n `extracted`, `corrected`, `synthetic`, or `expert_authored`.\n7. Prefer deterministic graders. Pin, calibrate, and version any model judge.\n8. Use ordinary conversational confirmation before materializing the proposed\n Taskset. Do not expose the underlying action payload.\n9. Validate schema and lifecycle, grader fixtures, leakage, reward hacking,\n optional reference-solution solvability, and a bounded base-model baseline.\n10. Return a compact readiness summary and keep training as the next, separate\n action.\n\nUse the installed Dataset Builder actions for design, materialization, and\ntesting, following their schemas internally. Do not recite those schemas in the\nchat.\n\nTreat fixed synthetic smoke fixtures as diagnostics rather than evidence of a\ngeneral capability. Historical assistant messages are candidate outcomes, not\nautomatically approved demonstrations. Frozen evaluation tasks never become\nprompt examples, repair context, demonstrations, or grader calibration data.\n\nRead only the reference needed for the current decision:\n\n- Task contracts, task reconstruction, and split isolation:\n `references/task-design.md`\n- Graders, reward eligibility, and calibration:\n `references/graders-and-rewards.md`\n- Method selection and readiness: `references/method-selection.md`\n- Privacy, consent, and provenance:\n `references/privacy-and-provenance.md`\n"
13
+ "sha256": "3c825baedd91750d049073874aebea622cf2ef622404812cc81cbf162e738b65",
14
+ "contents": "---\nname: openpond-taskset-authoring\ndescription: Create, improve, inspect, test, or prepare an OpenPond Taskset from a capability, Profile Agent, consented conversations, imported datasets, examples, and traces. Use when the user asks for training or evaluation tasks, controlled benchmarks, graders, GRPO/RFT environments, baseline evaluation, Taskset readiness, or help deciding what a model should practice.\n---\n\n# OpenPond Taskset Authoring\n\nTurn a normal chat request into a tested, reusable Taskset. The user should only\nneed a short sentence, for example:\n\n> Build a Taskset that teaches a support triage agent to make consistent routing decisions.\n\nDo not ask the user to provide internal names, IDs, schema fields, split-family\nIDs, action names, approval booleans, or orchestration instructions. Infer\nreversible defaults from the selected Profile, Agent, evidence, and current\nconversation.\n\nWhen a missing choice would materially change the tasks or their grading, ask\none plain-language question at a time. Ask only about:\n\n- the repeated behavior the model should learn;\n- the starting evidence or state it may see;\n- the tools or actions it may use;\n- what observable result should count as success;\n- privacy, licensing, or data boundaries;\n- task variety or run budget when the default is unsuitable.\n\n## What a Taskset contains\n\nA Taskset is a versioned, executable training and evaluation package:\n\n- task instances and their source/data references;\n- isolated training, validation, and frozen-evaluation splits;\n- the Profile, Agent, Harness, tools, reset, and termination contract;\n- graders, reward components, fixtures, and aggregate metrics;\n- resource, network, private-verifier, and artifact boundaries;\n- provenance plus an immutable, content-addressed release.\n\nThe dataset is the task collection or source data inside that package. It is\nnot the whole Taskset. A Model is also separate: submitting the first rollout or\ntraining run should resolve a Model project, record base-policy version 0, and\nattach the run to it. Taskset creation alone does not imply trained weights.\n\n## Authoring workflow\n\n1. Infer the capability and claim from the user's sentence.\n2. Inspect only the selected Profile, Agent, tools, and consented evidence.\n3. Separate stable behavior from changing knowledge. Recommend prompting,\n retrieval, or `no_training` when weights are not the right intervention.\n4. Ask one focused question only when a material decision cannot be inferred.\n5. Draft a compact proposal in product language, keeping policy-visible input\n separate from expected outcomes and private grader state.\n6. Author varied tasks with semantic families isolated by split. Label examples\n `extracted`, `corrected`, `synthetic`, or `expert_authored`.\n7. Prefer deterministic graders. Pin, calibrate, and version any model judge.\n8. Use ordinary conversational confirmation before materializing the proposed\n Taskset. Do not expose the underlying action payload.\n9. Validate schema and lifecycle, grader fixtures, leakage, reward hacking,\n optional reference-solution solvability, and a bounded base-model baseline.\n10. Return a compact readiness summary and keep training as the next, separate\n action.\n\nUse the installed Dataset Builder actions for design, materialization, and\ntesting, following their schemas internally. Do not recite those schemas in the\nchat.\n\nTreat fixed synthetic smoke fixtures as diagnostics rather than evidence of a\ngeneral capability. Historical assistant messages are candidate outcomes, not\nautomatically approved demonstrations. Frozen evaluation tasks never become\nprompt examples, repair context, demonstrations, or grader calibration data.\n\nWhen the user asks for a benchmark, distinguish a normal Taskset that happens\nto contain frozen evaluation cases from a controlled benchmark that compares\ntwo policies, Models, or Harness releases. Author the latter from the user's\nclaim and evidence, freeze its protocol and held-out cases, and keep its run\nseparate from training. Do not substitute a built-in catalog fixture merely\nbecause its name sounds related.\n\nRead only the reference needed for the current decision:\n\n- Task contracts, task reconstruction, and split isolation:\n `references/task-design.md`\n- Graders, reward eligibility, and calibration:\n `references/graders-and-rewards.md`\n- Method selection and readiness: `references/method-selection.md`\n- Privacy, consent, and provenance:\n `references/privacy-and-provenance.md`\n- Controlled benchmark design and comparison: `references/benchmarking.md`\n"
15
15
  },
16
16
  {
17
17
  "path": "references/task-design.md",
@@ -32,8 +32,13 @@
32
32
  "path": "references/privacy-and-provenance.md",
33
33
  "sha256": "9d84220cf93037984ac871a5e7a7382368d6071f6a5a1d9d6fe529052891aafd",
34
34
  "contents": "# Privacy and provenance\n\n- Require source consent before authoring and separate disclosure approval before a hosted model reads source content.\n- Show the analysis provider/model, exact source scope, and whether raw or transformed evidence leaves the machine.\n- Block unresolved secrets, licensing violations, hidden grader leakage, and unapproved connected-app data.\n- Record source hashes, model/config, skill hash, prompt/template version, SDK version, source commit, assumptions, and repair history.\n- Keep the authoring transcript separate from the typed proposal and approved materialized Taskset.\n- Training export is a later approval and contains only approved transformed assets.\n- A revoked source remains identifiable in an existing receipt but must not be\n re-read or resent to a model in a later review.\n"
35
+ },
36
+ {
37
+ "path": "references/benchmarking.md",
38
+ "sha256": "10d7c02eb5fb9fc529fdd028bc033467acfca988df0ea1738e5077bf3ac077d6",
39
+ "contents": "# Controlled benchmarks\n\n- Treat a benchmark as a released Taskset plus a pinned comparison protocol,\n not as a training method or a catalog shortcut.\n- Infer whether the user wants ordinary frozen evaluation or a repeatable\n baseline/candidate comparison. A Taskset may contain frozen-evaluation cases\n without becoming a benchmark.\n- State the claim before authoring cases. Define the primary metric and a hard\n quality gate so efficiency gains cannot hide outcome regressions.\n- Isolate adaptation evidence from held-out evaluation by source cluster.\n Neither the candidate author nor its repair context may inspect held-out\n prompts, expected outcomes, grader decisions, or attempt results.\n- Pin the Taskset release, policy or Harness releases, model identity,\n reasoning effort, runtime and version, tools, limits, seeds, repetitions,\n sampling, graders, and environment. Refuse a paired conclusion when these\n differ between baseline and candidate.\n- Author cases from the user's requested capability and approved evidence.\n Do not silently install a repository-owned reference suite or generate cases\n from a hardcoded benchmark name.\n- Keep reusable reference suites content-addressed. A host may ship one as a\n read-only built-in Taskset that appears automatically; do not copy its cases\n into a newly authored benchmark or present it as an authoring template.\n- Validate case realism, split isolation, grader calibration, solvability,\n runtime conformance, and receipt completeness before publishing a result.\n- Materializing or running a benchmark never starts training. Training remains\n a separate, explicit decision based on the resulting evidence.\n"
35
40
  }
36
41
  ],
37
- "bundle": "---\nname: openpond-taskset-authoring\ndescription: Create, improve, inspect, test, or prepare an OpenPond Taskset from a capability, Profile Agent, consented conversations, imported datasets, examples, and traces. Use when the user asks for training or evaluation tasks, graders, GRPO/RFT environments, baseline evaluation, Taskset readiness, or help deciding what a model should practice.\n---\n\n# OpenPond Taskset Authoring\n\nTurn a normal chat request into a tested, reusable Taskset. The user should only\nneed a short sentence, for example:\n\n> Build a Taskset that teaches a support triage agent to make consistent routing decisions.\n\nDo not ask the user to provide internal names, IDs, schema fields, split-family\nIDs, action names, approval booleans, or orchestration instructions. Infer\nreversible defaults from the selected Profile, Agent, evidence, and current\nconversation.\n\nWhen a missing choice would materially change the tasks or their grading, ask\none plain-language question at a time. Ask only about:\n\n- the repeated behavior the model should learn;\n- the starting evidence or state it may see;\n- the tools or actions it may use;\n- what observable result should count as success;\n- privacy, licensing, or data boundaries;\n- task variety or run budget when the default is unsuitable.\n\n## What a Taskset contains\n\nA Taskset is a versioned, executable training and evaluation package:\n\n- task instances and their source/data references;\n- isolated training, validation, and frozen-evaluation splits;\n- the Profile, Agent, Harness, tools, reset, and termination contract;\n- graders, reward components, fixtures, and aggregate metrics;\n- resource, network, private-verifier, and artifact boundaries;\n- provenance plus an immutable, content-addressed release.\n\nThe dataset is the task collection or source data inside that package. It is\nnot the whole Taskset. A Model is also separate: submitting the first rollout or\ntraining run should resolve a Model project, record base-policy version 0, and\nattach the run to it. Taskset creation alone does not imply trained weights.\n\n## Authoring workflow\n\n1. Infer the capability and claim from the user's sentence.\n2. Inspect only the selected Profile, Agent, tools, and consented evidence.\n3. Separate stable behavior from changing knowledge. Recommend prompting,\n retrieval, or `no_training` when weights are not the right intervention.\n4. Ask one focused question only when a material decision cannot be inferred.\n5. Draft a compact proposal in product language, keeping policy-visible input\n separate from expected outcomes and private grader state.\n6. Author varied tasks with semantic families isolated by split. Label examples\n `extracted`, `corrected`, `synthetic`, or `expert_authored`.\n7. Prefer deterministic graders. Pin, calibrate, and version any model judge.\n8. Use ordinary conversational confirmation before materializing the proposed\n Taskset. Do not expose the underlying action payload.\n9. Validate schema and lifecycle, grader fixtures, leakage, reward hacking,\n optional reference-solution solvability, and a bounded base-model baseline.\n10. Return a compact readiness summary and keep training as the next, separate\n action.\n\nUse the installed Dataset Builder actions for design, materialization, and\ntesting, following their schemas internally. Do not recite those schemas in the\nchat.\n\nTreat fixed synthetic smoke fixtures as diagnostics rather than evidence of a\ngeneral capability. Historical assistant messages are candidate outcomes, not\nautomatically approved demonstrations. Frozen evaluation tasks never become\nprompt examples, repair context, demonstrations, or grader calibration data.\n\nRead only the reference needed for the current decision:\n\n- Task contracts, task reconstruction, and split isolation:\n `references/task-design.md`\n- Graders, reward eligibility, and calibration:\n `references/graders-and-rewards.md`\n- Method selection and readiness: `references/method-selection.md`\n- Privacy, consent, and provenance:\n `references/privacy-and-provenance.md`\n\n## Bundled reference: task-design.md\n\n# Task design\n\n- Use these terms precisely:\n - a **task** is one executable episode with an instruction, starting state,\n runtime, and success check;\n - a **dataset** is a reusable collection of task records or source data;\n - a **Taskset** is the versioned package that selects those tasks and binds\n their split, verifier, runtime contract, metrics, and provenance;\n - a **run** applies a model to a released Taskset;\n - a **Model** owns the base policy and any trained versions produced by runs.\n- Treat the Taskset as a module and release boundary, not as a code-authoring\n burden for the user. Emit a content-addressed bundle that native OpenPond,\n OpenPond Managed workers or a later adapter can load without changing task\n semantics.\n- Treat a task as an executable contract, not just a row. Specify the\n policy-facing instruction, initial state, Harness/tools, verifier, task-owned\n evidence, lifecycle, resource limits, network policy, and optional reference\n solution.\n- Keep task configuration nested by responsibility: task metadata, policy\n runtime, verifier runtime, environment resources, and artifacts. Do not leak\n infrastructure configuration into the natural-language instruction.\n- Declare whether the verifier shares the policy environment or runs in a\n separate private environment. Prefer separate verification when grader code,\n secrets, clean state, or tamper-resistant evidence must remain unavailable to\n the policy.\n- Declare the exact artifacts or state transitions the verifier may inspect.\n Treat agent-controlled logs as untrusted unless a private Harness or isolated\n service records them.\n- Use a reference solution or oracle when it can sanity-check solvability, but\n never expose it to the student or treat it as mandatory for tasks verified by\n state, tests, or reward.\n- Use sequential steps only when later instructions or verification genuinely\n depend on earlier state. Give every step its own instruction, termination,\n verifier evidence, and failure boundary.\n- Define the work from the starting state available to the policy, not from the original chat's hidden future.\n- Preserve a source-cluster key for semantically related examples. One cluster may appear in exactly one split.\n- Frozen evaluation examples may never be used as demonstrations, prompt exemplars, repair context, or judge calibration data.\n- Store transformed task inputs and content-addressed source references. Do not place raw unrelated chats in a Taskset.\n- Treat source conversations as evidence. Select only successful, context-complete outcomes; reject stale or contradictory answers and label every repaired or synthetic example.\n- Separate stable behavior from changing facts before selecting a training method. A repeated subject is not automatically a repeated learnable job.\n- Stateful tasks declare create/reset/step/grade/cleanup, timeouts, deterministic seeds when possible, tool scopes, and network policy.\n- A Taskset can target chat, one agent, multiple agents, or a custom harness. Do not force it into an Agent SDK project.\n- Write names and objectives for the person reviewing the Taskset. Describe the capability and outcome, not its storage or evaluation machinery.\n- Keep source IDs, hashes, cluster keys, split rules, privileged targets, encodings, and grader mechanics out of user-facing names and objectives.\n- Mark synthetic fixed-output smoke cases as diagnostics and prefer `no_training`; do not present them as discovered organizational workflows.\n\n## Bundled reference: graders-and-rewards.md\n\n# Graders and rewards\n\n- Prefer exact, schema, file, diff, test, runtime-event, and final-state graders.\n- Compose graders with explicit weights and hard gates. Infrastructure failures receive no reward.\n- Generated verifier code runs without network or broad credentials and has a strict timeout.\n- Run private or tamper-sensitive verifier logic outside the policy-controlled\n environment. Transfer only declared task artifacts or signed Harness\n receipts into that verifier boundary.\n- A generated verifier exports one function that receives `{ task, attempt }`. Read policy input from `task.input`, the privileged expected outcome from `task.expectedOutput`, the candidate from `attempt.output`, and infrastructure state from `attempt.infrastructureError`. Flat `input`, `expectedOutput`, `output`, and `infrastructureError` aliases are also available, but new verifier code should use the nested form.\n- Return `{ passed, score, feedback, evidenceRefs? }`. `reason` is accepted as a feedback alias, but new verifier code should return `feedback`.\n- Test positive, negative, boundary, adversarial, prompt-injection, leakage, and infrastructure-failure fixtures.\n- A model judge records provider/model, configuration, rubric version, evidence, structured score, rationale, and calibration status.\n- Only frozen graders that pass calibration and hacking tests may be marked reward-eligible.\n- SFT uses graders for baselines and frozen evaluation, not as optimizer reward.\n\n## Bundled reference: method-selection.md\n\n# Method selection\n\n- Changing facts and internal documents: retrieval/context.\n- Approved input-output demonstrations: SFT.\n- Corrections or chosen/rejected pairs: SFT and/or preference tuning.\n- Stable exact labels: classification/SFT; consider RL only after baseline evidence.\n- Reliable scalar reward with non-trivial baseline variance: GRPO/RFT.\n- Runtime, test, or reviewer feedback on policy attempts: SDPO when a proven backend supports it.\n- Teacher-only demonstrations: SDFT/OPSD when the teacher surface exposes the required signal.\n- Long processes with tools and state: agentic RL environment.\n\nChoose the method only after the Taskset and baseline expose the available signal. A first small smoke run may use GRPO when rewards are executable, bounded, and show non-trivial baseline variance. SFT remains the simplest path for approved demonstrations, and DPO is appropriate only when trustworthy preference pairs exist. Do not stack SFT, DPO, GRPO, and PPO by default; each method needs a specific signal and reason. A real destination must still prove the chosen execution contract before training starts.\n\n## Bundled reference: privacy-and-provenance.md\n\n# Privacy and provenance\n\n- Require source consent before authoring and separate disclosure approval before a hosted model reads source content.\n- Show the analysis provider/model, exact source scope, and whether raw or transformed evidence leaves the machine.\n- Block unresolved secrets, licensing violations, hidden grader leakage, and unapproved connected-app data.\n- Record source hashes, model/config, skill hash, prompt/template version, SDK version, source commit, assumptions, and repair history.\n- Keep the authoring transcript separate from the typed proposal and approved materialized Taskset.\n- Training export is a later approval and contains only approved transformed assets.\n- A revoked source remains identifiable in an existing receipt but must not be\n re-read or resent to a model in a later review.",
38
- "contentHash": "af794760bbb52573c325d5f5e79eace6f9c1e68e3bcdd6e88da232148eac96f9"
42
+ "bundle": "---\nname: openpond-taskset-authoring\ndescription: Create, improve, inspect, test, or prepare an OpenPond Taskset from a capability, Profile Agent, consented conversations, imported datasets, examples, and traces. Use when the user asks for training or evaluation tasks, controlled benchmarks, graders, GRPO/RFT environments, baseline evaluation, Taskset readiness, or help deciding what a model should practice.\n---\n\n# OpenPond Taskset Authoring\n\nTurn a normal chat request into a tested, reusable Taskset. The user should only\nneed a short sentence, for example:\n\n> Build a Taskset that teaches a support triage agent to make consistent routing decisions.\n\nDo not ask the user to provide internal names, IDs, schema fields, split-family\nIDs, action names, approval booleans, or orchestration instructions. Infer\nreversible defaults from the selected Profile, Agent, evidence, and current\nconversation.\n\nWhen a missing choice would materially change the tasks or their grading, ask\none plain-language question at a time. Ask only about:\n\n- the repeated behavior the model should learn;\n- the starting evidence or state it may see;\n- the tools or actions it may use;\n- what observable result should count as success;\n- privacy, licensing, or data boundaries;\n- task variety or run budget when the default is unsuitable.\n\n## What a Taskset contains\n\nA Taskset is a versioned, executable training and evaluation package:\n\n- task instances and their source/data references;\n- isolated training, validation, and frozen-evaluation splits;\n- the Profile, Agent, Harness, tools, reset, and termination contract;\n- graders, reward components, fixtures, and aggregate metrics;\n- resource, network, private-verifier, and artifact boundaries;\n- provenance plus an immutable, content-addressed release.\n\nThe dataset is the task collection or source data inside that package. It is\nnot the whole Taskset. A Model is also separate: submitting the first rollout or\ntraining run should resolve a Model project, record base-policy version 0, and\nattach the run to it. Taskset creation alone does not imply trained weights.\n\n## Authoring workflow\n\n1. Infer the capability and claim from the user's sentence.\n2. Inspect only the selected Profile, Agent, tools, and consented evidence.\n3. Separate stable behavior from changing knowledge. Recommend prompting,\n retrieval, or `no_training` when weights are not the right intervention.\n4. Ask one focused question only when a material decision cannot be inferred.\n5. Draft a compact proposal in product language, keeping policy-visible input\n separate from expected outcomes and private grader state.\n6. Author varied tasks with semantic families isolated by split. Label examples\n `extracted`, `corrected`, `synthetic`, or `expert_authored`.\n7. Prefer deterministic graders. Pin, calibrate, and version any model judge.\n8. Use ordinary conversational confirmation before materializing the proposed\n Taskset. Do not expose the underlying action payload.\n9. Validate schema and lifecycle, grader fixtures, leakage, reward hacking,\n optional reference-solution solvability, and a bounded base-model baseline.\n10. Return a compact readiness summary and keep training as the next, separate\n action.\n\nUse the installed Dataset Builder actions for design, materialization, and\ntesting, following their schemas internally. Do not recite those schemas in the\nchat.\n\nTreat fixed synthetic smoke fixtures as diagnostics rather than evidence of a\ngeneral capability. Historical assistant messages are candidate outcomes, not\nautomatically approved demonstrations. Frozen evaluation tasks never become\nprompt examples, repair context, demonstrations, or grader calibration data.\n\nWhen the user asks for a benchmark, distinguish a normal Taskset that happens\nto contain frozen evaluation cases from a controlled benchmark that compares\ntwo policies, Models, or Harness releases. Author the latter from the user's\nclaim and evidence, freeze its protocol and held-out cases, and keep its run\nseparate from training. Do not substitute a built-in catalog fixture merely\nbecause its name sounds related.\n\nRead only the reference needed for the current decision:\n\n- Task contracts, task reconstruction, and split isolation:\n `references/task-design.md`\n- Graders, reward eligibility, and calibration:\n `references/graders-and-rewards.md`\n- Method selection and readiness: `references/method-selection.md`\n- Privacy, consent, and provenance:\n `references/privacy-and-provenance.md`\n- Controlled benchmark design and comparison: `references/benchmarking.md`\n\n## Bundled reference: task-design.md\n\n# Task design\n\n- Use these terms precisely:\n - a **task** is one executable episode with an instruction, starting state,\n runtime, and success check;\n - a **dataset** is a reusable collection of task records or source data;\n - a **Taskset** is the versioned package that selects those tasks and binds\n their split, verifier, runtime contract, metrics, and provenance;\n - a **run** applies a model to a released Taskset;\n - a **Model** owns the base policy and any trained versions produced by runs.\n- Treat the Taskset as a module and release boundary, not as a code-authoring\n burden for the user. Emit a content-addressed bundle that native OpenPond,\n OpenPond Managed workers or a later adapter can load without changing task\n semantics.\n- Treat a task as an executable contract, not just a row. Specify the\n policy-facing instruction, initial state, Harness/tools, verifier, task-owned\n evidence, lifecycle, resource limits, network policy, and optional reference\n solution.\n- Keep task configuration nested by responsibility: task metadata, policy\n runtime, verifier runtime, environment resources, and artifacts. Do not leak\n infrastructure configuration into the natural-language instruction.\n- Declare whether the verifier shares the policy environment or runs in a\n separate private environment. Prefer separate verification when grader code,\n secrets, clean state, or tamper-resistant evidence must remain unavailable to\n the policy.\n- Declare the exact artifacts or state transitions the verifier may inspect.\n Treat agent-controlled logs as untrusted unless a private Harness or isolated\n service records them.\n- Use a reference solution or oracle when it can sanity-check solvability, but\n never expose it to the student or treat it as mandatory for tasks verified by\n state, tests, or reward.\n- Use sequential steps only when later instructions or verification genuinely\n depend on earlier state. Give every step its own instruction, termination,\n verifier evidence, and failure boundary.\n- Define the work from the starting state available to the policy, not from the original chat's hidden future.\n- Preserve a source-cluster key for semantically related examples. One cluster may appear in exactly one split.\n- Frozen evaluation examples may never be used as demonstrations, prompt exemplars, repair context, or judge calibration data.\n- Store transformed task inputs and content-addressed source references. Do not place raw unrelated chats in a Taskset.\n- Treat source conversations as evidence. Select only successful, context-complete outcomes; reject stale or contradictory answers and label every repaired or synthetic example.\n- Separate stable behavior from changing facts before selecting a training method. A repeated subject is not automatically a repeated learnable job.\n- Stateful tasks declare create/reset/step/grade/cleanup, timeouts, deterministic seeds when possible, tool scopes, and network policy.\n- A Taskset can target chat, one agent, multiple agents, or a custom harness. Do not force it into an Agent SDK project.\n- Write names and objectives for the person reviewing the Taskset. Describe the capability and outcome, not its storage or evaluation machinery.\n- Keep source IDs, hashes, cluster keys, split rules, privileged targets, encodings, and grader mechanics out of user-facing names and objectives.\n- Mark synthetic fixed-output smoke cases as diagnostics and prefer `no_training`; do not present them as discovered organizational workflows.\n\n## Bundled reference: graders-and-rewards.md\n\n# Graders and rewards\n\n- Prefer exact, schema, file, diff, test, runtime-event, and final-state graders.\n- Compose graders with explicit weights and hard gates. Infrastructure failures receive no reward.\n- Generated verifier code runs without network or broad credentials and has a strict timeout.\n- Run private or tamper-sensitive verifier logic outside the policy-controlled\n environment. Transfer only declared task artifacts or signed Harness\n receipts into that verifier boundary.\n- A generated verifier exports one function that receives `{ task, attempt }`. Read policy input from `task.input`, the privileged expected outcome from `task.expectedOutput`, the candidate from `attempt.output`, and infrastructure state from `attempt.infrastructureError`. Flat `input`, `expectedOutput`, `output`, and `infrastructureError` aliases are also available, but new verifier code should use the nested form.\n- Return `{ passed, score, feedback, evidenceRefs? }`. `reason` is accepted as a feedback alias, but new verifier code should return `feedback`.\n- Test positive, negative, boundary, adversarial, prompt-injection, leakage, and infrastructure-failure fixtures.\n- A model judge records provider/model, configuration, rubric version, evidence, structured score, rationale, and calibration status.\n- Only frozen graders that pass calibration and hacking tests may be marked reward-eligible.\n- SFT uses graders for baselines and frozen evaluation, not as optimizer reward.\n\n## Bundled reference: method-selection.md\n\n# Method selection\n\n- Changing facts and internal documents: retrieval/context.\n- Approved input-output demonstrations: SFT.\n- Corrections or chosen/rejected pairs: SFT and/or preference tuning.\n- Stable exact labels: classification/SFT; consider RL only after baseline evidence.\n- Reliable scalar reward with non-trivial baseline variance: GRPO/RFT.\n- Runtime, test, or reviewer feedback on policy attempts: SDPO when a proven backend supports it.\n- Teacher-only demonstrations: SDFT/OPSD when the teacher surface exposes the required signal.\n- Long processes with tools and state: agentic RL environment.\n\nChoose the method only after the Taskset and baseline expose the available signal. A first small smoke run may use GRPO when rewards are executable, bounded, and show non-trivial baseline variance. SFT remains the simplest path for approved demonstrations, and DPO is appropriate only when trustworthy preference pairs exist. Do not stack SFT, DPO, GRPO, and PPO by default; each method needs a specific signal and reason. A real destination must still prove the chosen execution contract before training starts.\n\n## Bundled reference: privacy-and-provenance.md\n\n# Privacy and provenance\n\n- Require source consent before authoring and separate disclosure approval before a hosted model reads source content.\n- Show the analysis provider/model, exact source scope, and whether raw or transformed evidence leaves the machine.\n- Block unresolved secrets, licensing violations, hidden grader leakage, and unapproved connected-app data.\n- Record source hashes, model/config, skill hash, prompt/template version, SDK version, source commit, assumptions, and repair history.\n- Keep the authoring transcript separate from the typed proposal and approved materialized Taskset.\n- Training export is a later approval and contains only approved transformed assets.\n- A revoked source remains identifiable in an existing receipt but must not be\n re-read or resent to a model in a later review.\n\n## Bundled reference: benchmarking.md\n\n# Controlled benchmarks\n\n- Treat a benchmark as a released Taskset plus a pinned comparison protocol,\n not as a training method or a catalog shortcut.\n- Infer whether the user wants ordinary frozen evaluation or a repeatable\n baseline/candidate comparison. A Taskset may contain frozen-evaluation cases\n without becoming a benchmark.\n- State the claim before authoring cases. Define the primary metric and a hard\n quality gate so efficiency gains cannot hide outcome regressions.\n- Isolate adaptation evidence from held-out evaluation by source cluster.\n Neither the candidate author nor its repair context may inspect held-out\n prompts, expected outcomes, grader decisions, or attempt results.\n- Pin the Taskset release, policy or Harness releases, model identity,\n reasoning effort, runtime and version, tools, limits, seeds, repetitions,\n sampling, graders, and environment. Refuse a paired conclusion when these\n differ between baseline and candidate.\n- Author cases from the user's requested capability and approved evidence.\n Do not silently install a repository-owned reference suite or generate cases\n from a hardcoded benchmark name.\n- Keep reusable reference suites content-addressed. A host may ship one as a\n read-only built-in Taskset that appears automatically; do not copy its cases\n into a newly authored benchmark or present it as an authoring template.\n- Validate case realism, split isolation, grader calibration, solvability,\n runtime conformance, and receipt completeness before publishing a result.\n- Materializing or running a benchmark never starts training. Training remains\n a separate, explicit decision based on the resulting evidence.",
43
+ "contentHash": "3790f216a8c8a92531322737175be3e8e06a9260d7e1cd7ddf77a718ad949a19"
39
44
  }
@@ -0,0 +1,26 @@
1
+ # Controlled benchmarks
2
+
3
+ - Treat a benchmark as a released Taskset plus a pinned comparison protocol,
4
+ not as a training method or a catalog shortcut.
5
+ - Infer whether the user wants ordinary frozen evaluation or a repeatable
6
+ baseline/candidate comparison. A Taskset may contain frozen-evaluation cases
7
+ without becoming a benchmark.
8
+ - State the claim before authoring cases. Define the primary metric and a hard
9
+ quality gate so efficiency gains cannot hide outcome regressions.
10
+ - Isolate adaptation evidence from held-out evaluation by source cluster.
11
+ Neither the candidate author nor its repair context may inspect held-out
12
+ prompts, expected outcomes, grader decisions, or attempt results.
13
+ - Pin the Taskset release, policy or Harness releases, model identity,
14
+ reasoning effort, runtime and version, tools, limits, seeds, repetitions,
15
+ sampling, graders, and environment. Refuse a paired conclusion when these
16
+ differ between baseline and candidate.
17
+ - Author cases from the user's requested capability and approved evidence.
18
+ Do not silently install a repository-owned reference suite or generate cases
19
+ from a hardcoded benchmark name.
20
+ - Keep reusable reference suites content-addressed. A host may ship one as a
21
+ read-only built-in Taskset that appears automatically; do not copy its cases
22
+ into a newly authored benchmark or present it as an authoring template.
23
+ - Validate case realism, split isolation, grader calibration, solvability,
24
+ runtime conformance, and receipt completeness before publishing a result.
25
+ - Materializing or running a benchmark never starts training. Training remains
26
+ a separate, explicit decision based on the resulting evidence.
@@ -1 +1 @@
1
- import{r as s,j as w}from"./index-Ure41UF0.js";const d=[],v=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","[contenteditable='true']"].join(",");function T({ariaLabel:r,backdropClassName:o="training-dialog-backdrop",children:a,className:i,contained:t=!1,dismissDisabled:e=!1,initialFocusKey:u,inertExclusionSelector:p,onClose:m}){const f=s.useRef(null),A=s.useRef(Symbol("app-dialog")),b=s.useRef(null),h=s.useRef(e),g=s.useRef(m);h.current=e,g.current=m,s.useEffect(()=>{const n=A.current;b.current=document.activeElement instanceof HTMLElement?document.activeElement:null,d.push(n);const l=t?f.current?.closest(".main-pane")??null:null,E=I(f.current,l,p);function y(c){if(d.at(-1)===n){if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),h.current||g.current();return}c.key!=="Tab"||t||F(c,f.current)}}return document.addEventListener("keydown",y,!0),()=>{document.removeEventListener("keydown",y,!0);const c=d.lastIndexOf(n);c>=0&&d.splice(c,1),E();const x=b.current;x?.isConnected&&x.focus()}},[t,p]),s.useEffect(()=>{const n=window.requestAnimationFrame(()=>{const l=f.current;(l?.querySelector("[data-autofocus]")??l)?.focus()});return()=>window.cancelAnimationFrame(n)},[u]);function R(n){n.target===n.currentTarget&&!e&&m()}function k(n){n.key==="Escape"&&n.stopPropagation()}return w.jsx("div",{className:o,role:"presentation",onMouseDown:R,children:w.jsx("section",{ref:f,"aria-busy":e||void 0,"aria-label":r,"aria-modal":t?void 0:"true",className:i,role:"dialog",tabIndex:-1,onKeyDown:k,onMouseDown:n=>n.stopPropagation(),children:a})})}function D(r){return r?Array.from(r.querySelectorAll(v)).filter(o=>!o.hidden&&o.getAttribute("aria-hidden")!=="true"):[]}function F(r,o){if(!o)return;const a=D(o);if(a.length===0){r.preventDefault(),o.focus();return}const i=a.indexOf(document.activeElement),t=r.shiftKey?i<=0?a.length-1:i-1:i<0||i===a.length-1?0:i+1;r.preventDefault(),a[t]?.focus()}function I(r,o=null,a){if(!r)return()=>{};const i=[];let t=r.parentElement??r;for(;t.parentElement&&t!==document.body;){const e=t.parentElement;for(const u of Array.from(e.children))u===t||!(u instanceof HTMLElement)||a&&u.matches(a)||(i.push({element:u,ariaHidden:u.getAttribute("aria-hidden"),inert:u.inert}),u.inert=!0,u.setAttribute("aria-hidden","true"));if(t=e,o&&t===o)break}return()=>{for(const e of i.reverse())e.element.inert=e.inert,e.ariaHidden===null?e.element.removeAttribute("aria-hidden"):e.element.setAttribute("aria-hidden",e.ariaHidden)}}export{T as A};
1
+ import{r as s,j as w}from"./index-Cxq5q-6B.js";const d=[],v=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","[contenteditable='true']"].join(",");function T({ariaLabel:r,backdropClassName:o="training-dialog-backdrop",children:a,className:i,contained:t=!1,dismissDisabled:e=!1,initialFocusKey:u,inertExclusionSelector:p,onClose:m}){const f=s.useRef(null),A=s.useRef(Symbol("app-dialog")),b=s.useRef(null),h=s.useRef(e),g=s.useRef(m);h.current=e,g.current=m,s.useEffect(()=>{const n=A.current;b.current=document.activeElement instanceof HTMLElement?document.activeElement:null,d.push(n);const l=t?f.current?.closest(".main-pane")??null:null,E=I(f.current,l,p);function y(c){if(d.at(-1)===n){if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),h.current||g.current();return}c.key!=="Tab"||t||F(c,f.current)}}return document.addEventListener("keydown",y,!0),()=>{document.removeEventListener("keydown",y,!0);const c=d.lastIndexOf(n);c>=0&&d.splice(c,1),E();const x=b.current;x?.isConnected&&x.focus()}},[t,p]),s.useEffect(()=>{const n=window.requestAnimationFrame(()=>{const l=f.current;(l?.querySelector("[data-autofocus]")??l)?.focus()});return()=>window.cancelAnimationFrame(n)},[u]);function R(n){n.target===n.currentTarget&&!e&&m()}function k(n){n.key==="Escape"&&n.stopPropagation()}return w.jsx("div",{className:o,role:"presentation",onMouseDown:R,children:w.jsx("section",{ref:f,"aria-busy":e||void 0,"aria-label":r,"aria-modal":t?void 0:"true",className:i,role:"dialog",tabIndex:-1,onKeyDown:k,onMouseDown:n=>n.stopPropagation(),children:a})})}function D(r){return r?Array.from(r.querySelectorAll(v)).filter(o=>!o.hidden&&o.getAttribute("aria-hidden")!=="true"):[]}function F(r,o){if(!o)return;const a=D(o);if(a.length===0){r.preventDefault(),o.focus();return}const i=a.indexOf(document.activeElement),t=r.shiftKey?i<=0?a.length-1:i-1:i<0||i===a.length-1?0:i+1;r.preventDefault(),a[t]?.focus()}function I(r,o=null,a){if(!r)return()=>{};const i=[];let t=r.parentElement??r;for(;t.parentElement&&t!==document.body;){const e=t.parentElement;for(const u of Array.from(e.children))u===t||!(u instanceof HTMLElement)||a&&u.matches(a)||(i.push({element:u,ariaHidden:u.getAttribute("aria-hidden"),inert:u.inert}),u.inert=!0,u.setAttribute("aria-hidden","true"));if(t=e,o&&t===o)break}return()=>{for(const e of i.reverse())e.element.inert=e.inert,e.ariaHidden===null?e.element.removeAttribute("aria-hidden"):e.element.setAttribute("aria-hidden",e.ariaHidden)}}export{T as A};
@@ -1 +1 @@
1
- import{r,bx as b,n as L,j as e,a6 as I,a as k,X as P,O as E,a3 as F,b3 as U,by as T,g as R}from"./index-Ure41UF0.js";const O=["For agents","Featured","Productivity","Developer tools"],D=new Set(["slack","google","github","mcp"]);function J({account:s,connection:n,defaultTeamId:a,onToast:o}){const[c,f]=r.useState(null),[p,v]=r.useState(""),[i,y]=r.useState("For agents"),[u,h]=r.useState(()=>b()),[g,d]=r.useState("idle"),[w,x]=r.useState(null),S=s?.baseUrl??s?.activeProfile?.baseUrl??null,C=M(a,w),N=r.useMemo(()=>u.filter(t=>z(t,i)).filter(t=>q(t,p)),[i,p,u]);r.useEffect(()=>{let t=!0;return n?(d("loading"),L.connectedAppStatus(n,{status:"all"}).then(l=>{t&&(h(l.apps),x(l.teamId?.trim()||null),d("ready"))}).catch(l=>{t&&(console.warn("Unable to load connected app status.",l),h(b()),x(null),d("error"))}),()=>{t=!1}):(h(b()),d("idle"),x(null),()=>{t=!1})},[n]);function A(t){const l=T({appId:t.id,baseUrl:S,teamId:C});V(l).catch(j=>{o?.(j instanceof Error?j.message:String(j),"error")})}return e.jsxs("section",{className:"connected-apps-view","aria-label":"Apps",children:[e.jsxs("div",{className:"connected-apps-header",children:[e.jsxs("div",{children:[e.jsx("h1",{children:"Apps"}),e.jsx("p",{children:"Connect apps that agents can use for chat, knowledge, files, and workflow actions."})]}),e.jsxs("label",{className:"connected-apps-search",children:[e.jsx(I,{size:15}),e.jsx("input",{"aria-label":"Search apps",onChange:t=>v(t.target.value),placeholder:"Search apps",type:"search",value:p})]})]}),e.jsxs("div",{className:`connected-apps-status-strip ${g}`,children:[e.jsx("span",{children:W(g)}),e.jsxs("span",{children:[X(u)," connected"]})]}),e.jsxs("section",{className:"connected-apps-hero","aria-label":"App context",children:[e.jsxs("div",{className:"connected-apps-hero-copy",children:[e.jsx("span",{className:"connected-apps-hero-icon",children:e.jsx(m,{appId:"github"})}),e.jsx("h2",{children:"Work with your apps"}),e.jsx("p",{children:"Bring repositories, documents, chat, calendars, and custom MCP tools into OpenPond."})]}),e.jsxs("div",{className:"connected-apps-context-card","aria-hidden":"true",children:[e.jsx("strong",{children:"Agent context"}),e.jsxs("div",{children:[e.jsx("span",{className:"files",children:"Files"}),e.jsx("span",{className:"chat",children:"Chat"}),e.jsx("span",{className:"oauth",children:"OAuth"}),e.jsx("span",{className:"mcp",children:"MCP"})]})]})]}),e.jsx("div",{className:"connected-apps-filters",role:"tablist","aria-label":"App categories",children:O.map(t=>e.jsx("button",{"aria-selected":i===t,className:i===t?"active":"",onClick:()=>y(t),role:"tab",type:"button",children:t},t))}),e.jsxs("div",{className:"connected-apps-list",children:[N.map(t=>e.jsx(_,{app:t,onSelect:()=>f(t)},t.id)),N.length===0?e.jsx("div",{className:"connected-apps-empty",children:"No apps match the current search."}):null]}),c?e.jsx($,{app:c,onClose:()=>f(null),onInstall:()=>A(c)}):null]})}function M(s,n){const a=s?.trim();return a||n?.trim()||null}function _({app:s,onSelect:n}){return e.jsxs("button",{className:"connected-app-row",onClick:n,type:"button",children:[e.jsxs("span",{className:"connected-app-row-main",children:[e.jsx(m,{appId:s.id}),e.jsxs("span",{className:"connected-app-copy",children:[e.jsxs("span",{className:"connected-app-title",children:[e.jsx("strong",{children:s.label}),e.jsxs("span",{children:[s.shortLabel!==s.label?s.shortLabel:s.category," / ",s.setupSurfaceLabel]})]}),e.jsx("span",{children:s.description}),e.jsxs("span",{className:"connected-app-capability-row",children:[s.capabilityLabels.slice(0,2).map(a=>e.jsx("span",{children:a},a)),s.capabilityLabels.length>2?e.jsxs("span",{children:["+",s.capabilityLabels.length-2]}):null]})]})]}),e.jsx("span",{className:`connected-app-status-pill ${s.status}`,children:s.statusLabel}),e.jsx(k,{size:16})]})}function $({app:s,onClose:n,onInstall:a}){const o=s.connections.filter(c=>c.status==="active");return e.jsx("div",{className:"connected-app-dialog-backdrop",role:"presentation",onMouseDown:c=>{c.target===c.currentTarget&&n()},children:e.jsxs("section",{className:"connected-app-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"connected-app-dialog-title",children:[e.jsx("button",{className:"connected-app-dialog-close",type:"button","aria-label":"Close app details",onClick:n,children:e.jsx(P,{size:17})}),e.jsxs("div",{className:"connected-app-dialog-identity",children:[e.jsx("span",{className:"openpond-mark",children:e.jsx("img",{alt:"",src:E})}),e.jsxs("span",{className:"connection-dots","aria-hidden":"true",children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]}),e.jsx(m,{appId:s.id})]}),e.jsxs("h2",{id:"connected-app-dialog-title",children:["Connect ",s.label]}),e.jsxs("div",{className:"connected-app-approval",children:[e.jsx(F,{size:16}),e.jsx("span",{children:s.statusLabel})]}),e.jsxs("div",{className:"connected-app-dialog-body",children:[e.jsxs("section",{children:[e.jsx("h3",{children:s.setupSurfaceLabel}),e.jsx("p",{children:"The web flow shows the provider account, workspace, and requested access before anything is connected."})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Connected account"}),e.jsx("p",{children:G(o)})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Available capabilities"}),e.jsx("div",{className:"connected-app-dialog-capabilities",children:s.capabilities.map(c=>e.jsx("span",{children:c.label},c.id))})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Sandbox lease policy"}),e.jsx("p",{children:s.leasePolicy.leaseable?`Leaseable for ${s.leasePolicy.defaultTtlSeconds??0} seconds with scoped proxy access.`:"Managed as setup or tool discovery; no OAuth lease is required."})]})]}),e.jsxs("button",{className:"connected-app-dialog-primary",type:"button",onClick:a,children:[e.jsx("span",{children:s.installLabel}),e.jsx(U,{size:15})]})]})})}function m({appId:s}){return e.jsx("span",{className:`connected-app-icon app-${s}`,children:e.jsx("img",{alt:"",src:B(s)})})}function z(s,n){return n==="For agents"?!0:n==="Featured"?D.has(s.id):n==="Productivity"?s.category==="Productivity"||s.category==="Chat":s.category==="Developer tools"||s.id==="mcp"}function q(s,n){const a=n.trim().toLowerCase();return a?[s.id,s.label,s.shortLabel,s.category,s.description,s.providerFamily,s.setupSurface].some(o=>o.toLowerCase().includes(a)):!0}function B(s){return R(s)}async function V(s){const n=window.openpond?.browser;if(n){const a=await n.openExternal({conversationId:"connected-apps",url:s});if(!a.ok)throw new Error(a.error??"Unable to open app setup.");return}window.open(s,"_blank","noopener,noreferrer")}function W(s){return s==="loading"?"Checking connections":s==="ready"?"Connection status current":s==="error"?"Connection status unavailable":"Connection status pending"}function X(s){return s.filter(n=>n.connected).length}function G(s){return s.length===0?"No active OAuth connection for this setup surface.":s.map(n=>{const a=n.accountLabel??"Connected account";return n.workspaceLabel?`${a} / ${n.workspaceLabel}`:a}).join(", ")}export{J as AppsView,_ as ConnectedAppRow,M as connectedAppSetupTeamId};
1
+ import{r,bw as b,n as L,j as e,an as I,a as k,X as P,O as E,a2 as F,b1 as U,bx as T,g as R}from"./index-Cxq5q-6B.js";const O=["For agents","Featured","Productivity","Developer tools"],D=new Set(["slack","google","github","mcp"]);function J({account:s,connection:n,defaultTeamId:a,onToast:o}){const[c,f]=r.useState(null),[p,v]=r.useState(""),[i,w]=r.useState("For agents"),[u,h]=r.useState(()=>b()),[g,d]=r.useState("idle"),[y,x]=r.useState(null),S=s?.baseUrl??s?.activeProfile?.baseUrl??null,C=M(a,y),N=r.useMemo(()=>u.filter(t=>z(t,i)).filter(t=>q(t,p)),[i,p,u]);r.useEffect(()=>{let t=!0;return n?(d("loading"),L.connectedAppStatus(n,{status:"all"}).then(l=>{t&&(h(l.apps),x(l.teamId?.trim()||null),d("ready"))}).catch(l=>{t&&(console.warn("Unable to load connected app status.",l),h(b()),x(null),d("error"))}),()=>{t=!1}):(h(b()),d("idle"),x(null),()=>{t=!1})},[n]);function A(t){const l=T({appId:t.id,baseUrl:S,teamId:C});V(l).catch(j=>{o?.(j instanceof Error?j.message:String(j),"error")})}return e.jsxs("section",{className:"connected-apps-view","aria-label":"Apps",children:[e.jsxs("div",{className:"connected-apps-header",children:[e.jsxs("div",{children:[e.jsx("h1",{children:"Apps"}),e.jsx("p",{children:"Connect apps that agents can use for chat, knowledge, files, and workflow actions."})]}),e.jsxs("label",{className:"connected-apps-search",children:[e.jsx(I,{size:15}),e.jsx("input",{"aria-label":"Search apps",onChange:t=>v(t.target.value),placeholder:"Search apps",type:"search",value:p})]})]}),e.jsxs("div",{className:`connected-apps-status-strip ${g}`,children:[e.jsx("span",{children:W(g)}),e.jsxs("span",{children:[X(u)," connected"]})]}),e.jsxs("section",{className:"connected-apps-hero","aria-label":"App context",children:[e.jsxs("div",{className:"connected-apps-hero-copy",children:[e.jsx("span",{className:"connected-apps-hero-icon",children:e.jsx(m,{appId:"github"})}),e.jsx("h2",{children:"Work with your apps"}),e.jsx("p",{children:"Bring repositories, documents, chat, calendars, and custom MCP tools into OpenPond."})]}),e.jsxs("div",{className:"connected-apps-context-card","aria-hidden":"true",children:[e.jsx("strong",{children:"Agent context"}),e.jsxs("div",{children:[e.jsx("span",{className:"files",children:"Files"}),e.jsx("span",{className:"chat",children:"Chat"}),e.jsx("span",{className:"oauth",children:"OAuth"}),e.jsx("span",{className:"mcp",children:"MCP"})]})]})]}),e.jsx("div",{className:"connected-apps-filters",role:"tablist","aria-label":"App categories",children:O.map(t=>e.jsx("button",{"aria-selected":i===t,className:i===t?"active":"",onClick:()=>w(t),role:"tab",type:"button",children:t},t))}),e.jsxs("div",{className:"connected-apps-list",children:[N.map(t=>e.jsx(_,{app:t,onSelect:()=>f(t)},t.id)),N.length===0?e.jsx("div",{className:"connected-apps-empty",children:"No apps match the current search."}):null]}),c?e.jsx($,{app:c,onClose:()=>f(null),onInstall:()=>A(c)}):null]})}function M(s,n){const a=s?.trim();return a||n?.trim()||null}function _({app:s,onSelect:n}){return e.jsxs("button",{className:"connected-app-row",onClick:n,type:"button",children:[e.jsxs("span",{className:"connected-app-row-main",children:[e.jsx(m,{appId:s.id}),e.jsxs("span",{className:"connected-app-copy",children:[e.jsxs("span",{className:"connected-app-title",children:[e.jsx("strong",{children:s.label}),e.jsxs("span",{children:[s.shortLabel!==s.label?s.shortLabel:s.category," / ",s.setupSurfaceLabel]})]}),e.jsx("span",{children:s.description}),e.jsxs("span",{className:"connected-app-capability-row",children:[s.capabilityLabels.slice(0,2).map(a=>e.jsx("span",{children:a},a)),s.capabilityLabels.length>2?e.jsxs("span",{children:["+",s.capabilityLabels.length-2]}):null]})]})]}),e.jsx("span",{className:`connected-app-status-pill ${s.status}`,children:s.statusLabel}),e.jsx(k,{size:16})]})}function $({app:s,onClose:n,onInstall:a}){const o=s.connections.filter(c=>c.status==="active");return e.jsx("div",{className:"connected-app-dialog-backdrop",role:"presentation",onMouseDown:c=>{c.target===c.currentTarget&&n()},children:e.jsxs("section",{className:"connected-app-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"connected-app-dialog-title",children:[e.jsx("button",{className:"connected-app-dialog-close",type:"button","aria-label":"Close app details",onClick:n,children:e.jsx(P,{size:17})}),e.jsxs("div",{className:"connected-app-dialog-identity",children:[e.jsx("span",{className:"openpond-mark",children:e.jsx("img",{alt:"",src:E})}),e.jsxs("span",{className:"connection-dots","aria-hidden":"true",children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]}),e.jsx(m,{appId:s.id})]}),e.jsxs("h2",{id:"connected-app-dialog-title",children:["Connect ",s.label]}),e.jsxs("div",{className:"connected-app-approval",children:[e.jsx(F,{size:16}),e.jsx("span",{children:s.statusLabel})]}),e.jsxs("div",{className:"connected-app-dialog-body",children:[e.jsxs("section",{children:[e.jsx("h3",{children:s.setupSurfaceLabel}),e.jsx("p",{children:"The web flow shows the provider account, workspace, and requested access before anything is connected."})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Connected account"}),e.jsx("p",{children:G(o)})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Available capabilities"}),e.jsx("div",{className:"connected-app-dialog-capabilities",children:s.capabilities.map(c=>e.jsx("span",{children:c.label},c.id))})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Sandbox lease policy"}),e.jsx("p",{children:s.leasePolicy.leaseable?`Leaseable for ${s.leasePolicy.defaultTtlSeconds??0} seconds with scoped proxy access.`:"Managed as setup or tool discovery; no OAuth lease is required."})]})]}),e.jsxs("button",{className:"connected-app-dialog-primary",type:"button",onClick:a,children:[e.jsx("span",{children:s.installLabel}),e.jsx(U,{size:15})]})]})})}function m({appId:s}){return e.jsx("span",{className:`connected-app-icon app-${s}`,children:e.jsx("img",{alt:"",src:B(s)})})}function z(s,n){return n==="For agents"?!0:n==="Featured"?D.has(s.id):n==="Productivity"?s.category==="Productivity"||s.category==="Chat":s.category==="Developer tools"||s.id==="mcp"}function q(s,n){const a=n.trim().toLowerCase();return a?[s.id,s.label,s.shortLabel,s.category,s.description,s.providerFamily,s.setupSurface].some(o=>o.toLowerCase().includes(a)):!0}function B(s){return R(s)}async function V(s){const n=window.openpond?.browser;if(n){const a=await n.openExternal({conversationId:"connected-apps",url:s});if(!a.ok)throw new Error(a.error??"Unable to open app setup.");return}window.open(s,"_blank","noopener,noreferrer")}function W(s){return s==="loading"?"Checking connections":s==="ready"?"Connection status current":s==="error"?"Connection status unavailable":"Connection status pending"}function X(s){return s.filter(n=>n.connected).length}function G(s){return s.length===0?"No active OAuth connection for this setup surface.":s.map(n=>{const a=n.accountLabel??"Connected account";return n.workspaceLabel?`${a} / ${n.workspaceLabel}`:a}).join(", ")}export{J as AppsView,_ as ConnectedAppRow,M as connectedAppSetupTeamId};
@@ -1 +1 @@
1
- import{r as c,bV as v,j as a,a0 as f,X as k,P as j,A as C,b3 as g,E as B}from"./index-Ure41UF0.js";import{A as y}from"./MarkdownText-DTBS9xe7.js";import{R as N}from"./refresh-cw-CeHT_tXT.js";import{S as T}from"./square-B00f_944.js";const x=[];function P(r){const e=window.openpond?.browser,[b,l]=c.useState(()=>({conversationId:r,activeTabId:null,tabs:x}));c.useEffect(()=>{if(l({conversationId:r,activeTabId:null,tabs:x}),!e)return;let s=!1;e.getState({conversationId:r}).then(o=>{s||l(o)});const i=e.onState(o=>{o.conversationId===r&&l(o)});return()=>{s=!0,i()}},[e,r]);const u=c.useMemo(()=>b.tabs.find(s=>s.id===b.activeTabId)??null,[b.activeTabId,b.tabs]),t=c.useCallback(async(s,i={})=>{if(!e)return!1;const o=v(s,{explicitFile:i.explicitFile});return o?(i.newTab?await e.newTab({conversationId:r,url:o,explicitFile:i.explicitFile}):await e.open({conversationId:r,url:o,explicitFile:i.explicitFile}),!0):!1},[e,r]),n=u?{conversationId:r,tabId:u.id}:null;return{activeTab:u,available:!!e,bridge:e,state:b,back:()=>e&&n?e.back(n):Promise.resolve({ok:!1}),clearData:()=>e?e.clearData({conversationId:r}):Promise.resolve({ok:!1}),closeTab:s=>e?e.closeTab({conversationId:r,tabId:s}):Promise.resolve({ok:!1}),forward:()=>e&&n?e.forward(n):Promise.resolve({ok:!1}),newTab:s=>e?e.newTab({conversationId:r,url:s}):Promise.resolve({ok:!1}),open:t,openExternal:()=>e&&n?e.openExternal(n):Promise.resolve({ok:!1}),reload:()=>e&&n?e.reload(n):Promise.resolve({ok:!1}),snapshot:(s={})=>e?e.snapshot({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),moveCursor:s=>e?e.moveCursor({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),click:s=>e?e.click({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),typeText:s=>e?e.typeText({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),key:s=>e?e.key({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),scroll:s=>e?e.scroll({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),selectTab:s=>e?e.selectTab({conversationId:r,tabId:s}):Promise.resolve({ok:!1}),setBounds:s=>e?e.setBounds({conversationId:r,bounds:s}):Promise.resolve({ok:!1}),stop:()=>e&&n?e.stop(n):Promise.resolve({ok:!1})}}function E({activeTabId:r,tabs:e,onCloseTab:b,onNewTab:l,onSelectTab:u}){return a.jsxs("div",{className:"browser-tabs",role:"tablist","aria-label":"Browser tabs",children:[e.map(t=>a.jsxs("div",{className:`browser-tab ${t.id===r?"active":""}`,children:[a.jsx("span",{className:"browser-tab-favicon","aria-hidden":"true",children:t.faviconUrl?a.jsx("img",{alt:"",referrerPolicy:"no-referrer",src:t.faviconUrl}):a.jsx(f,{size:13})}),a.jsx("button",{type:"button",className:"browser-tab-main",role:"tab","aria-selected":t.id===r,title:t.url,onClick:()=>u(t.id),children:R(t)}),a.jsx("button",{type:"button",className:"browser-tab-close",title:"Close tab","aria-label":"Close tab",onClick:()=>b(t.id),children:a.jsx(k,{size:12})})]},t.id)),a.jsx("button",{type:"button",className:"browser-tab-add",title:"New tab","aria-label":"New tab",onClick:l,children:a.jsx(j,{size:14})})]})}function R(r){if(r.title?.trim())return r.title.trim();try{return new URL(r.url).host||r.url}catch{return r.url||"New tab"}}function z({activeTab:r,available:e,onBack:b,onClearData:l,onForward:u,onNavigate:t,onOpenExternal:n,onReload:s,onStop:i}){const[o,d]=c.useState(""),[p,m]=c.useState(!1);c.useEffect(()=>{d(r?.url??"")},[r?.url]);function h(w){w.preventDefault(),t(o)}return a.jsxs("div",{className:"browser-toolbar",children:[a.jsxs("div",{className:"browser-nav-actions",children:[a.jsx("button",{type:"button",title:"Back","aria-label":"Back",disabled:!r?.canGoBack,onClick:b,children:a.jsx(C,{size:15})}),a.jsx("button",{type:"button",title:"Forward","aria-label":"Forward",disabled:!r?.canGoForward,onClick:u,children:a.jsx(y,{size:15})}),a.jsx("button",{type:"button",title:r?.loading?"Stop":"Reload","aria-label":r?.loading?"Stop":"Reload",disabled:!r,onClick:r?.loading?i:s,children:r?.loading?a.jsx(T,{size:13}):a.jsx(N,{size:14})})]}),a.jsx("form",{className:"browser-address-form",onSubmit:h,children:a.jsx("input",{"aria-label":"Browser address",disabled:!e,placeholder:e?"Search or enter address":"Desktop browser unavailable",spellCheck:!1,value:o,onChange:w=>d(w.target.value)})}),a.jsxs("div",{className:"browser-panel-actions",children:[a.jsx("button",{type:"button",title:"Open external","aria-label":"Open external",disabled:!r,onClick:n,children:a.jsx(g,{size:14})}),a.jsxs("div",{className:"browser-menu-anchor",children:[a.jsx("button",{type:"button",title:"Browser actions","aria-label":"Browser actions",onClick:()=>m(w=>!w),children:a.jsx(B,{size:15})}),p&&a.jsx("div",{className:"browser-options-menu",role:"menu",children:a.jsx("button",{type:"button",role:"menuitem",onClick:()=>{m(!1),l()},children:"Clear Browser Data..."})})]})]})]})}function D({active:r,onBounds:e}){const b=c.useRef(null),l=c.useRef(null),u=c.useRef(null),t=c.useCallback(i=>{const o=i?`${i.x}:${i.y}:${i.width}:${i.height}`:"null";l.current!==o&&(l.current=o,e(i))},[e]),n=c.useCallback(()=>{const i=b.current;if(!r||!i){t(null);return}const o=i.getBoundingClientRect(),d=Math.max(0,Math.round(o.width)),p=Math.max(0,Math.round(o.height));if(d===0||p===0){t(null);return}t({x:Math.round(o.left),y:Math.round(o.top),width:d,height:p})},[r,t]),s=c.useCallback(()=>{u.current===null&&(u.current=window.requestAnimationFrame(()=>{u.current=null,n()}))},[n]);return c.useLayoutEffect(()=>{l.current=null,n();const i=b.current;if(!r||!i)return t(null),()=>t(null);const o=new ResizeObserver(s);return o.observe(i),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),()=>{u.current!==null&&(window.cancelAnimationFrame(u.current),u.current=null),o.disconnect(),window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),t(null)}},[r,t,n,s]),a.jsx("div",{className:"browser-viewport",ref:b})}function A({conversationId:r,expanded:e,onResizeStart:b}){const l=P(r),u=c.useCallback(s=>{window.openpond?.browser?.setBounds({conversationId:r,bounds:s})},[r]),t=c.useCallback(s=>{l.open(s,{explicitFile:!0})},[l]),n=c.useCallback(()=>{window.confirm("Clear browser data for this conversation? Tabs, cookies, cache, and local storage for this conversation will be removed.")&&l.clearData()},[l]);return a.jsxs("aside",{className:`workspace-diff-panel browser-sidebar-panel ${e?"expanded":""}`,"aria-label":"Browser",children:[!e&&a.jsx("div",{className:"workspace-diff-resize-handle",role:"separator","aria-orientation":"vertical","aria-label":"Resize browser panel",onPointerDown:b}),a.jsx(E,{activeTabId:l.state.activeTabId,tabs:l.state.tabs,onCloseTab:s=>{l.closeTab(s)},onNewTab:()=>{l.newTab()},onSelectTab:s=>{l.selectTab(s)}}),a.jsx(z,{activeTab:l.activeTab,available:l.available,onBack:()=>{l.back()},onClearData:n,onForward:()=>{l.forward()},onNavigate:t,onOpenExternal:()=>{l.openExternal()},onReload:()=>{l.reload()},onStop:()=>{l.stop()}}),a.jsxs("div",{className:"browser-content",children:[l.available?l.state.tabs.length===0?a.jsxs("div",{className:"browser-empty-state",children:[a.jsx(f,{size:18}),a.jsx("span",{children:"Enter a URL to open a browser tab for this conversation."})]}):null:a.jsxs("div",{className:"browser-empty-state",children:[a.jsx(f,{size:18}),a.jsx("span",{children:"Desktop browser bridge unavailable."})]}),a.jsx(D,{active:l.available&&l.state.tabs.length>0,onBounds:u})]})]})}export{A as BrowserSidebar};
1
+ import{r as c,bV as v,j as a,$ as f,X as k,P as j,A as g,b1 as C,bg as B}from"./index-Cxq5q-6B.js";import{A as y}from"./MarkdownText-CzZ60aWs.js";import{R as N}from"./refresh-cw-BKF4NhDI.js";import{S as T}from"./square-Dp5eGICS.js";const x=[];function P(r){const e=window.openpond?.browser,[b,l]=c.useState(()=>({conversationId:r,activeTabId:null,tabs:x}));c.useEffect(()=>{if(l({conversationId:r,activeTabId:null,tabs:x}),!e)return;let s=!1;e.getState({conversationId:r}).then(o=>{s||l(o)});const i=e.onState(o=>{o.conversationId===r&&l(o)});return()=>{s=!0,i()}},[e,r]);const u=c.useMemo(()=>b.tabs.find(s=>s.id===b.activeTabId)??null,[b.activeTabId,b.tabs]),t=c.useCallback(async(s,i={})=>{if(!e)return!1;const o=v(s,{explicitFile:i.explicitFile});return o?(i.newTab?await e.newTab({conversationId:r,url:o,explicitFile:i.explicitFile}):await e.open({conversationId:r,url:o,explicitFile:i.explicitFile}),!0):!1},[e,r]),n=u?{conversationId:r,tabId:u.id}:null;return{activeTab:u,available:!!e,bridge:e,state:b,back:()=>e&&n?e.back(n):Promise.resolve({ok:!1}),clearData:()=>e?e.clearData({conversationId:r}):Promise.resolve({ok:!1}),closeTab:s=>e?e.closeTab({conversationId:r,tabId:s}):Promise.resolve({ok:!1}),forward:()=>e&&n?e.forward(n):Promise.resolve({ok:!1}),newTab:s=>e?e.newTab({conversationId:r,url:s}):Promise.resolve({ok:!1}),open:t,openExternal:()=>e&&n?e.openExternal(n):Promise.resolve({ok:!1}),reload:()=>e&&n?e.reload(n):Promise.resolve({ok:!1}),snapshot:(s={})=>e?e.snapshot({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),moveCursor:s=>e?e.moveCursor({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),click:s=>e?e.click({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),typeText:s=>e?e.typeText({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),key:s=>e?e.key({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),scroll:s=>e?e.scroll({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),selectTab:s=>e?e.selectTab({conversationId:r,tabId:s}):Promise.resolve({ok:!1}),setBounds:s=>e?e.setBounds({conversationId:r,bounds:s}):Promise.resolve({ok:!1}),stop:()=>e&&n?e.stop(n):Promise.resolve({ok:!1})}}function R({activeTabId:r,tabs:e,onCloseTab:b,onNewTab:l,onSelectTab:u}){return a.jsxs("div",{className:"browser-tabs",role:"tablist","aria-label":"Browser tabs",children:[e.map(t=>a.jsxs("div",{className:`browser-tab ${t.id===r?"active":""}`,children:[a.jsx("span",{className:"browser-tab-favicon","aria-hidden":"true",children:t.faviconUrl?a.jsx("img",{alt:"",referrerPolicy:"no-referrer",src:t.faviconUrl}):a.jsx(f,{size:13})}),a.jsx("button",{type:"button",className:"browser-tab-main",role:"tab","aria-selected":t.id===r,title:t.url,onClick:()=>u(t.id),children:E(t)}),a.jsx("button",{type:"button",className:"browser-tab-close",title:"Close tab","aria-label":"Close tab",onClick:()=>b(t.id),children:a.jsx(k,{size:12})})]},t.id)),a.jsx("button",{type:"button",className:"browser-tab-add",title:"New tab","aria-label":"New tab",onClick:l,children:a.jsx(j,{size:14})})]})}function E(r){if(r.title?.trim())return r.title.trim();try{return new URL(r.url).host||r.url}catch{return r.url||"New tab"}}function z({activeTab:r,available:e,onBack:b,onClearData:l,onForward:u,onNavigate:t,onOpenExternal:n,onReload:s,onStop:i}){const[o,d]=c.useState(""),[p,m]=c.useState(!1);c.useEffect(()=>{d(r?.url??"")},[r?.url]);function h(w){w.preventDefault(),t(o)}return a.jsxs("div",{className:"browser-toolbar",children:[a.jsxs("div",{className:"browser-nav-actions",children:[a.jsx("button",{type:"button",title:"Back","aria-label":"Back",disabled:!r?.canGoBack,onClick:b,children:a.jsx(g,{size:15})}),a.jsx("button",{type:"button",title:"Forward","aria-label":"Forward",disabled:!r?.canGoForward,onClick:u,children:a.jsx(y,{size:15})}),a.jsx("button",{type:"button",title:r?.loading?"Stop":"Reload","aria-label":r?.loading?"Stop":"Reload",disabled:!r,onClick:r?.loading?i:s,children:r?.loading?a.jsx(T,{size:13}):a.jsx(N,{size:14})})]}),a.jsx("form",{className:"browser-address-form",onSubmit:h,children:a.jsx("input",{"aria-label":"Browser address",disabled:!e,placeholder:e?"Search or enter address":"Desktop browser unavailable",spellCheck:!1,value:o,onChange:w=>d(w.target.value)})}),a.jsxs("div",{className:"browser-panel-actions",children:[a.jsx("button",{type:"button",title:"Open external","aria-label":"Open external",disabled:!r,onClick:n,children:a.jsx(C,{size:14})}),a.jsxs("div",{className:"browser-menu-anchor",children:[a.jsx("button",{type:"button",title:"Browser actions","aria-label":"Browser actions",onClick:()=>m(w=>!w),children:a.jsx(B,{size:15})}),p&&a.jsx("div",{className:"browser-options-menu",role:"menu",children:a.jsx("button",{type:"button",role:"menuitem",onClick:()=>{m(!1),l()},children:"Clear Browser Data..."})})]})]})]})}function D({active:r,onBounds:e}){const b=c.useRef(null),l=c.useRef(null),u=c.useRef(null),t=c.useCallback(i=>{const o=i?`${i.x}:${i.y}:${i.width}:${i.height}`:"null";l.current!==o&&(l.current=o,e(i))},[e]),n=c.useCallback(()=>{const i=b.current;if(!r||!i){t(null);return}const o=i.getBoundingClientRect(),d=Math.max(0,Math.round(o.width)),p=Math.max(0,Math.round(o.height));if(d===0||p===0){t(null);return}t({x:Math.round(o.left),y:Math.round(o.top),width:d,height:p})},[r,t]),s=c.useCallback(()=>{u.current===null&&(u.current=window.requestAnimationFrame(()=>{u.current=null,n()}))},[n]);return c.useLayoutEffect(()=>{l.current=null,n();const i=b.current;if(!r||!i)return t(null),()=>t(null);const o=new ResizeObserver(s);return o.observe(i),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),()=>{u.current!==null&&(window.cancelAnimationFrame(u.current),u.current=null),o.disconnect(),window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),t(null)}},[r,t,n,s]),a.jsx("div",{className:"browser-viewport",ref:b})}function A({conversationId:r,expanded:e,onResizeStart:b}){const l=P(r),u=c.useCallback(s=>{window.openpond?.browser?.setBounds({conversationId:r,bounds:s})},[r]),t=c.useCallback(s=>{l.open(s,{explicitFile:!0})},[l]),n=c.useCallback(()=>{window.confirm("Clear browser data for this conversation? Tabs, cookies, cache, and local storage for this conversation will be removed.")&&l.clearData()},[l]);return a.jsxs("aside",{className:`workspace-diff-panel browser-sidebar-panel ${e?"expanded":""}`,"aria-label":"Browser",children:[!e&&a.jsx("div",{className:"workspace-diff-resize-handle",role:"separator","aria-orientation":"vertical","aria-label":"Resize browser panel",onPointerDown:b}),a.jsx(R,{activeTabId:l.state.activeTabId,tabs:l.state.tabs,onCloseTab:s=>{l.closeTab(s)},onNewTab:()=>{l.newTab()},onSelectTab:s=>{l.selectTab(s)}}),a.jsx(z,{activeTab:l.activeTab,available:l.available,onBack:()=>{l.back()},onClearData:n,onForward:()=>{l.forward()},onNavigate:t,onOpenExternal:()=>{l.openExternal()},onReload:()=>{l.reload()},onStop:()=>{l.stop()}}),a.jsxs("div",{className:"browser-content",children:[l.available?l.state.tabs.length===0?a.jsxs("div",{className:"browser-empty-state",children:[a.jsx(f,{size:18}),a.jsx("span",{children:"Enter a URL to open a browser tab for this conversation."})]}):null:a.jsxs("div",{className:"browser-empty-state",children:[a.jsx(f,{size:18}),a.jsx("span",{children:"Desktop browser bridge unavailable."})]}),a.jsx(D,{active:l.available&&l.state.tabs.length>0,onBounds:u})]})]})}export{A as BrowserSidebar};
@@ -0,0 +1 @@
1
+ import{r as j,j as e,an as g,ao as f,d as b,ap as k,aq as C,a0 as v,ar as P,as as M}from"./index-Cxq5q-6B.js";import{F as S}from"./folder-DgS_U9Lq.js";import{S as w}from"./square-pen-j-mZ_UkO.js";function R({open:s,query:r,projects:n,sessions:o,onQueryChange:t,onClose:d,onNewChat:x,onOpenProject:u,onOpenSession:m}){const c=r.trim().toLowerCase(),l=j.useMemo(()=>L(o,c,10),[c,o]),i=j.useMemo(()=>z(n,c,8),[c,n]);if(!s)return null;const N=()=>{const a=i[0];if(a){u(a);return}const p=l[0];p&&m(p)};return e.jsx("div",{className:"command-overlay",role:"presentation",onMouseDown:d,children:e.jsxs("section",{className:"command-menu",role:"dialog","aria-modal":"true","aria-label":"Search chats and projects",onMouseDown:a=>a.stopPropagation(),children:[e.jsxs("div",{className:"command-input-row",children:[e.jsx(g,{size:17}),e.jsx("input",{autoFocus:!0,value:r,onChange:a=>t(a.target.value),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),N()),a.key==="Escape"&&(a.preventDefault(),d())},placeholder:"Search chats and projects"}),e.jsx("kbd",{children:"Esc"})]}),e.jsxs("div",{className:"command-results",children:[e.jsxs("button",{className:"command-result command-create",onClick:x,children:[e.jsx(w,{size:15}),e.jsx("span",{children:"New local task"}),e.jsx("small",{children:"General"})]}),e.jsxs(h,{label:"Projects",children:[i.map(a=>e.jsxs("button",{className:"command-result",onClick:()=>u(a),children:[f(a)?e.jsx(b,{size:15}):e.jsx(S,{size:15}),e.jsx("span",{children:a.project.name}),e.jsx("small",{children:D(a)})]},a.project.id)),i.length===0&&e.jsx("div",{className:"command-empty",children:"No projects found"})]}),e.jsxs(h,{label:"Chats",children:[l.map(a=>e.jsxs("button",{className:"command-result",onClick:()=>m(a),children:[a.pinned?e.jsx(k,{size:15}):a.savedForLater?e.jsx(C,{size:15}):e.jsx(v,{size:15}),e.jsx("span",{children:a.title}),e.jsx("small",{children:a.appName??P(a.updatedAt)})]},a.id)),l.length===0&&e.jsx("div",{className:"command-empty",children:"No chats found"})]})]})]})})}function L(s,r,n){const o=[];for(const t of s)if((!r||`${t.title} ${t.appName??""}`.toLowerCase().includes(r))&&(o.push(t),o.length>=n))break;return o}function z(s,r,n){const o=[];for(const t of s)if((!r||$(t).toLowerCase().includes(r))&&(o.push(t),o.length>=n))break;return o}function $(s){return M(s)?`${s.project.name} ${s.project.path} ${s.project.workspacePath}`:`${s.project.name} ${s.project.sourceLabel??""} ${s.project.organizationName??""}`}function D(s){return f(s)?s.project.organizationName??"Cloud Project":s.project.linkedOpenPondApp?"OpenPond project":s.project.source==="git"?"Local Git":"Local folder"}function h({label:s,children:r}){return e.jsxs("div",{className:"command-group",children:[e.jsx("div",{className:"command-group-label",children:s}),r]})}export{R as CommandMenu};