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
|
@@ -9,15 +9,16 @@ import {
|
|
|
9
9
|
} from "./chunk-3KLQ52B2.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureApiKey
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-42GGG3W4.js";
|
|
12
|
+
} from "./chunk-FHP7OMEI.js";
|
|
13
|
+
import "./chunk-7QLVLGDM.js";
|
|
15
14
|
import {
|
|
16
15
|
resolveApiBaseUrlOption,
|
|
17
16
|
resolveBaseUrl,
|
|
18
17
|
resolveChatApiBaseUrlOption
|
|
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
|
loadConfig
|
|
23
24
|
} from "./chunk-DBHSOTYZ.js";
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-PVGJXCAK.js";
|
|
3
3
|
import "./chunk-VG4H4TQG.js";
|
|
4
4
|
import "./chunk-WYDVQOBL.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveSandboxClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FHP7OMEI.js";
|
|
8
|
+
import "./chunk-7QLVLGDM.js";
|
|
9
|
+
import "./chunk-SMNFI2FU.js";
|
|
10
|
+
import "./chunk-RC3N77IV.js";
|
|
11
|
+
import "./chunk-SKUS4NPW.js";
|
|
8
12
|
import {
|
|
9
13
|
DEFAULT_OPENPOND_API_BASE_URL,
|
|
10
14
|
DEFAULT_OPENPOND_WEB_BASE_URL
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-42GGG3W4.js";
|
|
13
|
-
import "./chunk-SMNFI2FU.js";
|
|
14
|
-
import "./chunk-5QJGC2QI.js";
|
|
15
|
+
} from "./chunk-DXSHQ6TO.js";
|
|
15
16
|
import "./chunk-DBHSOTYZ.js";
|
|
16
17
|
import "./chunk-KSRWKXRB.js";
|
|
17
18
|
import {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
mergeProjectSourceUploadEntries,
|
|
6
6
|
parseAgentSourceCheckDispatch,
|
|
7
7
|
parseAgentSourceCheckKind
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-I23UKEYS.js";
|
|
9
9
|
import {
|
|
10
10
|
buildHostedRunIdempotencyKey,
|
|
11
11
|
collectProfileSourceUploadEntries,
|
|
@@ -28,11 +28,12 @@ import "./chunk-BYAPLT37.js";
|
|
|
28
28
|
import "./chunk-WYDVQOBL.js";
|
|
29
29
|
import {
|
|
30
30
|
resolveSandboxClient
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-42GGG3W4.js";
|
|
31
|
+
} from "./chunk-FHP7OMEI.js";
|
|
32
|
+
import "./chunk-7QLVLGDM.js";
|
|
34
33
|
import "./chunk-SMNFI2FU.js";
|
|
35
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-RC3N77IV.js";
|
|
35
|
+
import "./chunk-SKUS4NPW.js";
|
|
36
|
+
import "./chunk-DXSHQ6TO.js";
|
|
36
37
|
import "./chunk-DBHSOTYZ.js";
|
|
37
38
|
import "./chunk-KSRWKXRB.js";
|
|
38
39
|
import {
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
parseProjectSourceType,
|
|
27
27
|
resolveLocalAgentSdkCommand,
|
|
28
28
|
resolveProjectSourceUploadBranch
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-I23UKEYS.js";
|
|
30
30
|
import "./chunk-JIEUB6OS.js";
|
|
31
31
|
import "./chunk-BYAPLT37.js";
|
|
32
32
|
import "./chunk-WYDVQOBL.js";
|
|
@@ -34,11 +34,12 @@ import {
|
|
|
34
34
|
parseSandboxWorkflowModeOption,
|
|
35
35
|
resolveSandboxClient,
|
|
36
36
|
runCommand
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-42GGG3W4.js";
|
|
37
|
+
} from "./chunk-FHP7OMEI.js";
|
|
38
|
+
import "./chunk-7QLVLGDM.js";
|
|
40
39
|
import "./chunk-SMNFI2FU.js";
|
|
41
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-RC3N77IV.js";
|
|
41
|
+
import "./chunk-SKUS4NPW.js";
|
|
42
|
+
import "./chunk-DXSHQ6TO.js";
|
|
42
43
|
import "./chunk-DBHSOTYZ.js";
|
|
43
44
|
import "./chunk-KSRWKXRB.js";
|
|
44
45
|
import {
|
|
@@ -15,16 +15,17 @@ import {
|
|
|
15
15
|
summarizeReplayArtifact,
|
|
16
16
|
summarizeSandbox,
|
|
17
17
|
waitForSandboxCreateReady
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-63N6442Q.js";
|
|
19
19
|
import {
|
|
20
20
|
readSandboxSecretValue,
|
|
21
21
|
resolveSandboxClient,
|
|
22
22
|
summarizeSandboxSecret
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-42GGG3W4.js";
|
|
23
|
+
} from "./chunk-FHP7OMEI.js";
|
|
24
|
+
import "./chunk-7QLVLGDM.js";
|
|
26
25
|
import "./chunk-SMNFI2FU.js";
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-RC3N77IV.js";
|
|
27
|
+
import "./chunk-SKUS4NPW.js";
|
|
28
|
+
import "./chunk-DXSHQ6TO.js";
|
|
28
29
|
import "./chunk-DBHSOTYZ.js";
|
|
29
30
|
import "./chunk-KSRWKXRB.js";
|
|
30
31
|
import {
|
|
@@ -2,10 +2,10 @@ import { createRequire as __openpondCreateRequire } from "node:module"; var requ
|
|
|
2
2
|
import {
|
|
3
3
|
createSandboxFromPlan,
|
|
4
4
|
summarizeSandbox
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-63N6442Q.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveGitBranch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2J3LG4U7.js";
|
|
9
9
|
import {
|
|
10
10
|
OPENPOND_MANIFEST_FILE_NAME,
|
|
11
11
|
SANDBOX_TEMPLATE_BUILD_PLAN_FILE_NAME,
|
|
@@ -33,14 +33,15 @@ import {
|
|
|
33
33
|
runCommand,
|
|
34
34
|
runShellCommand,
|
|
35
35
|
warnOnRepoHostMismatch
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-42GGG3W4.js";
|
|
36
|
+
} from "./chunk-FHP7OMEI.js";
|
|
37
|
+
import "./chunk-7QLVLGDM.js";
|
|
39
38
|
import {
|
|
40
39
|
resolveBaseUrl,
|
|
41
40
|
resolvePublicApiBaseUrl
|
|
42
41
|
} from "./chunk-SMNFI2FU.js";
|
|
43
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-RC3N77IV.js";
|
|
43
|
+
import "./chunk-SKUS4NPW.js";
|
|
44
|
+
import "./chunk-DXSHQ6TO.js";
|
|
44
45
|
import {
|
|
45
46
|
createRepo,
|
|
46
47
|
loadConfig
|
|
@@ -117,7 +117,7 @@ import {
|
|
|
117
117
|
workspaceHasHead,
|
|
118
118
|
workspaceToolExperienceBlocker,
|
|
119
119
|
writeWorkspaceFile
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-EWS67RLV.js";
|
|
121
121
|
import {
|
|
122
122
|
appWorkspacePaths,
|
|
123
123
|
checkWorkspaceGitAvailability,
|
|
@@ -145,10 +145,10 @@ import {
|
|
|
145
145
|
runCommand,
|
|
146
146
|
startMacOSCommandLineToolsInstall,
|
|
147
147
|
workspaceImageContentType
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-QNYFZ4I5.js";
|
|
149
149
|
import {
|
|
150
150
|
runOpenPondServerCli
|
|
151
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-2E6OPEM5.js";
|
|
152
152
|
import {
|
|
153
153
|
createAppServer,
|
|
154
154
|
runAgentCompaction
|
|
@@ -164,7 +164,7 @@ import {
|
|
|
164
164
|
isCliEntrypoint,
|
|
165
165
|
now,
|
|
166
166
|
textFromUnknown
|
|
167
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-3PKCT4JC.js";
|
|
168
168
|
import {
|
|
169
169
|
createOpenPondRepoApp,
|
|
170
170
|
getBundledRuntimeVersion,
|
|
@@ -178,7 +178,7 @@ import {
|
|
|
178
178
|
streamOpenPondHostedChatTurn,
|
|
179
179
|
switchOpenPondAccount,
|
|
180
180
|
updateOpenPondAccountConfig
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-LMQ4MPQI.js";
|
|
182
182
|
import {
|
|
183
183
|
AccountStateSchema,
|
|
184
184
|
AdapterValidationReceiptSchema,
|
|
@@ -412,7 +412,7 @@ import {
|
|
|
412
412
|
workFormatCapabilityForContentType,
|
|
413
413
|
workspacePathFromLocalPathWorkspaceId,
|
|
414
414
|
writeSourceUploadCache
|
|
415
|
-
} from "./chunk-
|
|
415
|
+
} from "./chunk-PVGJXCAK.js";
|
|
416
416
|
import {
|
|
417
417
|
PROJECT_ACTION_CONFIG_PATH,
|
|
418
418
|
createLocalActionRunner,
|
|
@@ -464,8 +464,9 @@ import {
|
|
|
464
464
|
} from "./chunk-WYDVQOBL.js";
|
|
465
465
|
import {
|
|
466
466
|
apiFetch,
|
|
467
|
+
readApiJson,
|
|
467
468
|
withVercelProtectionBypass
|
|
468
|
-
} from "./chunk-
|
|
469
|
+
} from "./chunk-DXSHQ6TO.js";
|
|
469
470
|
import {
|
|
470
471
|
__commonJS,
|
|
471
472
|
__require,
|
|
@@ -25079,6 +25080,90 @@ Uploaded from OpenPond Desktop.
|
|
|
25079
25080
|
};
|
|
25080
25081
|
}
|
|
25081
25082
|
|
|
25083
|
+
// ../server/src/openpond/hosted-api-access.ts
|
|
25084
|
+
var DEFAULT_OPENPOND_API_BASE_URL2 = "https://api.openpond.ai";
|
|
25085
|
+
async function resolveHostedApiAccess(dependencies = {}) {
|
|
25086
|
+
const context = await (dependencies.loadAccountContext ?? loadOpenPondAccountContext)();
|
|
25087
|
+
const token = context.token?.trim();
|
|
25088
|
+
if (!token) throw new Error("OpenPond account API key is required.");
|
|
25089
|
+
return { apiBaseUrl: resolveApiBaseUrl2(context), token };
|
|
25090
|
+
}
|
|
25091
|
+
async function resolveManagedAdapterUserAccess(dependencies = {}) {
|
|
25092
|
+
const access5 = await resolveHostedApiAccess(dependencies);
|
|
25093
|
+
return { ...access5, teamId: managedAdapterTeamId(dependencies.teamId) };
|
|
25094
|
+
}
|
|
25095
|
+
function hostedApiAuthHeaders(token) {
|
|
25096
|
+
const headers = new Headers();
|
|
25097
|
+
if (token.startsWith("opk_")) {
|
|
25098
|
+
headers.set("Authorization", `ApiKey ${token}`);
|
|
25099
|
+
headers.set("openpond-api-key", token);
|
|
25100
|
+
} else {
|
|
25101
|
+
headers.set("Authorization", `Bearer ${token}`);
|
|
25102
|
+
}
|
|
25103
|
+
return headers;
|
|
25104
|
+
}
|
|
25105
|
+
function resolveApiBaseUrl2(context) {
|
|
25106
|
+
return normalizeOptionalUrl2(context.apiBaseUrl) ?? normalizeOptionalUrl2(context.account?.apiBaseUrl) ?? normalizeOptionalUrl2(context.config.apiBaseUrl) ?? normalizeOpenPondWebBaseAsApi2(context.account?.baseUrl) ?? normalizeOpenPondWebBaseAsApi2(context.config.baseUrl) ?? DEFAULT_OPENPOND_API_BASE_URL2;
|
|
25107
|
+
}
|
|
25108
|
+
function managedAdapterTeamId(explicitTeamId) {
|
|
25109
|
+
const teamId = explicitTeamId?.trim();
|
|
25110
|
+
if (!teamId || !/^[A-Za-z0-9_-]{3,191}$/.test(teamId)) {
|
|
25111
|
+
throw new Error("Select an OpenPond workspace before using OpenPond Managed RL.");
|
|
25112
|
+
}
|
|
25113
|
+
return teamId;
|
|
25114
|
+
}
|
|
25115
|
+
function normalizeOpenPondWebBaseAsApi2(value) {
|
|
25116
|
+
const normalized = normalizeOptionalUrl2(value);
|
|
25117
|
+
if (!normalized) return null;
|
|
25118
|
+
try {
|
|
25119
|
+
const url = new URL(normalized);
|
|
25120
|
+
if (url.hostname === "openpond.ai") return "https://api.openpond.ai";
|
|
25121
|
+
if (!url.hostname.startsWith("api.") && url.hostname.endsWith(".openpond.ai")) {
|
|
25122
|
+
url.hostname = `api.${url.hostname}`;
|
|
25123
|
+
return url.origin;
|
|
25124
|
+
}
|
|
25125
|
+
} catch {
|
|
25126
|
+
return normalized;
|
|
25127
|
+
}
|
|
25128
|
+
return normalized;
|
|
25129
|
+
}
|
|
25130
|
+
function normalizeOptionalUrl2(value) {
|
|
25131
|
+
const trimmed = value?.trim();
|
|
25132
|
+
return trimmed ? trimmed.replace(/\/$/, "") : null;
|
|
25133
|
+
}
|
|
25134
|
+
|
|
25135
|
+
// ../server/src/project-actions/hosted-project-actions.ts
|
|
25136
|
+
async function runHostedProjectAction(input, dependencies = {}) {
|
|
25137
|
+
const access5 = await (dependencies.resolveAccess ?? resolveHostedApiAccess)();
|
|
25138
|
+
const response = await (dependencies.fetch ?? apiFetch)(
|
|
25139
|
+
access5.apiBaseUrl,
|
|
25140
|
+
access5.token,
|
|
25141
|
+
`/v1/project-actions/${encodeURIComponent(input.projectId)}/actions/${encodeURIComponent(input.actionId)}?teamId=${encodeURIComponent(input.teamId)}`,
|
|
25142
|
+
{
|
|
25143
|
+
method: "POST",
|
|
25144
|
+
body: JSON.stringify({
|
|
25145
|
+
input: input.value,
|
|
25146
|
+
releaseId: input.releaseId,
|
|
25147
|
+
idempotencyKey: input.idempotencyKey,
|
|
25148
|
+
callerType: "work",
|
|
25149
|
+
callerId: input.callerId
|
|
25150
|
+
}),
|
|
25151
|
+
signal: input.signal,
|
|
25152
|
+
timeoutMs: 15 * 60 * 1e3
|
|
25153
|
+
}
|
|
25154
|
+
);
|
|
25155
|
+
const payload = await readApiJson(
|
|
25156
|
+
response,
|
|
25157
|
+
"Run hosted Project Action"
|
|
25158
|
+
);
|
|
25159
|
+
if (payload.invocation.status === "failed") {
|
|
25160
|
+
throw new Error(
|
|
25161
|
+
payload.invocation.failureMessage || payload.invocation.failureCode || "Hosted Project Action failed."
|
|
25162
|
+
);
|
|
25163
|
+
}
|
|
25164
|
+
return payload.invocation;
|
|
25165
|
+
}
|
|
25166
|
+
|
|
25082
25167
|
// ../server/src/project-actions/project-action-payload.ts
|
|
25083
25168
|
function createProjectActionRunPayload(deps) {
|
|
25084
25169
|
return async function projectActionRunPayload(payload) {
|
|
@@ -25086,6 +25171,42 @@ function createProjectActionRunPayload(deps) {
|
|
|
25086
25171
|
const action = stringValue5(input.action) ?? stringValue5(input.actionName);
|
|
25087
25172
|
if (!action) throw new Error("Project Action name is required.");
|
|
25088
25173
|
const metadata = asRecord5(input.metadata);
|
|
25174
|
+
if (stringValue5(metadata.execution) === "hosted") {
|
|
25175
|
+
const result2 = await runHostedProjectAction({
|
|
25176
|
+
projectId: requiredMetadata(metadata, "projectId"),
|
|
25177
|
+
teamId: requiredMetadata(metadata, "teamId"),
|
|
25178
|
+
releaseId: requiredMetadata(metadata, "releaseId"),
|
|
25179
|
+
actionId: action,
|
|
25180
|
+
value: input.input ?? {},
|
|
25181
|
+
idempotencyKey: stringValue5(metadata.toolCallId) ? `${requiredMetadata(metadata, "turnId")}:${requiredMetadata(metadata, "toolCallId")}` : void 0,
|
|
25182
|
+
callerId: stringValue5(metadata.turnId) ?? void 0
|
|
25183
|
+
});
|
|
25184
|
+
const sessionId2 = stringValue5(metadata.sessionId);
|
|
25185
|
+
if (sessionId2) {
|
|
25186
|
+
await deps.appendRuntimeEvent(event({
|
|
25187
|
+
name: "workspace_action_result",
|
|
25188
|
+
sessionId: sessionId2,
|
|
25189
|
+
turnId: requiredMetadata(metadata, "turnId"),
|
|
25190
|
+
source: "chat_action",
|
|
25191
|
+
action: "project_action_run",
|
|
25192
|
+
appId: null,
|
|
25193
|
+
status: "completed",
|
|
25194
|
+
output: JSON.stringify(result2.resultJson),
|
|
25195
|
+
data: {
|
|
25196
|
+
openPondHostedProjectActionRun: true,
|
|
25197
|
+
action: {
|
|
25198
|
+
name: action,
|
|
25199
|
+
label: stringValue5(metadata.selectedActionLabel) ?? action
|
|
25200
|
+
},
|
|
25201
|
+
releaseId: result2.releaseId,
|
|
25202
|
+
invocationId: result2.id,
|
|
25203
|
+
traces: result2.traceJson,
|
|
25204
|
+
outputs: result2.outputJson
|
|
25205
|
+
}
|
|
25206
|
+
}));
|
|
25207
|
+
}
|
|
25208
|
+
return result2;
|
|
25209
|
+
}
|
|
25089
25210
|
const projectId = stringValue5(metadata.projectId);
|
|
25090
25211
|
if (!projectId) throw new Error("Project Action Project id is required.");
|
|
25091
25212
|
const projectRoot = await deps.resolveProjectRoot(projectId);
|
|
@@ -25127,6 +25248,11 @@ function createProjectActionRunPayload(deps) {
|
|
|
25127
25248
|
return result;
|
|
25128
25249
|
};
|
|
25129
25250
|
}
|
|
25251
|
+
function requiredMetadata(metadata, name) {
|
|
25252
|
+
const value = stringValue5(metadata[name]);
|
|
25253
|
+
if (!value) throw new Error(`Hosted Project Action ${name} is required.`);
|
|
25254
|
+
return value;
|
|
25255
|
+
}
|
|
25130
25256
|
|
|
25131
25257
|
// ../server/src/api/event-page.ts
|
|
25132
25258
|
var DEFAULT_EVENT_PAGE_LIMIT = 100;
|
|
@@ -26224,58 +26350,6 @@ async function handleCreateImproveRoutes({
|
|
|
26224
26350
|
return false;
|
|
26225
26351
|
}
|
|
26226
26352
|
|
|
26227
|
-
// ../server/src/openpond/hosted-api-access.ts
|
|
26228
|
-
var DEFAULT_OPENPOND_API_BASE_URL2 = "https://api.openpond.ai";
|
|
26229
|
-
async function resolveHostedApiAccess(dependencies = {}) {
|
|
26230
|
-
const context = await (dependencies.loadAccountContext ?? loadOpenPondAccountContext)();
|
|
26231
|
-
const token = context.token?.trim();
|
|
26232
|
-
if (!token) throw new Error("OpenPond account API key is required.");
|
|
26233
|
-
return { apiBaseUrl: resolveApiBaseUrl2(context), token };
|
|
26234
|
-
}
|
|
26235
|
-
async function resolveManagedAdapterUserAccess(dependencies = {}) {
|
|
26236
|
-
const access5 = await resolveHostedApiAccess(dependencies);
|
|
26237
|
-
return { ...access5, teamId: managedAdapterTeamId(dependencies.teamId) };
|
|
26238
|
-
}
|
|
26239
|
-
function hostedApiAuthHeaders(token) {
|
|
26240
|
-
const headers = new Headers();
|
|
26241
|
-
if (token.startsWith("opk_")) {
|
|
26242
|
-
headers.set("Authorization", `ApiKey ${token}`);
|
|
26243
|
-
headers.set("openpond-api-key", token);
|
|
26244
|
-
} else {
|
|
26245
|
-
headers.set("Authorization", `Bearer ${token}`);
|
|
26246
|
-
}
|
|
26247
|
-
return headers;
|
|
26248
|
-
}
|
|
26249
|
-
function resolveApiBaseUrl2(context) {
|
|
26250
|
-
return normalizeOptionalUrl2(context.apiBaseUrl) ?? normalizeOptionalUrl2(context.account?.apiBaseUrl) ?? normalizeOptionalUrl2(context.config.apiBaseUrl) ?? normalizeOpenPondWebBaseAsApi2(context.account?.baseUrl) ?? normalizeOpenPondWebBaseAsApi2(context.config.baseUrl) ?? DEFAULT_OPENPOND_API_BASE_URL2;
|
|
26251
|
-
}
|
|
26252
|
-
function managedAdapterTeamId(explicitTeamId) {
|
|
26253
|
-
const teamId = explicitTeamId?.trim();
|
|
26254
|
-
if (!teamId || !/^[A-Za-z0-9_-]{3,191}$/.test(teamId)) {
|
|
26255
|
-
throw new Error("Select an OpenPond workspace before using OpenPond Managed RL.");
|
|
26256
|
-
}
|
|
26257
|
-
return teamId;
|
|
26258
|
-
}
|
|
26259
|
-
function normalizeOpenPondWebBaseAsApi2(value) {
|
|
26260
|
-
const normalized = normalizeOptionalUrl2(value);
|
|
26261
|
-
if (!normalized) return null;
|
|
26262
|
-
try {
|
|
26263
|
-
const url = new URL(normalized);
|
|
26264
|
-
if (url.hostname === "openpond.ai") return "https://api.openpond.ai";
|
|
26265
|
-
if (!url.hostname.startsWith("api.") && url.hostname.endsWith(".openpond.ai")) {
|
|
26266
|
-
url.hostname = `api.${url.hostname}`;
|
|
26267
|
-
return url.origin;
|
|
26268
|
-
}
|
|
26269
|
-
} catch {
|
|
26270
|
-
return normalized;
|
|
26271
|
-
}
|
|
26272
|
-
return normalized;
|
|
26273
|
-
}
|
|
26274
|
-
function normalizeOptionalUrl2(value) {
|
|
26275
|
-
const trimmed = value?.trim();
|
|
26276
|
-
return trimmed ? trimmed.replace(/\/$/, "") : null;
|
|
26277
|
-
}
|
|
26278
|
-
|
|
26279
26353
|
// ../server/src/openpond/community-client.ts
|
|
26280
26354
|
var CommunityApiError = class extends Error {
|
|
26281
26355
|
constructor(code, status, details = null) {
|
|
@@ -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-
|
|
6
|
+
} from "./chunk-LMQ4MPQI.js";
|
|
7
7
|
import {
|
|
8
8
|
ApprovalSchema,
|
|
9
9
|
ContextUsageSnapshotSchema,
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
DEFAULT_OPENPOND_CHAT_MODEL,
|
|
13
13
|
DEFAULT_OPENPOND_COMMAND_ACCESS_MODE,
|
|
14
14
|
OpenPondCommandAccessModeSchema
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PVGJXCAK.js";
|
|
16
16
|
import {
|
|
17
17
|
CONNECTED_APP_CATALOG,
|
|
18
18
|
buildConnectedAppInstallUrl,
|
|
19
19
|
connectedAppById
|
|
20
20
|
} from "./chunk-VG4H4TQG.js";
|
|
21
21
|
import "./chunk-WYDVQOBL.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-DXSHQ6TO.js";
|
|
23
23
|
import "./chunk-UACZUFIA.js";
|
|
24
24
|
|
|
25
25
|
// ../terminal/src/index.ts
|
|
@@ -2728,6 +2728,15 @@ async function runOneShotChat(options, io = {}) {
|
|
|
2728
2728
|
actionId: action.id
|
|
2729
2729
|
}
|
|
2730
2730
|
}));
|
|
2731
|
+
const localProjectId = readySession?.localProjectId ?? sessionState.session?.localProjectId ?? null;
|
|
2732
|
+
const projectActionCatalog = localProjectId ? await deadline.run(
|
|
2733
|
+
"Project Action catalog",
|
|
2734
|
+
loadLocalProjectActionCatalog(
|
|
2735
|
+
{ ...connection, signal: deadline.signal },
|
|
2736
|
+
localProjectId
|
|
2737
|
+
)
|
|
2738
|
+
) : [];
|
|
2739
|
+
const openPondActionCatalog = [...profileActionCatalog, ...projectActionCatalog];
|
|
2731
2740
|
await deadline.run("turn submission", apiFetch(connection.server, connection.token, `/v1/sessions/${activeSessionId}/turns`, {
|
|
2732
2741
|
method: "POST",
|
|
2733
2742
|
body: JSON.stringify({
|
|
@@ -2735,7 +2744,7 @@ async function runOneShotChat(options, io = {}) {
|
|
|
2735
2744
|
...options.cwdExplicit || !options.project && !options.resume ? { cwd: options.cwd } : {},
|
|
2736
2745
|
model: modelId,
|
|
2737
2746
|
modelRef: activeModelRef(options, payload.providers),
|
|
2738
|
-
...
|
|
2747
|
+
...openPondActionCatalog.length > 0 ? { openPondActionCatalog } : {},
|
|
2739
2748
|
approvalPolicy: options.yes ? "never" : options.approvalPolicy,
|
|
2740
2749
|
sandbox: options.sandbox,
|
|
2741
2750
|
metadata: {
|
|
@@ -2807,6 +2816,15 @@ async function runOneShotChat(options, io = {}) {
|
|
|
2807
2816
|
if (timedOut && !options.json) output2.write("\n[turn timeout]\n");
|
|
2808
2817
|
}
|
|
2809
2818
|
}
|
|
2819
|
+
async function loadLocalProjectActionCatalog(connection, projectId) {
|
|
2820
|
+
const result = await apiFetch(
|
|
2821
|
+
connection.server,
|
|
2822
|
+
connection.token,
|
|
2823
|
+
`/v1/projects/${encodeURIComponent(projectId)}/actions`,
|
|
2824
|
+
{ signal: connection.signal }
|
|
2825
|
+
);
|
|
2826
|
+
return result.actions;
|
|
2827
|
+
}
|
|
2810
2828
|
function profileActionMatchesAgent(action, agentId) {
|
|
2811
2829
|
if (!agentId) return true;
|
|
2812
2830
|
return action.agentId === agentId || action.id === agentId || action.id.startsWith(`${agentId}.`);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolveSandboxClient
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-42GGG3W4.js";
|
|
4
|
+
} from "./chunk-FHP7OMEI.js";
|
|
5
|
+
import "./chunk-7QLVLGDM.js";
|
|
7
6
|
import "./chunk-SMNFI2FU.js";
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-RC3N77IV.js";
|
|
8
|
+
import "./chunk-SKUS4NPW.js";
|
|
9
|
+
import "./chunk-DXSHQ6TO.js";
|
|
9
10
|
import "./chunk-DBHSOTYZ.js";
|
|
10
11
|
import "./chunk-KSRWKXRB.js";
|
|
11
12
|
import {
|
|
@@ -45,8 +45,8 @@ import {
|
|
|
45
45
|
truncatePatch,
|
|
46
46
|
uniqueSortedPaths,
|
|
47
47
|
workspaceImageContentType
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-QNYFZ4I5.js";
|
|
49
|
+
import "./chunk-3PKCT4JC.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-
|
|
5
|
+
} from "./chunks/chunk-7QLVLGDM.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-
|
|
13
|
+
} from "./chunks/chunk-RC3N77IV.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-
|
|
40
|
+
await (await import("./chunks/core-commands-H2UC3LHG.js")).runCheckUpdate();
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
if (action === "help") {
|
|
44
|
-
(await import("./chunks/help-
|
|
44
|
+
(await import("./chunks/help-NEYFMHWQ.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-
|
|
56
|
+
await (await import("./chunks/app-layer-RNQXXM6L.js")).runOpenPondTerminalCommand(options, rest);
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
if (action === "ui") {
|
|
60
|
-
await (await import("./chunks/app-layer-
|
|
60
|
+
await (await import("./chunks/app-layer-RNQXXM6L.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-
|
|
66
|
+
(await import("./chunks/help-NEYFMHWQ.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-
|
|
74
|
-
import("./chunks/cli-
|
|
73
|
+
import("./chunks/app-server-runtime-YCKU23ON.js"),
|
|
74
|
+
import("./chunks/cli-V4VB2VBY.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-
|
|
83
|
-
import("./chunks/cli-
|
|
82
|
+
import("./chunks/src-2AX2MUD4.js"),
|
|
83
|
+
import("./chunks/cli-V4VB2VBY.js")
|
|
84
84
|
]);
|
|
85
|
-
const { createOpenPondAppServer } = await import("./chunks/app-server-runtime-
|
|
85
|
+
const { createOpenPondAppServer } = await import("./chunks/app-server-runtime-YCKU23ON.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-
|
|
90
|
+
await (await import("./chunks/src-KLQEJ6RO.js")).runOpenPondTerminalCli(argv.slice(1));
|
|
91
91
|
return true;
|
|
92
92
|
}
|
|
93
93
|
return false;
|
|
@@ -97,15 +97,21 @@ Options:
|
|
|
97
97
|
|
|
98
98
|
```text
|
|
99
99
|
Usage:
|
|
100
|
-
openpond actions <check|build|run|dev> [action-id] [--cwd DIR] [--input JSON|--input-file PATH]
|
|
100
|
+
openpond actions <check|build|run|dev|publish> [action-id] [--cwd DIR] [--input JSON|--input-file PATH]
|
|
101
101
|
|
|
102
102
|
Options:
|
|
103
|
+
--api-key <string>
|
|
104
|
+
--base-url <string>
|
|
103
105
|
--cwd <string>
|
|
104
106
|
--input <string>
|
|
105
107
|
--input-file <string>
|
|
106
108
|
--json
|
|
107
109
|
--output-directory <string>
|
|
110
|
+
--project-id <string>
|
|
111
|
+
--source-commit-sha <string>
|
|
108
112
|
--source-directory <string>
|
|
113
|
+
--source-ref <string>
|
|
114
|
+
--team-id <string>
|
|
109
115
|
--timeout-ms <integer>
|
|
110
116
|
```
|
|
111
117
|
## inspect
|