openpond 0.0.30-bootstrap.0 → 0.0.30
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/README.md +19 -5
- package/dist/chunks/{app-layer-YKXEQGOW.js → app-layer-FIGCNZJX.js} +7 -4
- package/dist/chunks/{apps-GGSIN2ZF.js → apps-4RMNCKXS.js} +3 -3
- package/dist/chunks/{chunk-I6HN3ZGW.js → chunk-4S3XGFGL.js} +1 -1
- package/dist/chunks/{chunk-KRKGHVMQ.js → chunk-57P2GCW5.js} +1 -1
- package/dist/chunks/{chunk-4HYJG2JE.js → chunk-BBEVMP6O.js} +2 -2
- package/dist/chunks/{chunk-XSAXENQD.js → chunk-BNPFMGZD.js} +2 -2
- package/dist/chunks/{chunk-3CC6MH35.js → chunk-BNVHGSI7.js} +3 -3
- package/dist/chunks/{chunk-Q57SVPEH.js → chunk-BX4XSB2J.js} +5619 -6654
- package/dist/chunks/{chunk-Y6G6WRTG.js → chunk-DANRS43D.js} +57 -12
- package/dist/chunks/{chunk-FUP7EGT7.js → chunk-GGKA4HLQ.js} +2 -2
- package/dist/chunks/chunk-IUTUUNAX.js +1126 -0
- package/dist/chunks/{chunk-74O6FGVN.js → chunk-KEDXE4BA.js} +3 -3
- package/dist/chunks/{chunk-3Y4EL3P6.js → chunk-KMSMK7PI.js} +36 -35
- package/dist/chunks/{chunk-5G4E547X.js → chunk-MFS3SYUH.js} +1 -1
- package/dist/chunks/{chunk-NLBKZZEK.js → chunk-OV3KAFWB.js} +1 -1
- package/dist/chunks/{chunk-AUJLPKGI.js → chunk-RJXX6TJA.js} +2 -2
- package/dist/chunks/{cli-NVKNE4AZ.js → cli-2L4NB7HD.js} +5 -2
- package/dist/chunks/{cli-X3HPLSOV.js → cli-5RL7B2Z3.js} +5 -5
- package/dist/chunks/{core-commands-IM2UKLU4.js → core-commands-AZJZGTZS.js} +4 -4
- package/dist/chunks/{extend-YXCBULPO.js → extend-6IWYZI37.js} +8 -8
- package/dist/chunks/{harness-GMK6IY2U.js → harness-SSNXDSKM.js} +3 -3
- package/dist/chunks/{help-LMH5FGT2.js → help-MUJJMI3Q.js} +2 -1
- package/dist/chunks/{opchat-BWXZ32GX.js → opchat-RW4CFAQB.js} +5 -5
- package/dist/chunks/{organizations-4ISQRGMQ.js → organizations-V7DTNLSI.js} +73 -15
- package/dist/chunks/{profile-NLDZDT3L.js → profile-WDBKJ7YW.js} +6 -6
- package/dist/chunks/{project-agent-ZPVO25HA.js → project-agent-3TZ3BPYN.js} +5 -5
- package/dist/chunks/{sandbox-command-5GFJ2U3V.js → sandbox-command-HOYHF4NC.js} +4 -4
- package/dist/chunks/{sandbox-template-LZN4F55Z.js → sandbox-template-IYGB4CZU.js} +5 -5
- package/dist/chunks/{src-3RBI4DNN.js → src-CBPRIWG5.js} +7 -15
- package/dist/chunks/{src-EYXQS6XD.js → src-ZRQKSQTD.js} +14 -12
- package/dist/chunks/{teams-bot-WP3FHKGA.js → teams-bot-UWGCFL6C.js} +3 -3
- package/dist/cli.js +28 -17
- package/docs/command-reference.md +2 -1
- package/package.json +3 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
-
getBundledRuntimeVersion
|
|
4
|
-
|
|
3
|
+
getBundledRuntimeVersion,
|
|
4
|
+
openUrlWithSystemBrowser
|
|
5
|
+
} from "./chunk-IUTUUNAX.js";
|
|
5
6
|
|
|
6
7
|
// ../server/src/cli.ts
|
|
7
8
|
import { existsSync } from "node:fs";
|
|
@@ -11,7 +12,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
|
11
12
|
// ../server/src/constants.ts
|
|
12
13
|
var DEFAULT_HOST = "127.0.0.1";
|
|
13
14
|
var DEFAULT_PORT = 17874;
|
|
14
|
-
var VERSION = "0.0.30
|
|
15
|
+
var VERSION = "0.0.30";
|
|
15
16
|
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.";
|
|
16
17
|
var APP_PREFERENCES_CACHE_TYPE = "app_preferences";
|
|
17
18
|
var APP_PREFERENCES_CACHE_KEY = "global";
|
|
@@ -79,18 +80,23 @@ function parseCliArgs(args) {
|
|
|
79
80
|
let host = DEFAULT_HOST;
|
|
80
81
|
let port = DEFAULT_PORT;
|
|
81
82
|
let webRoot = null;
|
|
83
|
+
let openBrowser = false;
|
|
84
|
+
let printAccessUrl = false;
|
|
82
85
|
let index = 0;
|
|
83
86
|
const command = args[0];
|
|
84
87
|
if (command && !command.startsWith("-")) {
|
|
85
88
|
if (command === "serve" || command === "server") mode = "serve";
|
|
86
89
|
else if (command === "web") mode = "web";
|
|
87
|
-
else if (command === "help")
|
|
88
|
-
|
|
90
|
+
else if (command === "help") {
|
|
91
|
+
return { mode, host, port, webRoot, openBrowser, printAccessUrl, help: true };
|
|
92
|
+
} else throw new Error(`Unknown command: ${command}`);
|
|
89
93
|
index = 1;
|
|
90
94
|
}
|
|
91
95
|
for (let i = index; i < args.length; i += 1) {
|
|
92
96
|
const arg = args[i];
|
|
93
|
-
if (arg === "--help" || arg === "-h")
|
|
97
|
+
if (arg === "--help" || arg === "-h") {
|
|
98
|
+
return { mode, host, port, webRoot, openBrowser, printAccessUrl, help: true };
|
|
99
|
+
}
|
|
94
100
|
if (arg === "--listen") {
|
|
95
101
|
const listen = parseListen(requireValue(args, i, arg));
|
|
96
102
|
host = listen.host;
|
|
@@ -105,11 +111,21 @@ function parseCliArgs(args) {
|
|
|
105
111
|
} else if (arg === "--web-root") {
|
|
106
112
|
webRoot = path2.resolve(requireValue(args, i, arg));
|
|
107
113
|
i += 1;
|
|
114
|
+
} else if (arg === "--open-browser") {
|
|
115
|
+
openBrowser = true;
|
|
116
|
+
} else if (arg === "--print-access-url") {
|
|
117
|
+
printAccessUrl = true;
|
|
108
118
|
} else {
|
|
109
119
|
throw new Error(`Unknown option: ${arg}`);
|
|
110
120
|
}
|
|
111
121
|
}
|
|
112
|
-
|
|
122
|
+
if (openBrowser && printAccessUrl) {
|
|
123
|
+
throw new Error("--open-browser and --print-access-url cannot be used together.");
|
|
124
|
+
}
|
|
125
|
+
if (mode !== "web" && (openBrowser || printAccessUrl)) {
|
|
126
|
+
throw new Error("Browser options are only available in web mode.");
|
|
127
|
+
}
|
|
128
|
+
return { mode, host, port, webRoot, openBrowser, printAccessUrl, help: false };
|
|
113
129
|
}
|
|
114
130
|
function defaultWebRootCandidates() {
|
|
115
131
|
return [
|
|
@@ -143,6 +159,23 @@ function tokenizedWebUrl(baseUrl, token) {
|
|
|
143
159
|
url.hash = params.toString();
|
|
144
160
|
return url.toString();
|
|
145
161
|
}
|
|
162
|
+
async function resolveWebLaunchMessages(input, handOffToBrowser = openUrlWithSystemBrowser) {
|
|
163
|
+
const accessUrl = tokenizedWebUrl(input.baseUrl, input.token);
|
|
164
|
+
if (input.printAccessUrl) {
|
|
165
|
+
return { stdout: [`OpenPond access URL: ${accessUrl}`], stderr: [] };
|
|
166
|
+
}
|
|
167
|
+
if (!input.openBrowser) {
|
|
168
|
+
return { stdout: [`OpenPond web UI: ${input.baseUrl}`], stderr: [] };
|
|
169
|
+
}
|
|
170
|
+
const handoff = await handOffToBrowser(accessUrl);
|
|
171
|
+
if (handoff.opened) {
|
|
172
|
+
return { stdout: [`Opened OpenPond in your browser: ${input.baseUrl}`], stderr: [] };
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
stdout: [`OpenPond access URL: ${accessUrl}`],
|
|
176
|
+
stderr: [`Could not open the system browser: ${handoff.error}`]
|
|
177
|
+
};
|
|
178
|
+
}
|
|
146
179
|
function printHelp() {
|
|
147
180
|
console.log(`Usage:
|
|
148
181
|
openpond-app-server serve [--hostname HOST] [--port PORT]
|
|
@@ -153,6 +186,8 @@ Options:
|
|
|
153
186
|
--hostname HOST Bind host (default ${DEFAULT_HOST})
|
|
154
187
|
--port PORT Bind port, or 0 for any free port (default ${DEFAULT_PORT})
|
|
155
188
|
--web-root DIR Directory containing the built web UI for web mode
|
|
189
|
+
--open-browser Open the authenticated web URL in the system browser
|
|
190
|
+
--print-access-url Print the authenticated URL instead of opening it
|
|
156
191
|
`);
|
|
157
192
|
}
|
|
158
193
|
async function runOpenPondServerCli(createOpenPondServer) {
|
|
@@ -166,25 +201,34 @@ async function runOpenPondServerCli(createOpenPondServer) {
|
|
|
166
201
|
throw new Error("Could not find a built OpenPond web UI. Run `pnpm build:web` or pass --web-root.");
|
|
167
202
|
}
|
|
168
203
|
const instance = await createOpenPondServer({ host: args.host, port: args.port, webRoot });
|
|
169
|
-
const
|
|
204
|
+
const webBaseUrl = args.mode === "web" ? browserBaseUrl(instance) : null;
|
|
170
205
|
console.log(
|
|
171
206
|
`OPENPOND_APP_SERVER_READY ${JSON.stringify({
|
|
172
207
|
mode: args.mode,
|
|
173
208
|
url: instance.url,
|
|
174
|
-
webUrl,
|
|
209
|
+
webUrl: null,
|
|
175
210
|
webRoot,
|
|
176
211
|
tokenFile: instance.tokenFile,
|
|
177
212
|
storePath: instance.storePath,
|
|
178
213
|
runtime: getBundledRuntimeVersion()
|
|
179
214
|
})}`
|
|
180
215
|
);
|
|
181
|
-
if (
|
|
182
|
-
|
|
183
|
-
|
|
216
|
+
if (webBaseUrl) {
|
|
217
|
+
const messages = await resolveWebLaunchMessages({
|
|
218
|
+
baseUrl: webBaseUrl,
|
|
219
|
+
openBrowser: args.openBrowser,
|
|
220
|
+
printAccessUrl: args.printAccessUrl,
|
|
221
|
+
token: instance.token
|
|
222
|
+
});
|
|
223
|
+
for (const message of messages.stderr) console.error(message);
|
|
224
|
+
for (const message of messages.stdout) console.log(message);
|
|
184
225
|
} else {
|
|
185
226
|
console.log(`OpenPond API server: ${instance.url}`);
|
|
186
227
|
}
|
|
228
|
+
let shuttingDown = false;
|
|
187
229
|
const shutdown = async () => {
|
|
230
|
+
if (shuttingDown) return;
|
|
231
|
+
shuttingDown = true;
|
|
188
232
|
await instance.close();
|
|
189
233
|
process.exit(0);
|
|
190
234
|
};
|
|
@@ -206,5 +250,6 @@ export {
|
|
|
206
250
|
extractDelta,
|
|
207
251
|
event,
|
|
208
252
|
isCliEntrypoint,
|
|
253
|
+
resolveWebLaunchMessages,
|
|
209
254
|
runOpenPondServerCli
|
|
210
255
|
};
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
materializeSourceUploadFile,
|
|
5
5
|
readSourceUploadCache,
|
|
6
6
|
writeSourceUploadCache
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4S3XGFGL.js";
|
|
8
8
|
import {
|
|
9
9
|
yaml
|
|
10
10
|
} from "./chunk-WYDVQOBL.js";
|
|
11
11
|
import {
|
|
12
12
|
loadGlobalConfig,
|
|
13
13
|
saveGlobalConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BNPFMGZD.js";
|
|
15
15
|
|
|
16
16
|
// ../../packages/cloud/src/profile/profile-setup-gate.ts
|
|
17
17
|
var OpenPondProfileSetupRequiredError = class extends Error {
|