openpond 0.0.57 → 0.0.59
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-YY7UH37B.js → actions-command-BNVIILSL.js} +40 -1
- package/dist/chunks/{app-layer-EZQWXB3S.js → app-layer-RNQXXM6L.js} +5 -4
- package/dist/chunks/{app-server-runtime-JMEHVOFO.js → app-server-runtime-YCKU23ON.js} +6 -6
- package/dist/chunks/{apps-HHQF6TNR.js → apps-LV3CSMLT.js} +5 -4
- package/dist/chunks/{chunk-7JUIWABV.js → chunk-2E6OPEM5.js} +2 -2
- package/dist/chunks/{chunk-OJ34YA7E.js → chunk-2J3LG4U7.js} +2 -2
- package/dist/chunks/{chunk-XHTO6KF2.js → chunk-3PKCT4JC.js} +1 -1
- package/dist/chunks/{chunk-3HW6OSHP.js → chunk-63N6442Q.js} +1 -1
- package/dist/chunks/{chunk-42GGG3W4.js → chunk-7QLVLGDM.js} +1 -1
- package/dist/chunks/{chunk-KHNHUA2H.js → chunk-DXSHQ6TO.js} +111 -1
- package/dist/chunks/{chunk-XX6KALN2.js → chunk-EWS67RLV.js} +136 -65
- package/dist/chunks/{chunk-FCVVOMIP.js → chunk-FHP7OMEI.js} +3 -31
- package/dist/chunks/{chunk-MIZHCABO.js → chunk-I23UKEYS.js} +1 -1
- package/dist/chunks/{chunk-UBHCG2NE.js → chunk-LMQ4MPQI.js} +2 -2
- package/dist/chunks/{chunk-5ZLFZZLS.js → chunk-PVGJXCAK.js} +1 -1
- package/dist/chunks/{chunk-5Y7Q6ZSH.js → chunk-QNYFZ4I5.js} +1 -1
- package/dist/chunks/{chunk-5QJGC2QI.js → chunk-RC3N77IV.js} +39 -33
- package/dist/chunks/chunk-SKUS4NPW.js +633 -0
- package/dist/chunks/{cli-EUZHWEJR.js → cli-V4VB2VBY.js} +5 -5
- package/dist/chunks/{core-commands-RI4B7TYM.js → core-commands-H2UC3LHG.js} +6 -5
- package/dist/chunks/{desktop-test-DRTCQWDV.js → desktop-test-TV64EY5A.js} +5 -4
- package/dist/chunks/{help-UILXBPHG.js → help-NEYFMHWQ.js} +1 -1
- package/dist/chunks/{opchat-SSK54JSR.js → opchat-ZL5JJQ5L.js} +5 -4
- package/dist/chunks/{organizations-G5S2HJLT.js → organizations-4IEC35QB.js} +7 -6
- package/dist/chunks/{profile-YD7NYL3U.js → profile-EVASCDIN.js} +6 -5
- package/dist/chunks/{project-agent-75PAFL6B.js → project-agent-DMN64RZJ.js} +6 -5
- package/dist/chunks/{sandbox-command-FGUJDDXR.js → sandbox-command-WKGVO32R.js} +6 -5
- package/dist/chunks/{sandbox-template-PBSIPCVO.js → sandbox-template-BJUS4KJM.js} +7 -6
- package/dist/chunks/{src-P7YLMEEK.js → src-2AX2MUD4.js} +133 -59
- package/dist/chunks/{src-FTG6DVBK.js → src-KLQEJ6RO.js} +22 -4
- package/dist/chunks/{teams-bot-NSYWELB6.js → teams-bot-HUXYJ6XA.js} +5 -4
- package/dist/chunks/{workspaces-R3EVRSWA.js → workspaces-FPIBAG7G.js} +2 -2
- package/dist/cli.js +13 -13
- package/docs/command-reference.md +7 -1
- package/package.json +1 -1
|
@@ -4,6 +4,10 @@ import {
|
|
|
4
4
|
createLocalActionRunner,
|
|
5
5
|
loadProjectActionConfiguration
|
|
6
6
|
} from "./chunk-QETF6ILG.js";
|
|
7
|
+
import {
|
|
8
|
+
createOpenPondClient
|
|
9
|
+
} from "./chunk-SKUS4NPW.js";
|
|
10
|
+
import "./chunk-DXSHQ6TO.js";
|
|
7
11
|
import {
|
|
8
12
|
parseBooleanOption
|
|
9
13
|
} from "./chunk-MUMPWI4O.js";
|
|
@@ -12,6 +16,9 @@ import "./chunk-UACZUFIA.js";
|
|
|
12
16
|
// src/cli/actions-command.ts
|
|
13
17
|
import { promises as fs, watch } from "node:fs";
|
|
14
18
|
import path from "node:path";
|
|
19
|
+
import { execFile } from "node:child_process";
|
|
20
|
+
import { promisify } from "node:util";
|
|
21
|
+
var execFileAsync = promisify(execFile);
|
|
15
22
|
async function runProjectActionsCommand(options, rest) {
|
|
16
23
|
const subcommand = rest[0] ?? "check";
|
|
17
24
|
const projectRoot = path.resolve(stringOption(options, "cwd") ?? process.cwd());
|
|
@@ -58,7 +65,28 @@ async function runProjectActionsCommand(options, rest) {
|
|
|
58
65
|
await runDev({ projectRoot, sourceDirectory, outputDirectory, actionId, options, json });
|
|
59
66
|
return;
|
|
60
67
|
}
|
|
61
|
-
|
|
68
|
+
if (subcommand === "publish") {
|
|
69
|
+
const projectId = requiredOption(options, "projectId");
|
|
70
|
+
const teamId = requiredOption(options, "teamId");
|
|
71
|
+
const apiKey = stringOption(options, "apiKey") ?? process.env.OPENPOND_API_KEY?.trim();
|
|
72
|
+
if (!apiKey) throw new Error("OpenPond API key is required. Set OPENPOND_API_KEY or pass --api-key.");
|
|
73
|
+
const build = await buildProjectActions({ projectRoot, sourceDirectory, outputDirectory });
|
|
74
|
+
const sourceCommitSha = stringOption(options, "sourceCommitSha") ?? await gitValue(projectRoot, ["rev-parse", "HEAD"]);
|
|
75
|
+
const sourceRef = stringOption(options, "sourceRef") ?? await gitValue(projectRoot, ["rev-parse", "--abbrev-ref", "HEAD"]);
|
|
76
|
+
const release = await createOpenPondClient({
|
|
77
|
+
apiKey,
|
|
78
|
+
baseUrl: stringOption(options, "baseUrl") ?? process.env.OPENPOND_API_URL
|
|
79
|
+
}).actions.publish({
|
|
80
|
+
projectId,
|
|
81
|
+
teamId,
|
|
82
|
+
sourceRef,
|
|
83
|
+
sourceCommitSha,
|
|
84
|
+
build
|
|
85
|
+
});
|
|
86
|
+
console.log(json ? JSON.stringify({ release }, null, 2) : `Published Project Actions release ${release.id} from ${release.sourceCommitSha}.`);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
throw new Error("usage: openpond actions <check|build|run|dev|publish> [action-id]");
|
|
62
90
|
}
|
|
63
91
|
async function runDev(input) {
|
|
64
92
|
let running = false;
|
|
@@ -133,6 +161,17 @@ function stringOption(options, name) {
|
|
|
133
161
|
const value = options[name];
|
|
134
162
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
135
163
|
}
|
|
164
|
+
function requiredOption(options, name) {
|
|
165
|
+
const value = stringOption(options, name);
|
|
166
|
+
if (!value) throw new Error(`--${name.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)} is required.`);
|
|
167
|
+
return value;
|
|
168
|
+
}
|
|
169
|
+
async function gitValue(projectRoot, args) {
|
|
170
|
+
const { stdout } = await execFileAsync("git", args, { cwd: projectRoot });
|
|
171
|
+
const value = stdout.trim();
|
|
172
|
+
if (!value) throw new Error(`git ${args.join(" ")} returned no value.`);
|
|
173
|
+
return value;
|
|
174
|
+
}
|
|
136
175
|
function integerOption(options, name) {
|
|
137
176
|
const value = stringOption(options, name);
|
|
138
177
|
if (value === void 0) return void 0;
|
|
@@ -1,13 +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-
|
|
5
|
-
import "./chunk-KHNHUA2H.js";
|
|
4
|
+
} from "./chunk-FHP7OMEI.js";
|
|
6
5
|
import {
|
|
7
6
|
CliUsageError
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7QLVLGDM.js";
|
|
9
8
|
import "./chunk-SMNFI2FU.js";
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-RC3N77IV.js";
|
|
10
|
+
import "./chunk-SKUS4NPW.js";
|
|
11
|
+
import "./chunk-DXSHQ6TO.js";
|
|
11
12
|
import "./chunk-DBHSOTYZ.js";
|
|
12
13
|
import "./chunk-KSRWKXRB.js";
|
|
13
14
|
import "./chunk-MUMPWI4O.js";
|
|
@@ -2,15 +2,15 @@ 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-
|
|
5
|
+
} from "./chunk-EWS67RLV.js";
|
|
6
|
+
import "./chunk-QNYFZ4I5.js";
|
|
7
7
|
import "./chunk-NFNEENNR.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-3PKCT4JC.js";
|
|
9
|
+
import "./chunk-LMQ4MPQI.js";
|
|
10
|
+
import "./chunk-PVGJXCAK.js";
|
|
11
11
|
import "./chunk-VG4H4TQG.js";
|
|
12
12
|
import "./chunk-WYDVQOBL.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-DXSHQ6TO.js";
|
|
14
14
|
import "./chunk-UACZUFIA.js";
|
|
15
15
|
export {
|
|
16
16
|
APP_SERVER_COMPOSITION,
|
|
@@ -10,14 +10,15 @@ import {
|
|
|
10
10
|
normalizeRepoName,
|
|
11
11
|
pollDeploymentLogs,
|
|
12
12
|
resolveAppTarget
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-42GGG3W4.js";
|
|
13
|
+
} from "./chunk-FHP7OMEI.js";
|
|
14
|
+
import "./chunk-7QLVLGDM.js";
|
|
16
15
|
import {
|
|
17
16
|
resolveBaseUrl,
|
|
18
17
|
resolvePublicApiBaseUrl
|
|
19
18
|
} from "./chunk-SMNFI2FU.js";
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-RC3N77IV.js";
|
|
20
|
+
import "./chunk-SKUS4NPW.js";
|
|
21
|
+
import "./chunk-DXSHQ6TO.js";
|
|
21
22
|
import {
|
|
22
23
|
createAgentFromPrompt,
|
|
23
24
|
deployApp,
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
DEFAULT_HOST,
|
|
7
7
|
DEFAULT_PORT,
|
|
8
8
|
parseListen
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3PKCT4JC.js";
|
|
10
10
|
import {
|
|
11
11
|
getBundledRuntimeVersion,
|
|
12
12
|
openUrlWithSystemBrowser
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LMQ4MPQI.js";
|
|
14
14
|
|
|
15
15
|
// ../server/src/cli.ts
|
|
16
16
|
import { existsSync } from "node:fs";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
resolveRepoUrl,
|
|
16
16
|
runCommand,
|
|
17
17
|
warnOnRepoHostMismatch
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FHP7OMEI.js";
|
|
19
19
|
import {
|
|
20
20
|
normalizeTemplateRepoUrl,
|
|
21
21
|
resolveApiBaseUrlOption,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
compareSemver,
|
|
29
29
|
fetchLatestNpmVersion,
|
|
30
30
|
getInstalledCliVersion
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-RC3N77IV.js";
|
|
32
32
|
import {
|
|
33
33
|
checkOpenPondApiHealth,
|
|
34
34
|
createHeadlessApps,
|
|
@@ -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.59";
|
|
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";
|
|
@@ -171,6 +171,7 @@ function composedSignal(callerSignal, timeoutSignal, timeoutMs) {
|
|
|
171
171
|
// ../../packages/cloud/dist/urls.js
|
|
172
172
|
var DEFAULT_OPENPOND_WEB_BASE_URL = "https://openpond.ai";
|
|
173
173
|
var DEFAULT_OPENPOND_API_BASE_URL = "https://api.openpond.ai";
|
|
174
|
+
var DEFAULT_OPENPOND_OPCHAT_API_BASE_URL = "https://api.openpond.ai/opchat/v1";
|
|
174
175
|
|
|
175
176
|
// ../../packages/cloud/dist/sandbox/url.js
|
|
176
177
|
function normalizeSandboxApiUrl(baseUrlOrApiUrl) {
|
|
@@ -1727,11 +1728,120 @@ function createOpenPondSandboxClient(options) {
|
|
|
1727
1728
|
return new OpenPondSandboxClient(options);
|
|
1728
1729
|
}
|
|
1729
1730
|
|
|
1731
|
+
// ../../packages/cloud/dist/hosted-chat.js
|
|
1732
|
+
import { randomUUID } from "node:crypto";
|
|
1733
|
+
function normalizeApiBaseUrl(value) {
|
|
1734
|
+
const trimmed = normalizeOptionalOpChatApiBaseUrl(value);
|
|
1735
|
+
if (!trimmed)
|
|
1736
|
+
throw new Error("apiBaseUrl is required");
|
|
1737
|
+
return trimmed;
|
|
1738
|
+
}
|
|
1739
|
+
function trimTrailingSlashes(value) {
|
|
1740
|
+
return value.replace(/\/+$/, "");
|
|
1741
|
+
}
|
|
1742
|
+
function normalizeOptionalOpChatApiBaseUrl(value) {
|
|
1743
|
+
let trimmed = trimTrailingSlashes(value?.trim() ?? "");
|
|
1744
|
+
if (!trimmed)
|
|
1745
|
+
return null;
|
|
1746
|
+
trimmed = trimmed.replace(/\/chat\/completions$/i, "").replace(/\/models(?:\/[^/]+)?$/i, "");
|
|
1747
|
+
if (trimmed.endsWith("/opchat/v1"))
|
|
1748
|
+
return trimmed;
|
|
1749
|
+
if (trimmed.endsWith("/opchat"))
|
|
1750
|
+
return `${trimmed}/v1`;
|
|
1751
|
+
if (trimmed.endsWith("/v1")) {
|
|
1752
|
+
trimmed = trimmed.slice(0, -"/v1".length);
|
|
1753
|
+
}
|
|
1754
|
+
return `${trimTrailingSlashes(trimmed)}/opchat/v1`;
|
|
1755
|
+
}
|
|
1756
|
+
function resolveOpChatApiBaseUrl(options = {}) {
|
|
1757
|
+
const runtimeEnv = options.env ?? (typeof process !== "undefined" ? process.env : {});
|
|
1758
|
+
const explicit = normalizeOptionalOpChatApiBaseUrl(options.opChatApiBaseUrl) ?? normalizeOptionalOpChatApiBaseUrl(runtimeEnv.OPENPOND_OPCHAT_API_URL);
|
|
1759
|
+
if (explicit)
|
|
1760
|
+
return explicit;
|
|
1761
|
+
const migrationInput = normalizeOptionalOpChatApiBaseUrl(options.chatApiBaseUrl) ?? normalizeOptionalOpChatApiBaseUrl(runtimeEnv.OPENPOND_CHAT_API_URL) ?? normalizeOptionalOpChatApiBaseUrl(runtimeEnv.OPENPOND_GATEWAY_URL);
|
|
1762
|
+
if (migrationInput)
|
|
1763
|
+
return migrationInput;
|
|
1764
|
+
const apiBase = normalizeOptionalOpChatApiBaseUrl(options.apiBaseUrl) ?? normalizeOptionalOpChatApiBaseUrl(runtimeEnv.OPENPOND_API_URL);
|
|
1765
|
+
return apiBase ?? DEFAULT_OPENPOND_OPCHAT_API_BASE_URL;
|
|
1766
|
+
}
|
|
1767
|
+
function requireToken(value) {
|
|
1768
|
+
const trimmed = value.trim();
|
|
1769
|
+
if (!trimmed)
|
|
1770
|
+
throw new Error("OpenPond API key is required");
|
|
1771
|
+
return trimmed;
|
|
1772
|
+
}
|
|
1773
|
+
function hostedHeaders(requestUrl, token, accept, requestId) {
|
|
1774
|
+
const headers = new Headers();
|
|
1775
|
+
headers.set("Authorization", `Bearer ${requireToken(token)}`);
|
|
1776
|
+
headers.set("Content-Type", "application/json");
|
|
1777
|
+
headers.set("Accept", accept);
|
|
1778
|
+
headers.set("x-openpond-client", "openpond-code");
|
|
1779
|
+
headers.set("x-openpond-request-id", requestId || randomUUID());
|
|
1780
|
+
return withVercelProtectionBypass(requestUrl, headers);
|
|
1781
|
+
}
|
|
1782
|
+
async function readError(response) {
|
|
1783
|
+
const text = await response.text().catch(() => "");
|
|
1784
|
+
if (!text)
|
|
1785
|
+
return response.statusText || `HTTP ${response.status}`;
|
|
1786
|
+
try {
|
|
1787
|
+
const payload = JSON.parse(text);
|
|
1788
|
+
const error = typeof payload.error === "string" ? payload.error : payload.error && typeof payload.error === "object" && !Array.isArray(payload.error) ? payload.error : null;
|
|
1789
|
+
const code = typeof payload.code === "string" ? payload.code : error && typeof error !== "string" && typeof error.code === "string" ? error.code : null;
|
|
1790
|
+
const message = typeof payload.message === "string" ? payload.message : error && typeof error !== "string" && typeof error.message === "string" ? error.message : null;
|
|
1791
|
+
const label = typeof error === "string" ? error : error && typeof error.type === "string" ? error.type : null;
|
|
1792
|
+
return [code, label, message].filter(Boolean).join(": ") || text;
|
|
1793
|
+
} catch {
|
|
1794
|
+
return text;
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
function buildHostedChatBody(options, stream) {
|
|
1798
|
+
const body = {
|
|
1799
|
+
model: options.model,
|
|
1800
|
+
messages: options.messages,
|
|
1801
|
+
stream
|
|
1802
|
+
};
|
|
1803
|
+
if (typeof options.temperature === "number") {
|
|
1804
|
+
body.temperature = options.temperature;
|
|
1805
|
+
}
|
|
1806
|
+
if (typeof options.maxTokens === "number") {
|
|
1807
|
+
body.max_tokens = options.maxTokens;
|
|
1808
|
+
}
|
|
1809
|
+
if (options.tools) {
|
|
1810
|
+
body.tools = options.tools;
|
|
1811
|
+
}
|
|
1812
|
+
const toolChoice = options.toolChoice ?? options.tool_choice;
|
|
1813
|
+
if (toolChoice !== void 0) {
|
|
1814
|
+
body.tool_choice = toolChoice;
|
|
1815
|
+
}
|
|
1816
|
+
if (options.metadata) {
|
|
1817
|
+
body.metadata = options.metadata;
|
|
1818
|
+
}
|
|
1819
|
+
return body;
|
|
1820
|
+
}
|
|
1821
|
+
async function sendHostedChatTurn(options) {
|
|
1822
|
+
const apiBaseUrl = normalizeApiBaseUrl(options.apiBaseUrl);
|
|
1823
|
+
const requestUrl = `${apiBaseUrl}/chat/completions`;
|
|
1824
|
+
const response = await fetch(requestUrl, {
|
|
1825
|
+
method: "POST",
|
|
1826
|
+
headers: hostedHeaders(requestUrl, options.token, "application/json", options.requestId),
|
|
1827
|
+
body: JSON.stringify(buildHostedChatBody(options, false)),
|
|
1828
|
+
signal: options.signal
|
|
1829
|
+
});
|
|
1830
|
+
if (!response.ok) {
|
|
1831
|
+
throw new Error(`Hosted chat failed: ${response.status} ${await readError(response)}`);
|
|
1832
|
+
}
|
|
1833
|
+
return await response.json();
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1730
1836
|
export {
|
|
1731
1837
|
withVercelProtectionBypass,
|
|
1838
|
+
OpenPondApiError,
|
|
1732
1839
|
apiFetch,
|
|
1840
|
+
readApiJson,
|
|
1733
1841
|
DEFAULT_OPENPOND_WEB_BASE_URL,
|
|
1734
1842
|
DEFAULT_OPENPOND_API_BASE_URL,
|
|
1735
1843
|
normalizeSandboxApiUrl,
|
|
1736
|
-
createOpenPondSandboxClient
|
|
1844
|
+
createOpenPondSandboxClient,
|
|
1845
|
+
resolveOpChatApiBaseUrl,
|
|
1846
|
+
sendHostedChatTurn
|
|
1737
1847
|
};
|