openpond 0.0.60 → 0.0.61
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.
- package/dist/chunks/{actions-command-BNVIILSL.js → actions-command-QVYIPEN5.js} +2 -2
- package/dist/chunks/{app-layer-RNQXXM6L.js → app-layer-GCNXR4F3.js} +5 -5
- package/dist/chunks/{app-server-runtime-7LGK37P6.js → app-server-runtime-737DBOSH.js} +8 -8
- package/dist/chunks/{apps-LV3CSMLT.js → apps-JB3POF6Z.js} +5 -5
- package/dist/chunks/{chunk-LMQ4MPQI.js → chunk-32R4GQD3.js} +51 -57
- package/dist/chunks/{chunk-AHILPQXV.js → chunk-5HMXXGWZ.js} +3 -3
- package/dist/chunks/{chunk-TOCZQEPW.js → chunk-6RMGHEFF.js} +1 -1
- package/dist/chunks/{chunk-I23UKEYS.js → chunk-B3WVCPXG.js} +46 -14
- package/dist/chunks/{chunk-XFZYNYRI.js → chunk-BQQS5RRI.js} +5903 -3813
- package/dist/chunks/{chunk-SKUS4NPW.js → chunk-IZ3XGRAG.js} +154 -5
- package/dist/chunks/{chunk-PVGJXCAK.js → chunk-L5JTI6LQ.js} +52 -52
- package/dist/chunks/{chunk-RC3N77IV.js → chunk-LBIVEX6V.js} +33 -33
- package/dist/chunks/{chunk-LDRWEAOB.js → chunk-NPEWMLRH.js} +1 -1
- package/dist/chunks/{chunk-NFNEENNR.js → chunk-OYWTQABY.js} +1 -1
- package/dist/chunks/{chunk-VG4H4TQG.js → chunk-TOMMZN6V.js} +1757 -55
- package/dist/chunks/{chunk-FHP7OMEI.js → chunk-XIUCBUUQ.js} +1 -1
- package/dist/chunks/{chunk-DXSHQ6TO.js → chunk-XSHMPOQV.js} +10 -5
- package/dist/chunks/{chunk-63N6442Q.js → chunk-YSVY4O42.js} +1 -1
- package/dist/chunks/{chunk-7QLVLGDM.js → chunk-ZAX7MLQJ.js} +1 -1
- package/dist/chunks/{chunk-2J3LG4U7.js → chunk-ZJPLJP2Q.js} +2 -2
- package/dist/chunks/{cli-DBZ7S6ZF.js → cli-MFFCFH3P.js} +7 -7
- package/dist/chunks/{core-commands-H2UC3LHG.js → core-commands-KCFU7U5Y.js} +6 -6
- package/dist/chunks/{desktop-test-TV64EY5A.js → desktop-test-FEQVX4N4.js} +5 -5
- package/dist/chunks/{extension-XMWCG6YG.js → extension-M4DH25KH.js} +16 -51
- package/dist/chunks/{help-NEYFMHWQ.js → help-ZUIE4EPY.js} +1 -1
- package/dist/chunks/{opchat-ZL5JJQ5L.js → opchat-7KRZIFFD.js} +5 -5
- package/dist/chunks/{organizations-4IEC35QB.js → organizations-ZWPFNM6K.js} +7 -7
- package/dist/chunks/{profile-EVASCDIN.js → profile-GF57OWI6.js} +6 -6
- package/dist/chunks/{project-agent-DMN64RZJ.js → project-agent-65MXZHGM.js} +6 -6
- package/dist/chunks/{sandbox-command-WKGVO32R.js → sandbox-command-WH2OQRHP.js} +6 -6
- package/dist/chunks/{sandbox-template-BJUS4KJM.js → sandbox-template-W5HU24TF.js} +7 -7
- package/dist/chunks/{src-E2UCLY54.js → src-O5QXOQ5H.js} +1221 -417
- package/dist/chunks/{src-KLQEJ6RO.js → src-YUIJKNIC.js} +4 -4
- package/dist/chunks/{teams-bot-HUXYJ6XA.js → teams-bot-5ATLXSHC.js} +5 -5
- package/dist/chunks/{workspaces-4OKABHI3.js → workspaces-4XJ3GXL4.js} +2 -2
- package/dist/cli.js +13 -13
- package/dist/index.js +10 -5
- package/dist/sandbox/sandbox-instance-client.d.ts +2 -1
- package/dist/sandbox/types/org-project-agent.d.ts +10 -1
- package/dist/web/assets/{AppDialog-CxLYXiI1.js → AppDialog-BvdkukM_.js} +1 -1
- package/dist/web/assets/{AppsView-CVTUkahv.js → AppsView-9h3-BQbk.js} +1 -1
- package/dist/web/assets/BrowserSidebar-C6WJ5wIu.js +1 -0
- package/dist/web/assets/CommandMenu-C7en9zgQ.js +1 -0
- package/dist/web/assets/CommunityView-CoqI6Dks.js +1 -0
- package/dist/web/assets/ComposerCreateImproveStrip-DMq6A2Ba.js +1 -0
- package/dist/web/assets/{GetStartedView-l9MUYMYH.js → GetStartedView-B-zgx1jI.js} +1 -1
- package/dist/web/assets/LabModelVersionDetailPage-CkNOBygO.js +1 -0
- package/dist/web/assets/LabSkillSidebar-CmRHuu78.js +1 -0
- package/dist/web/assets/LabsRoute-DLPZqEev.js +3 -0
- package/dist/web/assets/MainChatThread-CFGsODmc.js +2 -0
- package/dist/web/assets/MainPane-B2kcZpM0.js +6 -0
- package/dist/web/assets/MarkdownText-C4Ixpl-i.js +9 -0
- package/dist/web/assets/Messages-DmEk_BWS.js +10 -0
- package/dist/web/assets/NativeSkillSidebar-Cn824hrX.js +1 -0
- package/dist/web/assets/{NewProjectDialog-CiGPfI5s.js → NewProjectDialog-BFEDv4Ga.js} +1 -1
- package/dist/web/assets/OutputsPage-hfQyqQzx.js +1 -0
- package/dist/web/assets/RightChatPanelStack-CiPKX3Ea.js +1 -0
- package/dist/web/assets/ScheduledWorkPage-CyoZsUCe.js +1 -0
- package/dist/web/assets/SettingsView-BZkrIOc0.css +1 -0
- package/dist/web/assets/SettingsView-DWWs9gel.js +6 -0
- package/dist/web/assets/TeamChatView-C4RWAO8c.js +3 -0
- package/dist/web/assets/{TerminalOverlay-Bb0RJR04.js → TerminalOverlay-CpsPuPIM.js} +1 -1
- package/dist/web/assets/TrainingCreationPanel-DMLpUVbJ.js +1 -0
- package/dist/web/assets/TrainingDraftPanel-gAhpwkYs.js +1 -0
- package/dist/web/assets/{UsageSettingsSection-Cdc_jGFX.js → UsageSettingsSection-WBtxLhBx.js} +1 -1
- package/dist/web/assets/WorkspaceDiffPanel-CUpwqvzZ.js +14 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-LIbOBT4f.js +32 -0
- package/dist/web/assets/{WorkspaceGitDialogs-CK6ahRty.js → WorkspaceGitDialogs-8y7rRSou.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-BQoN7jWa.js → WorkspaceMonacoEditor-BpHmWrCD.js} +3 -3
- package/dist/web/assets/{arrow-up-right-CzBZuWNj.js → arrow-up-right-3TbyK1ec.js} +1 -1
- package/dist/web/assets/{chevron-up-DW-qEVSP.js → chevron-up-C4tTuxXs.js} +1 -1
- package/dist/web/assets/{cloud-upload-CjLR-8-r.js → cloud-upload-ZGHLWEn3.js} +1 -1
- package/dist/web/assets/{cssMode-CQQJhS7v.js → cssMode-kfZCOm_r.js} +1 -1
- package/dist/web/assets/{folder-open-BpUcIJHn.js → folder-open-C4WG_lDr.js} +1 -1
- package/dist/web/assets/{folder-plus-8NHsIAxQ.js → folder-plus-CKRaDeR3.js} +1 -1
- package/dist/web/assets/{git-branch-DO3iP_fL.js → git-branch-yLi5tff8.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-BSWa2I3g.js → git-commit-horizontal-BPyGYak3.js} +1 -1
- package/dist/web/assets/{htmlMode-DaAKO9wk.js → htmlMode-DT--Et9k.js} +1 -1
- package/dist/web/assets/index--lwjVZXT.js +178 -0
- package/dist/web/assets/index-B_HvNtwl.css +1 -0
- package/dist/web/assets/index-C9-OtZl8.js +1 -0
- package/dist/web/assets/{info-DiEvrUda.js → info-CzzHwSUb.js} +1 -1
- package/dist/web/assets/{jsonMode-Biu1ZTZ7.js → jsonMode-CKg1GzqC.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-lwoDxGgl.js → lspLanguageFeatures-B76Yo6xo.js} +1 -1
- package/dist/web/assets/{monaco.contribution-DzHhgeLy.js → monaco.contribution-BRuQU-2A.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BqQSY5-t.js → monaco.contribution-CLpGfCSS.js} +2 -2
- package/dist/web/assets/{monaco.contribution-Ic8LKME8.js → monaco.contribution-CS3H8RrD.js} +2 -2
- package/dist/web/assets/{monaco.contribution-Ce2MS2Nv.js → monaco.contribution-DqeexNAI.js} +2 -2
- package/dist/web/assets/{play-D9F3t5Cx.js → play-EDFh3BPS.js} +1 -1
- package/dist/web/assets/{python-BhVCwr-K.js → python-De_Vr_hD.js} +1 -1
- package/dist/web/assets/{refresh-cw-DRN17xPU.js → refresh-cw-DRJJ-X1U.js} +1 -1
- package/dist/web/assets/{save-CDZwpzlG.js → save-BSxqIWP6.js} +1 -1
- package/dist/web/assets/{square-Cf_AXs4a.js → square-BV-Vgh5a.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-Bb_m9pXM.js → toggleHighContrast-1Suz4cxo.js} +1 -1
- package/dist/web/assets/{tsMode-BaWkaSHN.js → tsMode-DMyzpvFI.js} +1 -1
- package/dist/web/assets/{upload-Cef29aCP.js → upload-jVxCW0dO.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-CAAqoZ0V.js → useLocalAgentSchedules-DNpnOBA8.js} +1 -1
- package/dist/web/assets/{wifi-off-C8cC22F6.js → wifi-off-IzGGiOX_.js} +1 -1
- package/dist/web/assets/{workers-GOdHtcZt.js → workers-Crdnk6Zy.js} +1 -1
- package/dist/web/assets/{yaml-jBIxwMeR.js → yaml-CF3tmjgW.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/BrowserSidebar-oHniLA05.js +0 -1
- package/dist/web/assets/CommandMenu-Db_5OiKs.js +0 -1
- package/dist/web/assets/CommunityView-HTwMEO-T.js +0 -1
- package/dist/web/assets/ComposerCreateImproveStrip-ER26yFe-.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-Dgf-DlJi.js +0 -1
- package/dist/web/assets/LabSkillSidebar-CyX8sVm1.js +0 -1
- package/dist/web/assets/LabsRoute-BC1ST9qT.js +0 -3
- package/dist/web/assets/MainChatThread-BfW92Rv1.js +0 -2
- package/dist/web/assets/MainPane-DlciH8yR.js +0 -6
- package/dist/web/assets/MarkdownText-CyOeCVjf.js +0 -9
- package/dist/web/assets/Messages-BDtEbIKv.js +0 -9
- package/dist/web/assets/NativeSkillSidebar-D0BlvEtE.js +0 -1
- package/dist/web/assets/OutputsPage-DNU2yD7q.js +0 -1
- package/dist/web/assets/RightChatPanelStack-Cs63fQwk.js +0 -1
- package/dist/web/assets/ScheduledWorkPage-DMKHFbeE.js +0 -1
- package/dist/web/assets/SettingsView-C39BqlSI.css +0 -1
- package/dist/web/assets/SettingsView-L0g-g2fL.js +0 -6
- package/dist/web/assets/TeamChatView-CSVMTUAE.js +0 -3
- package/dist/web/assets/TrainingCreationPanel-VIWlpVV2.js +0 -1
- package/dist/web/assets/TrainingDraftPanel-MTYsR-Ry.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-BgIbxMMu.js +0 -14
- package/dist/web/assets/WorkspaceEnvironmentMenu-C97GqYn9.js +0 -32
- package/dist/web/assets/circle-alert-B_xROoPY.js +0 -1
- package/dist/web/assets/folder-git-2-ktXin28y.js +0 -1
- package/dist/web/assets/folder-tLv6TMN2.js +0 -1
- package/dist/web/assets/index-BtiK52K1.js +0 -1
- package/dist/web/assets/index-CE2hroF6.css +0 -1
- package/dist/web/assets/index-DHxBMQIJ.js +0 -174
- package/dist/web/assets/square-pen-ChJgNiDm.js +0 -1
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-QETF6ILG.js";
|
|
7
7
|
import {
|
|
8
8
|
createOpenPondClient
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-IZ3XGRAG.js";
|
|
10
|
+
import "./chunk-XSHMPOQV.js";
|
|
11
11
|
import {
|
|
12
12
|
parseBooleanOption
|
|
13
13
|
} from "./chunk-MUMPWI4O.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
runProcessCommand
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XIUCBUUQ.js";
|
|
5
5
|
import {
|
|
6
6
|
CliUsageError
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZAX7MLQJ.js";
|
|
8
8
|
import "./chunk-SMNFI2FU.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-LBIVEX6V.js";
|
|
10
|
+
import "./chunk-IZ3XGRAG.js";
|
|
11
|
+
import "./chunk-XSHMPOQV.js";
|
|
12
12
|
import "./chunk-DBHSOTYZ.js";
|
|
13
13
|
import "./chunk-KSRWKXRB.js";
|
|
14
14
|
import "./chunk-MUMPWI4O.js";
|
|
@@ -2,16 +2,16 @@ import { createRequire as __openpondCreateRequire } from "node:module"; var requ
|
|
|
2
2
|
import {
|
|
3
3
|
APP_SERVER_COMPOSITION,
|
|
4
4
|
createOpenPondAppServer
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-BQQS5RRI.js";
|
|
6
|
+
import "./chunk-NPEWMLRH.js";
|
|
7
|
+
import "./chunk-OYWTQABY.js";
|
|
8
|
+
import "./chunk-6RMGHEFF.js";
|
|
9
|
+
import "./chunk-32R4GQD3.js";
|
|
10
|
+
import "./chunk-L5JTI6LQ.js";
|
|
11
11
|
import "./chunk-QETF6ILG.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-TOMMZN6V.js";
|
|
13
13
|
import "./chunk-WYDVQOBL.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-XSHMPOQV.js";
|
|
15
15
|
import "./chunk-UACZUFIA.js";
|
|
16
16
|
export {
|
|
17
17
|
APP_SERVER_COMPOSITION,
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
normalizeRepoName,
|
|
11
11
|
pollDeploymentLogs,
|
|
12
12
|
resolveAppTarget
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-XIUCBUUQ.js";
|
|
14
|
+
import "./chunk-ZAX7MLQJ.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveBaseUrl,
|
|
17
17
|
resolvePublicApiBaseUrl
|
|
18
18
|
} from "./chunk-SMNFI2FU.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-LBIVEX6V.js";
|
|
20
|
+
import "./chunk-IZ3XGRAG.js";
|
|
21
|
+
import "./chunk-XSHMPOQV.js";
|
|
22
22
|
import {
|
|
23
23
|
createAgentFromPrompt,
|
|
24
24
|
deployApp,
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
saveConfig,
|
|
13
13
|
saveProfileApiKey,
|
|
14
14
|
setActiveProfile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-L5JTI6LQ.js";
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_OPENPOND_API_BASE_URL,
|
|
18
18
|
DEFAULT_OPENPOND_WEB_BASE_URL,
|
|
19
19
|
withVercelProtectionBypass
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XSHMPOQV.js";
|
|
21
21
|
|
|
22
22
|
// ../../packages/runtime/dist/chat.js
|
|
23
23
|
import { randomUUID } from "node:crypto";
|
|
@@ -546,53 +546,24 @@ async function* streamOpChatChatCompletion(options) {
|
|
|
546
546
|
if (!response.body) {
|
|
547
547
|
throw new Error("OpenPond OpChat request failed: streaming response body is missing.");
|
|
548
548
|
}
|
|
549
|
-
const completion = await readBufferedOpChatStream(response.body);
|
|
550
|
-
const { content, finishReason, raw, reasoningText, toolCalls, usage } = completion;
|
|
551
|
-
if (reasoningText)
|
|
552
|
-
yield { type: "reasoning_delta", text: reasoningText, raw };
|
|
553
|
-
if (content)
|
|
554
|
-
yield { type: "text_delta", text: content, raw };
|
|
555
|
-
if (toolCalls.length > 0) {
|
|
556
|
-
yield { type: "tool_call_delta", toolCalls, raw };
|
|
557
|
-
}
|
|
558
|
-
if (toolCalls.length > 0 && reasoningText) {
|
|
559
|
-
yield {
|
|
560
|
-
type: "continuation",
|
|
561
|
-
continuation: {
|
|
562
|
-
kind: "chat_completions_reasoning",
|
|
563
|
-
reasoningContent: reasoningText
|
|
564
|
-
},
|
|
565
|
-
raw
|
|
566
|
-
};
|
|
567
|
-
}
|
|
568
|
-
if (usage)
|
|
569
|
-
yield { type: "usage", usage, raw };
|
|
570
|
-
yield {
|
|
571
|
-
type: "finish",
|
|
572
|
-
finishReason,
|
|
573
|
-
raw
|
|
574
|
-
};
|
|
575
|
-
}
|
|
576
|
-
async function readBufferedOpChatStream(body) {
|
|
577
|
-
const reader = body.getReader();
|
|
578
|
-
const decoder = new TextDecoder();
|
|
579
549
|
const toolCalls = /* @__PURE__ */ new Map();
|
|
580
|
-
let
|
|
581
|
-
let content = "";
|
|
582
|
-
let dataLines = [];
|
|
550
|
+
let sawDone = false;
|
|
583
551
|
let finishReason = null;
|
|
584
552
|
let lastPayload = {};
|
|
585
|
-
let
|
|
586
|
-
let sawDone = false;
|
|
553
|
+
let accumulatedReasoning = "";
|
|
587
554
|
let usage = null;
|
|
555
|
+
const reader = response.body.getReader();
|
|
556
|
+
const decoder = new TextDecoder();
|
|
557
|
+
let buffer = "";
|
|
558
|
+
let dataLines = [];
|
|
588
559
|
const consumeEvent = () => {
|
|
589
560
|
if (dataLines.length === 0)
|
|
590
|
-
return;
|
|
561
|
+
return [];
|
|
591
562
|
const data = dataLines.join("\n");
|
|
592
563
|
dataLines = [];
|
|
593
564
|
if (data === "[DONE]") {
|
|
594
565
|
sawDone = true;
|
|
595
|
-
return;
|
|
566
|
+
return [];
|
|
596
567
|
}
|
|
597
568
|
let payload;
|
|
598
569
|
try {
|
|
@@ -608,23 +579,32 @@ async function readBufferedOpChatStream(body) {
|
|
|
608
579
|
const choices = Array.isArray(record.choices) ? record.choices : [];
|
|
609
580
|
const choice = choices[0] && typeof choices[0] === "object" ? choices[0] : {};
|
|
610
581
|
const delta = choice.delta && typeof choice.delta === "object" ? choice.delta : {};
|
|
611
|
-
|
|
612
|
-
|
|
582
|
+
const deltas = [];
|
|
583
|
+
const reasoningChunk = streamTextValue(delta.reasoning_content);
|
|
584
|
+
if (reasoningChunk) {
|
|
585
|
+
accumulatedReasoning += reasoningChunk;
|
|
586
|
+
deltas.push({ type: "reasoning_delta", text: reasoningChunk, raw: payload });
|
|
587
|
+
}
|
|
588
|
+
const textChunk = streamTextValue(delta.content);
|
|
589
|
+
if (textChunk) {
|
|
590
|
+
deltas.push({ type: "text_delta", text: textChunk, raw: payload });
|
|
591
|
+
}
|
|
613
592
|
mergeOpChatToolCallDeltas(toolCalls, delta.tool_calls);
|
|
614
593
|
finishReason = stringValue(choice.finish_reason) ?? finishReason;
|
|
615
594
|
usage = parseUsage(payload) ?? usage;
|
|
595
|
+
return deltas;
|
|
616
596
|
};
|
|
617
597
|
const consumeLine = (line) => {
|
|
618
598
|
const normalized = line.endsWith("\r") ? line.slice(0, -1) : line;
|
|
619
599
|
if (!normalized) {
|
|
620
|
-
consumeEvent();
|
|
621
|
-
return;
|
|
600
|
+
return consumeEvent();
|
|
622
601
|
}
|
|
623
602
|
if (normalized.startsWith(":"))
|
|
624
|
-
return;
|
|
603
|
+
return [];
|
|
625
604
|
if (normalized.startsWith("data:")) {
|
|
626
605
|
dataLines.push(normalized.slice("data:".length).trimStart());
|
|
627
606
|
}
|
|
607
|
+
return [];
|
|
628
608
|
};
|
|
629
609
|
try {
|
|
630
610
|
while (true) {
|
|
@@ -634,27 +614,41 @@ async function readBufferedOpChatStream(body) {
|
|
|
634
614
|
buffer += decoder.decode(result.value, { stream: true });
|
|
635
615
|
const lines = buffer.split("\n");
|
|
636
616
|
buffer = lines.pop() ?? "";
|
|
637
|
-
for (const line of lines)
|
|
638
|
-
consumeLine(line)
|
|
617
|
+
for (const line of lines) {
|
|
618
|
+
for (const delta of consumeLine(line))
|
|
619
|
+
yield delta;
|
|
620
|
+
}
|
|
639
621
|
}
|
|
640
622
|
buffer += decoder.decode();
|
|
641
|
-
if (buffer)
|
|
642
|
-
consumeLine(buffer)
|
|
643
|
-
|
|
623
|
+
if (buffer) {
|
|
624
|
+
for (const delta of consumeLine(buffer))
|
|
625
|
+
yield delta;
|
|
626
|
+
}
|
|
627
|
+
for (const delta of consumeEvent())
|
|
628
|
+
yield delta;
|
|
644
629
|
} finally {
|
|
645
630
|
reader.releaseLock();
|
|
646
631
|
}
|
|
647
632
|
if (!sawDone) {
|
|
648
633
|
throw new Error("OpenPond OpChat request failed: stream ended before [DONE].");
|
|
649
634
|
}
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
635
|
+
const completedToolCalls = completedOpChatToolCalls(toolCalls);
|
|
636
|
+
if (completedToolCalls.length > 0) {
|
|
637
|
+
yield { type: "tool_call_delta", toolCalls: completedToolCalls, raw: lastPayload };
|
|
638
|
+
}
|
|
639
|
+
if (completedToolCalls.length > 0 && accumulatedReasoning) {
|
|
640
|
+
yield {
|
|
641
|
+
type: "continuation",
|
|
642
|
+
continuation: {
|
|
643
|
+
kind: "chat_completions_reasoning",
|
|
644
|
+
reasoningContent: accumulatedReasoning
|
|
645
|
+
},
|
|
646
|
+
raw: lastPayload
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
if (usage)
|
|
650
|
+
yield { type: "usage", usage, raw: lastPayload };
|
|
651
|
+
yield { type: "finish", finishReason, raw: lastPayload };
|
|
658
652
|
}
|
|
659
653
|
function mergeOpChatToolCallDeltas(calls, value) {
|
|
660
654
|
if (!Array.isArray(value))
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
runAppServerJsonl
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OYWTQABY.js";
|
|
5
5
|
import {
|
|
6
6
|
DEFAULT_HOST,
|
|
7
7
|
DEFAULT_PORT,
|
|
8
8
|
parseListen
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6RMGHEFF.js";
|
|
10
10
|
import {
|
|
11
11
|
getBundledRuntimeVersion,
|
|
12
12
|
openUrlWithSystemBrowser
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-32R4GQD3.js";
|
|
14
14
|
|
|
15
15
|
// ../server/src/cli.ts
|
|
16
16
|
import { existsSync } from "node:fs";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __openpondCreateRequire } from "node:module"; var requ
|
|
|
3
3
|
// ../server/src/constants.ts
|
|
4
4
|
var DEFAULT_HOST = "127.0.0.1";
|
|
5
5
|
var DEFAULT_PORT = 17874;
|
|
6
|
-
var VERSION = "0.0.
|
|
6
|
+
var VERSION = "0.0.61";
|
|
7
7
|
var HOSTED_CHAT_SYSTEM_PROMPT = "You are OpenPond Chat. Respond in the user's language. If the user's latest message is language-neutral, ambiguous, or only a short test, respond in English. Be concise and directly answer the latest request. Do not use emojis. Use Markdown when it improves scanability. If you emit reasoning or thinking content, keep it sparse and user-readable: at most one short sentence for major progress, decisions, or blockers. Omit reasoning for routine searches, reads, tool calls, and obvious next steps. Do not restate the user request, narrate every action, or include code blocks, code excerpts, diffs, raw tool payloads, or markdown examples in reasoning. Put necessary code or exact snippets only in the final assistant answer. When the user asks to show or preview an image that is available as a workspace path or signed image URL, use Markdown image syntax like  instead of a bare path or raw HTML. For workspace-backed answers, use a Codex-style shape: brief outcome first, then Changed Files if files changed, then Verification if checks ran. End with a concise final answer that summarizes the result and verification when relevant. Do not mention raw tool JSON, internal repo paths, or origin/remote URLs unless the user explicitly asks for them or they are necessary to explain a git/deploy failure.";
|
|
8
8
|
var APP_PREFERENCES_CACHE_TYPE = "app_preferences";
|
|
9
9
|
var APP_PREFERENCES_CACHE_KEY = "global";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
parseSandboxRuntimePromotionPolicyOption,
|
|
16
16
|
parseSandboxWorkflowModeOption,
|
|
17
17
|
runProcessCommand
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XIUCBUUQ.js";
|
|
19
19
|
import {
|
|
20
20
|
optionString,
|
|
21
21
|
optionalJsonObject,
|
|
@@ -123,9 +123,15 @@ function agentSdkRunScriptCommand(packageManager, scriptName) {
|
|
|
123
123
|
if (packageManager === "bun") return `bun run ${scriptName}`;
|
|
124
124
|
return `pnpm run ${scriptName}`;
|
|
125
125
|
}
|
|
126
|
+
function agentSdkRunJsonScriptCommand(packageManager, scriptName) {
|
|
127
|
+
if (packageManager === "pnpm") return `pnpm --silent run ${scriptName}`;
|
|
128
|
+
if (packageManager === "yarn") return `yarn --silent ${scriptName}`;
|
|
129
|
+
if (packageManager === "npm") return `npm run --silent ${scriptName}`;
|
|
130
|
+
if (packageManager === "bun") return `bun run --silent ${scriptName}`;
|
|
131
|
+
return `pnpm --silent run ${scriptName}`;
|
|
132
|
+
}
|
|
126
133
|
|
|
127
134
|
// ../../packages/cloud/src/profile/project-source-upload-agent-sdk.ts
|
|
128
|
-
var OPENPOND_PNPM_PACKAGE_MANAGER = "pnpm@11.13.0";
|
|
129
135
|
var AGENT_SDK_VENDOR_TARBALL_PATH = ".openpond/vendor/openpond-agent-sdk.tgz";
|
|
130
136
|
var AGENT_SDK_VENDOR_NPM_DEPENDENCY_DIR = ".openpond/vendor/npm";
|
|
131
137
|
var AGENT_SDK_MATERIALIZED_DEPENDENCY_SPEC = `file:${AGENT_SDK_VENDOR_TARBALL_PATH}`;
|
|
@@ -156,6 +162,8 @@ async function buildAgentSdkMaterializedDependency(projectPath, packageJson) {
|
|
|
156
162
|
const sdkDependencyTarballs = await packAgentSdkRuntimeDependencyTarballs({
|
|
157
163
|
sdkPackageJson: sdkSource.packageJson,
|
|
158
164
|
dependencyBaseDir: sdkSource.dependencyBaseDir,
|
|
165
|
+
projectPackageJson: packageJson,
|
|
166
|
+
projectPath,
|
|
159
167
|
tempDir
|
|
160
168
|
});
|
|
161
169
|
const packageManager = detectAgentSdkPackageManager(projectPath, packageJson);
|
|
@@ -226,23 +234,38 @@ ${details}` : ""}`
|
|
|
226
234
|
return fs.readFile(path3.join(tempDir, tarballName));
|
|
227
235
|
}
|
|
228
236
|
async function packAgentSdkRuntimeDependencyTarballs(params) {
|
|
229
|
-
const
|
|
230
|
-
const
|
|
237
|
+
const sdkDependencies = recordStringMap(params.sdkPackageJson.dependencies);
|
|
238
|
+
const projectDependencies = recordStringMap(
|
|
239
|
+
params.projectPackageJson.dependencies
|
|
240
|
+
);
|
|
241
|
+
delete projectDependencies["openpond-agent-sdk"];
|
|
242
|
+
const pending = [
|
|
243
|
+
...Object.entries(sdkDependencies).map(([packageName, versionSpec]) => ({
|
|
244
|
+
packageName,
|
|
245
|
+
versionSpec,
|
|
246
|
+
dependencyBaseDir: params.dependencyBaseDir
|
|
247
|
+
})),
|
|
248
|
+
...Object.entries(projectDependencies).map(([packageName, versionSpec]) => ({
|
|
249
|
+
packageName,
|
|
250
|
+
versionSpec,
|
|
251
|
+
dependencyBaseDir: params.projectPath
|
|
252
|
+
}))
|
|
253
|
+
].sort((left, right) => left.packageName.localeCompare(right.packageName));
|
|
231
254
|
const seen = /* @__PURE__ */ new Set();
|
|
232
255
|
const tarballs = [];
|
|
233
256
|
while (pending.length > 0) {
|
|
234
|
-
const { packageName, versionSpec } = pending.shift();
|
|
257
|
+
const { packageName, versionSpec, dependencyBaseDir } = pending.shift();
|
|
235
258
|
if (seen.has(packageName)) continue;
|
|
236
259
|
seen.add(packageName);
|
|
237
260
|
const packTarget = npmPackTargetForDependency({
|
|
238
261
|
packageName,
|
|
239
262
|
versionSpec,
|
|
240
|
-
dependencyBaseDir
|
|
263
|
+
dependencyBaseDir
|
|
241
264
|
});
|
|
242
265
|
const pack = await runCommand(
|
|
243
266
|
"npm",
|
|
244
267
|
["pack", "--silent", "--pack-destination", params.tempDir, packTarget],
|
|
245
|
-
{ cwd:
|
|
268
|
+
{ cwd: dependencyBaseDir }
|
|
246
269
|
);
|
|
247
270
|
if (pack.code !== 0) {
|
|
248
271
|
const details = [pack.stderr.trim(), pack.stdout.trim()].filter(Boolean).join("\n");
|
|
@@ -273,13 +296,21 @@ ${details}` : ""}`
|
|
|
273
296
|
for (const [dependencyName, dependencySpec] of Object.entries(
|
|
274
297
|
recordStringMap(packedPackageJson.dependencies)
|
|
275
298
|
)) {
|
|
276
|
-
pending.push({
|
|
299
|
+
pending.push({
|
|
300
|
+
packageName: dependencyName,
|
|
301
|
+
versionSpec: dependencySpec,
|
|
302
|
+
dependencyBaseDir
|
|
303
|
+
});
|
|
277
304
|
}
|
|
278
305
|
for (const [dependencyName, dependencySpec] of Object.entries(
|
|
279
306
|
recordStringMap(packedPackageJson.optionalDependencies)
|
|
280
307
|
)) {
|
|
281
308
|
if (!isSupportedSandboxOptionalDependency(dependencyName)) continue;
|
|
282
|
-
pending.push({
|
|
309
|
+
pending.push({
|
|
310
|
+
packageName: dependencyName,
|
|
311
|
+
versionSpec: dependencySpec,
|
|
312
|
+
dependencyBaseDir
|
|
313
|
+
});
|
|
283
314
|
}
|
|
284
315
|
}
|
|
285
316
|
return tarballs.sort((left, right) => left.packageName.localeCompare(right.packageName));
|
|
@@ -417,8 +448,8 @@ function rewriteAgentSdkPackageJsonForMaterialization(packageJson, dependencyTar
|
|
|
417
448
|
if (Object.keys(overrides).length > 0) {
|
|
418
449
|
rewritten.overrides = overrides;
|
|
419
450
|
}
|
|
420
|
-
if (packageManager === "unknown") {
|
|
421
|
-
rewritten.packageManager
|
|
451
|
+
if (packageManager === "pnpm" || packageManager === "unknown") {
|
|
452
|
+
delete rewritten.packageManager;
|
|
422
453
|
}
|
|
423
454
|
for (const key of ["devDependencies", "peerDependencies"]) {
|
|
424
455
|
const entries = recordCopy(rewritten[key]);
|
|
@@ -954,7 +985,8 @@ function buildAgentSdkCommandHints(packageJson, packageManager) {
|
|
|
954
985
|
packageJson,
|
|
955
986
|
packageManager,
|
|
956
987
|
"agent:inspect",
|
|
957
|
-
"openpond-agent inspect --json"
|
|
988
|
+
"openpond-agent inspect --json",
|
|
989
|
+
true
|
|
958
990
|
),
|
|
959
991
|
build: buildAgentSdkCommandHint(
|
|
960
992
|
packageJson,
|
|
@@ -976,11 +1008,11 @@ function buildAgentSdkCommandHints(packageJson, packageManager) {
|
|
|
976
1008
|
)
|
|
977
1009
|
};
|
|
978
1010
|
}
|
|
979
|
-
function buildAgentSdkCommandHint(packageJson, packageManager, scriptName, fallback) {
|
|
1011
|
+
function buildAgentSdkCommandHint(packageJson, packageManager, scriptName, fallback, jsonOutput = false) {
|
|
980
1012
|
const scripts = packageJson.scripts;
|
|
981
1013
|
const hasScript = scripts && typeof scripts === "object" && !Array.isArray(scripts) && typeof scripts[scriptName] === "string";
|
|
982
1014
|
if (!hasScript) return fallback;
|
|
983
|
-
return agentSdkRunScriptCommand(packageManager, scriptName);
|
|
1015
|
+
return jsonOutput ? agentSdkRunJsonScriptCommand(packageManager, scriptName) : agentSdkRunScriptCommand(packageManager, scriptName);
|
|
984
1016
|
}
|
|
985
1017
|
function readOpenPondAgentSdkVersionSpec2(packageJson) {
|
|
986
1018
|
for (const key of ["dependencies", "devDependencies", "peerDependencies"]) {
|