openpond 0.0.30-bootstrap.0 → 0.0.31
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-53U5JVE7.js} +24 -4
- package/dist/chunks/{apps-GGSIN2ZF.js → apps-MJ47WJNC.js} +3 -3
- package/dist/chunks/{chunk-5G4E547X.js → chunk-4GLUNJLZ.js} +1 -1
- package/dist/chunks/{chunk-AUJLPKGI.js → chunk-5X47XJC4.js} +2 -2
- package/dist/chunks/{chunk-3Y4EL3P6.js → chunk-7HZBKUUB.js} +36 -35
- package/dist/chunks/{chunk-Y6G6WRTG.js → chunk-7KYOO25A.js} +57 -12
- package/dist/chunks/{chunk-Q57SVPEH.js → chunk-BX4XSB2J.js} +5619 -6654
- package/dist/chunks/{chunk-KRKGHVMQ.js → chunk-DZUJ6XJC.js} +1 -1
- package/dist/chunks/{chunk-NLBKZZEK.js → chunk-ETBF62DB.js} +1 -1
- package/dist/chunks/chunk-IUTUUNAX.js +1126 -0
- package/dist/chunks/{chunk-74O6FGVN.js → chunk-JWL5HCO5.js} +3 -3
- package/dist/chunks/{chunk-XSAXENQD.js → chunk-NC2GQQOT.js} +2 -2
- package/dist/chunks/{chunk-FUP7EGT7.js → chunk-TQRWG54R.js} +2 -2
- package/dist/chunks/{chunk-I6HN3ZGW.js → chunk-WQ2GF7XT.js} +1 -1
- package/dist/chunks/{chunk-4HYJG2JE.js → chunk-XMW3PSI5.js} +2 -2
- package/dist/chunks/{chunk-3CC6MH35.js → chunk-ZIKHE5AY.js} +3 -3
- package/dist/chunks/{cli-NVKNE4AZ.js → cli-EP473A53.js} +5 -2
- package/dist/chunks/{cli-X3HPLSOV.js → cli-H7PQLPKG.js} +5 -5
- package/dist/chunks/{core-commands-IM2UKLU4.js → core-commands-KI53GSJF.js} +4 -4
- package/dist/chunks/{extend-YXCBULPO.js → extend-F4R3AI2G.js} +8 -8
- package/dist/chunks/{harness-GMK6IY2U.js → harness-WADDUNGU.js} +3 -3
- package/dist/chunks/{help-LMH5FGT2.js → help-TIEOIVOA.js} +2 -1
- package/dist/chunks/{opchat-BWXZ32GX.js → opchat-VYKKXDBO.js} +5 -5
- package/dist/chunks/{organizations-4ISQRGMQ.js → organizations-LAACUOYE.js} +73 -15
- package/dist/chunks/{profile-NLDZDT3L.js → profile-A75O7EZ4.js} +6 -6
- package/dist/chunks/{project-agent-ZPVO25HA.js → project-agent-JOZ6NRTW.js} +5 -5
- package/dist/chunks/{sandbox-command-5GFJ2U3V.js → sandbox-command-Q72CAVQ7.js} +4 -4
- package/dist/chunks/{sandbox-template-LZN4F55Z.js → sandbox-template-KWCE3OJV.js} +5 -5
- package/dist/chunks/{src-3RBI4DNN.js → src-CBPRIWG5.js} +7 -15
- package/dist/chunks/{src-EYXQS6XD.js → src-J4262EAE.js} +122 -17
- package/dist/chunks/{teams-bot-WP3FHKGA.js → teams-bot-KNY5OEXB.js} +3 -3
- package/dist/cli.js +28 -17
- package/docs/command-reference.md +2 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -4,13 +4,27 @@ OpenPond CLI
|
|
|
4
4
|
|
|
5
5
|
The generated [command reference](./docs/command-reference.md) is the authoritative command and option inventory.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Launch the complete local web app without installing it globally:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
npx openpond@latest
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The command starts a local OpenPond server, passes its authenticated URL directly to your system browser, and stays attached until you press `Ctrl+C`. Application state persists under `~/.openpond/openpond-app`; the directory where you invoke the command is not modified. npm maintains its own package cache separately.
|
|
14
|
+
|
|
15
|
+
Node.js 24.18 or newer in the Node 24 release line is required. Other installation and launch forms remain available:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install --global openpond
|
|
19
|
+
openpond
|
|
20
|
+
|
|
21
|
+
# Print the authenticated local URL instead of opening a browser.
|
|
22
|
+
openpond ui --no-open
|
|
23
|
+
|
|
24
|
+
# Launch the terminal UI explicitly.
|
|
25
|
+
openpond tui
|
|
26
|
+
|
|
27
|
+
# GitHub release installer for a compiled CLI.
|
|
14
28
|
curl -fsSL https://openpond.ai/install.sh | bash
|
|
15
29
|
```
|
|
16
30
|
|
|
@@ -1,11 +1,11 @@
|
|
|
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-NC2GQQOT.js";
|
|
5
5
|
import {
|
|
6
6
|
CliUsageError
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-4GLUNJLZ.js";
|
|
8
|
+
import "./chunk-7HZBKUUB.js";
|
|
9
9
|
import "./chunk-UACZUFIA.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/app-layer.ts
|
|
@@ -17,6 +17,21 @@ import { fileURLToPath } from "node:url";
|
|
|
17
17
|
// src/cli/build-mode.ts
|
|
18
18
|
var IS_COMPILED_CLI = false;
|
|
19
19
|
|
|
20
|
+
// src/cli/node-runtime.ts
|
|
21
|
+
var OPENPOND_NODE_MAJOR = 24;
|
|
22
|
+
var OPENPOND_NODE_MIN_MINOR = 18;
|
|
23
|
+
var OPENPOND_NODE_MIN_VERSION = `${OPENPOND_NODE_MAJOR}.${OPENPOND_NODE_MIN_MINOR}.0`;
|
|
24
|
+
function openPondTuiNodeRuntimeMessage(version = process.versions.node) {
|
|
25
|
+
const match = /^(\d+)\.(\d+)\.(\d+)/.exec(version);
|
|
26
|
+
const major = match ? Number(match[1]) : Number.NaN;
|
|
27
|
+
const minor = match ? Number(match[2]) : Number.NaN;
|
|
28
|
+
if (major === OPENPOND_NODE_MAJOR && minor >= OPENPOND_NODE_MIN_MINOR) return null;
|
|
29
|
+
return [
|
|
30
|
+
`OpenPond TUI requires Node.js ${OPENPOND_NODE_MIN_VERSION} or newer in the Node ${OPENPOND_NODE_MAJOR} release line; detected Node.js ${version}.`,
|
|
31
|
+
`Switch Node versions and retry (with nvm: \`nvm install ${OPENPOND_NODE_MIN_VERSION} && nvm use ${OPENPOND_NODE_MIN_VERSION}\`).`
|
|
32
|
+
].join("\n");
|
|
33
|
+
}
|
|
34
|
+
|
|
20
35
|
// src/cli/app-layer.ts
|
|
21
36
|
var __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
22
37
|
var OpenPondChildProcessExitError = class extends Error {
|
|
@@ -30,12 +45,17 @@ var OpenPondChildProcessExitError = class extends Error {
|
|
|
30
45
|
async function runOpenPondServerCommand(mode, options, rest) {
|
|
31
46
|
const server = resolveAppEntrypoint("server");
|
|
32
47
|
const args = [...server.args, mode, ...forwardedOptions(options), ...rest];
|
|
48
|
+
if (mode === "web") {
|
|
49
|
+
args.push(options.noOpen === true || options.noOpen === "true" ? "--print-access-url" : "--open-browser");
|
|
50
|
+
}
|
|
33
51
|
const webRoot = mode === "web" && typeof options.webRoot !== "string" ? packagedWebRoot() : null;
|
|
34
52
|
if (webRoot) args.push("--web-root", webRoot);
|
|
35
53
|
await runChild(server.runner, args, server.cwd);
|
|
36
54
|
}
|
|
37
55
|
async function runOpenPondTerminalCommand(options, rest) {
|
|
38
56
|
validateTerminalForwardingOptions(options);
|
|
57
|
+
const runtimeMessage = openPondTuiNodeRuntimeMessage();
|
|
58
|
+
if (runtimeMessage) throw new CliUsageError(runtimeMessage);
|
|
39
59
|
const terminal = resolveAppEntrypoint("terminal");
|
|
40
60
|
const server = resolveAppEntrypoint("server");
|
|
41
61
|
const args = [...terminal.args, "chat", ...forwardedOptions(normalizeTerminalPaths(options)), ...rest];
|
|
@@ -107,7 +127,7 @@ function isCompiledExecutable() {
|
|
|
107
127
|
return Boolean(argvEntry && path.resolve(argvEntry) === path.resolve(process.execPath));
|
|
108
128
|
}
|
|
109
129
|
function forwardedOptions(options) {
|
|
110
|
-
const ignored = /* @__PURE__ */ new Set(["account", "handle", "baseUrl", "tui"]);
|
|
130
|
+
const ignored = /* @__PURE__ */ new Set(["account", "handle", "baseUrl", "noOpen", "tui"]);
|
|
111
131
|
const args = [];
|
|
112
132
|
for (const [key, value] of Object.entries(options)) {
|
|
113
133
|
if (ignored.has(key)) continue;
|
|
@@ -23,17 +23,17 @@ import {
|
|
|
23
23
|
submitPositionsTx,
|
|
24
24
|
updateAppCodeVisibility,
|
|
25
25
|
updateAppEnvironment
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-NC2GQQOT.js";
|
|
27
27
|
import {
|
|
28
28
|
resolveBaseUrl,
|
|
29
29
|
resolvePublicApiBaseUrl
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-4GLUNJLZ.js";
|
|
31
31
|
import {
|
|
32
32
|
parseBooleanOption,
|
|
33
33
|
parseJsonOption,
|
|
34
34
|
parseTimeOption,
|
|
35
35
|
resolveTemplateEnvironment
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-7HZBKUUB.js";
|
|
37
37
|
import "./chunk-UACZUFIA.js";
|
|
38
38
|
|
|
39
39
|
// src/cli/apps.ts
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
parseSandboxRuntimeProfileIdOption,
|
|
5
5
|
parseSandboxRuntimePromotionPolicyOption,
|
|
6
6
|
parseSandboxWorkflowModeOption
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NC2GQQOT.js";
|
|
8
8
|
import {
|
|
9
9
|
parseBooleanOption,
|
|
10
10
|
parseCsvOption,
|
|
11
11
|
parseIntegerOption,
|
|
12
12
|
parseJsonOption,
|
|
13
13
|
parseNumberOption
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7HZBKUUB.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/sandbox-helpers.ts
|
|
17
17
|
import { Buffer } from "node:buffer";
|
|
@@ -468,7 +468,7 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
468
468
|
name: "help",
|
|
469
469
|
usage: "openpond help",
|
|
470
470
|
optionSchema: {},
|
|
471
|
-
handler: async () => (await import("./help-
|
|
471
|
+
handler: async () => (await import("./help-TIEOIVOA.js")).printHelp()
|
|
472
472
|
},
|
|
473
473
|
{
|
|
474
474
|
name: "version",
|
|
@@ -480,19 +480,19 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
480
480
|
name: "check-update",
|
|
481
481
|
usage: "openpond check-update",
|
|
482
482
|
optionSchema: {},
|
|
483
|
-
handler: async () => (await import("./core-commands-
|
|
483
|
+
handler: async () => (await import("./core-commands-KI53GSJF.js")).runCheckUpdate()
|
|
484
484
|
},
|
|
485
485
|
{
|
|
486
486
|
name: "login",
|
|
487
487
|
usage: "openpond login [--base-url <url>]",
|
|
488
488
|
optionSchema: CLI_GLOBAL_OPTION_SCHEMA,
|
|
489
|
-
handler: async ({ options }) => (await import("./core-commands-
|
|
489
|
+
handler: async ({ options }) => (await import("./core-commands-KI53GSJF.js")).runLogin(options)
|
|
490
490
|
},
|
|
491
491
|
{
|
|
492
492
|
name: "init",
|
|
493
493
|
usage: "openpond init [--path <dir>]",
|
|
494
494
|
optionSchema: { path: "string" },
|
|
495
|
-
handler: async ({ options }) => (await import("./profile-
|
|
495
|
+
handler: async ({ options }) => (await import("./profile-A75O7EZ4.js")).runOpenPondInitCommand(options)
|
|
496
496
|
},
|
|
497
497
|
{
|
|
498
498
|
name: "profile",
|
|
@@ -521,44 +521,44 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
521
521
|
teamId: "string",
|
|
522
522
|
workItemId: "string"
|
|
523
523
|
},
|
|
524
|
-
handler: async ({ options, rest }) => (await import("./profile-
|
|
524
|
+
handler: async ({ options, rest }) => (await import("./profile-A75O7EZ4.js")).runOpenPondProfileCommand(options, rest)
|
|
525
525
|
},
|
|
526
526
|
{
|
|
527
527
|
name: "agents",
|
|
528
528
|
usage: "openpond agents [--json]",
|
|
529
529
|
optionSchema: { json: "boolean" },
|
|
530
|
-
handler: async ({ options, rest }) => (await import("./profile-
|
|
530
|
+
handler: async ({ options, rest }) => (await import("./profile-A75O7EZ4.js")).runOpenPondAgentsCommand(options, rest)
|
|
531
531
|
},
|
|
532
532
|
...profileSdkAliasDefinitions(),
|
|
533
533
|
{
|
|
534
534
|
name: "extend",
|
|
535
535
|
usage: "openpond extend <instructions>",
|
|
536
536
|
optionSchema: { cwd: "string" },
|
|
537
|
-
handler: async ({ options, rest }) => (await import("./extend-
|
|
537
|
+
handler: async ({ options, rest }) => (await import("./extend-F4R3AI2G.js")).runOpenPondExtendCommand(options, rest)
|
|
538
538
|
},
|
|
539
539
|
{
|
|
540
540
|
name: "edit",
|
|
541
541
|
usage: "openpond edit <instructions>",
|
|
542
542
|
optionSchema: { cwd: "string" },
|
|
543
|
-
handler: async ({ options, rest }) => (await import("./extend-
|
|
543
|
+
handler: async ({ options, rest }) => (await import("./extend-F4R3AI2G.js")).runOpenPondEditCommand(options, rest)
|
|
544
544
|
},
|
|
545
545
|
{
|
|
546
546
|
name: "profiles",
|
|
547
547
|
usage: "openpond profiles [args]",
|
|
548
548
|
optionSchema: { json: "boolean" },
|
|
549
|
-
handler: async ({ options, rest }) => (await import("./core-commands-
|
|
549
|
+
handler: async ({ options, rest }) => (await import("./core-commands-KI53GSJF.js")).runProfiles(options, rest)
|
|
550
550
|
},
|
|
551
551
|
{
|
|
552
552
|
name: "account",
|
|
553
553
|
usage: "openpond account",
|
|
554
554
|
optionSchema: { json: "boolean" },
|
|
555
|
-
handler: async () => (await import("./core-commands-
|
|
555
|
+
handler: async () => (await import("./core-commands-KI53GSJF.js")).runAccount()
|
|
556
556
|
},
|
|
557
557
|
{
|
|
558
558
|
name: "health",
|
|
559
559
|
usage: "openpond health",
|
|
560
560
|
optionSchema: { json: "boolean" },
|
|
561
|
-
handler: async ({ options }) => (await import("./core-commands-
|
|
561
|
+
handler: async ({ options }) => (await import("./core-commands-KI53GSJF.js")).runHealth(options)
|
|
562
562
|
},
|
|
563
563
|
{
|
|
564
564
|
name: "serve",
|
|
@@ -569,19 +569,20 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
569
569
|
listen: "string",
|
|
570
570
|
port: "integer"
|
|
571
571
|
},
|
|
572
|
-
handler: async ({ options, rest }) => (await import("./app-layer-
|
|
572
|
+
handler: async ({ options, rest }) => (await import("./app-layer-53U5JVE7.js")).runOpenPondServerCommand("serve", options, rest)
|
|
573
573
|
},
|
|
574
574
|
{
|
|
575
575
|
name: "ui",
|
|
576
|
-
usage: "openpond ui [
|
|
576
|
+
usage: "openpond ui [--no-open] [--hostname HOST] [--port PORT]",
|
|
577
577
|
optionSchema: {
|
|
578
578
|
host: "string",
|
|
579
579
|
hostname: "string",
|
|
580
580
|
listen: "string",
|
|
581
|
+
noOpen: "boolean",
|
|
581
582
|
port: "integer",
|
|
582
583
|
webRoot: "string"
|
|
583
584
|
},
|
|
584
|
-
handler: async ({ options, rest }) => (await import("./app-layer-
|
|
585
|
+
handler: async ({ options, rest }) => (await import("./app-layer-53U5JVE7.js")).runOpenPondServerCommand("web", options, rest)
|
|
585
586
|
},
|
|
586
587
|
{
|
|
587
588
|
name: "tui",
|
|
@@ -595,13 +596,13 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
595
596
|
provider: "string",
|
|
596
597
|
server: "string"
|
|
597
598
|
},
|
|
598
|
-
handler: async ({ options, rest }) => (await import("./app-layer-
|
|
599
|
+
handler: async ({ options, rest }) => (await import("./app-layer-53U5JVE7.js")).runOpenPondTerminalCommand(options, rest)
|
|
599
600
|
},
|
|
600
601
|
{
|
|
601
602
|
name: "chat",
|
|
602
603
|
usage: "openpond chat (--message-file <path>|--message <text>|--stdin) --non-interactive [--provider <id>] [--model <id>] [--project <id>] [--yes] [--approval-policy <policy>] [--json] [--timeout-sec <n>] [--max-output-bytes <n>] [--sandbox <mode>]",
|
|
603
604
|
optionSchema: CHAT_OPTION_SCHEMA,
|
|
604
|
-
handler: async ({ options, rest }) => (await import("./app-layer-
|
|
605
|
+
handler: async ({ options, rest }) => (await import("./app-layer-53U5JVE7.js")).runOpenPondTerminalCommand(options, rest)
|
|
605
606
|
},
|
|
606
607
|
{
|
|
607
608
|
name: "tool",
|
|
@@ -637,7 +638,7 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
637
638
|
name: "sandbox-template",
|
|
638
639
|
usage: "openpond sandbox-template <command> [args]",
|
|
639
640
|
optionSchema: SANDBOX_TEMPLATE_OPTION_SCHEMA,
|
|
640
|
-
handler: async ({ options, rest }) => (await import("./sandbox-template-
|
|
641
|
+
handler: async ({ options, rest }) => (await import("./sandbox-template-KWCE3OJV.js")).runSandboxTemplateCommand(options, rest)
|
|
641
642
|
},
|
|
642
643
|
{
|
|
643
644
|
name: "repo",
|
|
@@ -659,13 +660,13 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
659
660
|
open: "boolean",
|
|
660
661
|
timeoutSeconds: "integer"
|
|
661
662
|
},
|
|
662
|
-
handler: async ({ options, rest }) => (await import("./organizations-
|
|
663
|
+
handler: async ({ options, rest }) => (await import("./organizations-LAACUOYE.js")).runOrganizationsCommand(options, rest)
|
|
663
664
|
},
|
|
664
665
|
{
|
|
665
666
|
name: "project",
|
|
666
667
|
usage: "openpond project <list|create|upsert|get|update|sync|source-upload|archive> [args]",
|
|
667
668
|
optionSchema: PROJECT_OPTION_SCHEMA,
|
|
668
|
-
handler: async ({ options, rest }) => (await import("./project-agent-
|
|
669
|
+
handler: async ({ options, rest }) => (await import("./project-agent-JOZ6NRTW.js")).runProjectCommand(options, rest)
|
|
669
670
|
},
|
|
670
671
|
{
|
|
671
672
|
name: "agent",
|
|
@@ -678,7 +679,7 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
678
679
|
"openpond agent edit checkpoint-result|commit-result|pr-result <workItemId> --team-id <id> --ref <artifact-ref>"
|
|
679
680
|
],
|
|
680
681
|
optionSchema: AGENT_OPTION_SCHEMA,
|
|
681
|
-
handler: async ({ options, rest }) => (await import("./project-agent-
|
|
682
|
+
handler: async ({ options, rest }) => (await import("./project-agent-JOZ6NRTW.js")).runAgentCommand(options, rest)
|
|
682
683
|
},
|
|
683
684
|
{
|
|
684
685
|
name: "goal",
|
|
@@ -690,7 +691,7 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
690
691
|
json: "boolean",
|
|
691
692
|
goalId: "string"
|
|
692
693
|
},
|
|
693
|
-
handler: async ({ options, rest }) => (await import("./cli-
|
|
694
|
+
handler: async ({ options, rest }) => (await import("./cli-H7PQLPKG.js")).runGoalCommand(options, rest)
|
|
694
695
|
},
|
|
695
696
|
{
|
|
696
697
|
name: "harness",
|
|
@@ -711,13 +712,13 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
711
712
|
token: "string",
|
|
712
713
|
tokenFile: "string"
|
|
713
714
|
},
|
|
714
|
-
handler: async ({ options, rest }) => (await import("./harness-
|
|
715
|
+
handler: async ({ options, rest }) => (await import("./harness-WADDUNGU.js")).runHarnessCommand(options, rest)
|
|
715
716
|
},
|
|
716
717
|
{
|
|
717
718
|
name: "sandbox",
|
|
718
719
|
usage: "openpond sandbox <command> [args]",
|
|
719
720
|
optionSchema: SANDBOX_OPTION_SCHEMA,
|
|
720
|
-
handler: async ({ options, rest }) => (await import("./sandbox-command-
|
|
721
|
+
handler: async ({ options, rest }) => (await import("./sandbox-command-Q72CAVQ7.js")).runSandboxCommand(options, rest)
|
|
721
722
|
},
|
|
722
723
|
{
|
|
723
724
|
name: "opchat",
|
|
@@ -726,7 +727,7 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
726
727
|
json: "boolean",
|
|
727
728
|
stream: "boolean"
|
|
728
729
|
},
|
|
729
|
-
handler: async ({ options, rest }) => (await import("./opchat-
|
|
730
|
+
handler: async ({ options, rest }) => (await import("./opchat-VYKKXDBO.js")).runOpChatCommand(options, rest)
|
|
730
731
|
},
|
|
731
732
|
{
|
|
732
733
|
name: "teams-bot",
|
|
@@ -735,7 +736,7 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
735
736
|
json: "boolean",
|
|
736
737
|
teamId: "string"
|
|
737
738
|
},
|
|
738
|
-
handler: async ({ options, rest }) => (await import("./teams-bot-
|
|
739
|
+
handler: async ({ options, rest }) => (await import("./teams-bot-KNY5OEXB.js")).runTeamsBotCommand(options, rest)
|
|
739
740
|
},
|
|
740
741
|
{
|
|
741
742
|
name: "apps",
|
|
@@ -756,7 +757,7 @@ var CLI_COMMAND_REGISTRY = [
|
|
|
756
757
|
name: "opentool",
|
|
757
758
|
usage: "openpond opentool <init|validate|build> [args]",
|
|
758
759
|
optionSchema: {},
|
|
759
|
-
handler: async ({ rest }) => (await import("./core-commands-
|
|
760
|
+
handler: async ({ rest }) => (await import("./core-commands-KI53GSJF.js")).runOpentool(rest)
|
|
760
761
|
}
|
|
761
762
|
];
|
|
762
763
|
var CLI_COMMAND_BY_NAME = /* @__PURE__ */ new Map();
|
|
@@ -773,7 +774,7 @@ function getCliCommandDefinition(command) {
|
|
|
773
774
|
return CLI_COMMAND_BY_NAME.get(command) ?? null;
|
|
774
775
|
}
|
|
775
776
|
function getCliOptionKind(command, key) {
|
|
776
|
-
const definition = command ? getCliCommandDefinition(command) :
|
|
777
|
+
const definition = command ? getCliCommandDefinition(command) : getCliCommandDefinition("ui");
|
|
777
778
|
return definition?.optionSchema[key] ?? CLI_GLOBAL_OPTION_SCHEMA[key];
|
|
778
779
|
}
|
|
779
780
|
function getAnyCliOptionKind(key) {
|
|
@@ -828,11 +829,11 @@ function profileSdkAliasDefinitions() {
|
|
|
828
829
|
name,
|
|
829
830
|
usage: `openpond ${name} [args]`,
|
|
830
831
|
optionSchema: PROFILE_SDK_OPTION_SCHEMA,
|
|
831
|
-
handler: async ({ options, rest }) => (await import("./profile-
|
|
832
|
+
handler: async ({ options, rest }) => (await import("./profile-A75O7EZ4.js")).runOpenPondProfileSdkAlias(name, options, rest)
|
|
832
833
|
}));
|
|
833
834
|
}
|
|
834
835
|
async function runToolCommand({ options, rest }) {
|
|
835
|
-
const { runToolList, runToolRun } = await import("./core-commands-
|
|
836
|
+
const { runToolList, runToolRun } = await import("./core-commands-KI53GSJF.js");
|
|
836
837
|
const subcommand = rest[0];
|
|
837
838
|
if (subcommand === "list") {
|
|
838
839
|
const target = rest[1];
|
|
@@ -856,8 +857,8 @@ async function runToolCommand({ options, rest }) {
|
|
|
856
857
|
throw new Error("usage: tool <list|run> <handle>/<repo> [args]");
|
|
857
858
|
}
|
|
858
859
|
async function runBacktestCommand({ options, rest }) {
|
|
859
|
-
const { runBacktestRun } = await import("./core-commands-
|
|
860
|
-
const { runBacktestEvents, runBacktestGet } = await import("./apps-
|
|
860
|
+
const { runBacktestRun } = await import("./core-commands-KI53GSJF.js");
|
|
861
|
+
const { runBacktestEvents, runBacktestGet } = await import("./apps-MJ47WJNC.js");
|
|
861
862
|
const subcommand = rest[0] || "run";
|
|
862
863
|
if (subcommand === "run") {
|
|
863
864
|
const target = rest[1];
|
|
@@ -891,7 +892,7 @@ async function runBacktestCommand({ options, rest }) {
|
|
|
891
892
|
throw new Error("usage: backtest <run|events|get> <handle>/<repo> [args]");
|
|
892
893
|
}
|
|
893
894
|
async function runDeployCommand({ options, rest }) {
|
|
894
|
-
const { runDeployWatch } = await import("./core-commands-
|
|
895
|
+
const { runDeployWatch } = await import("./core-commands-KI53GSJF.js");
|
|
895
896
|
const subcommand = rest[0] || "watch";
|
|
896
897
|
if (subcommand !== "watch") {
|
|
897
898
|
throw new Error(
|
|
@@ -907,7 +908,7 @@ async function runDeployCommand({ options, rest }) {
|
|
|
907
908
|
await runDeployWatch(options, target);
|
|
908
909
|
}
|
|
909
910
|
async function runTemplateCommand({ options, rest }) {
|
|
910
|
-
const { runTemplateBranches, runTemplateStatus, runTemplateUpdate } = await import("./core-commands-
|
|
911
|
+
const { runTemplateBranches, runTemplateStatus, runTemplateUpdate } = await import("./core-commands-KI53GSJF.js");
|
|
911
912
|
const subcommand = rest[0] || "status";
|
|
912
913
|
const target = rest[1];
|
|
913
914
|
if (!target) {
|
|
@@ -932,7 +933,7 @@ async function runTemplateCommand({ options, rest }) {
|
|
|
932
933
|
);
|
|
933
934
|
}
|
|
934
935
|
async function runRepoCommand({ options, rest }) {
|
|
935
|
-
const { runRepoCreate, runRepoPush } = await import("./core-commands-
|
|
936
|
+
const { runRepoCreate, runRepoPush } = await import("./core-commands-KI53GSJF.js");
|
|
936
937
|
const subcommand = rest[0] || "create";
|
|
937
938
|
if (subcommand === "create") {
|
|
938
939
|
await runRepoCreate(options, rest.slice(1));
|
|
@@ -962,7 +963,7 @@ async function runAppsCommand({ options, rest }) {
|
|
|
962
963
|
runAppsTools,
|
|
963
964
|
runAppsToolsExecute,
|
|
964
965
|
runAppsTradeFacts
|
|
965
|
-
} = await import("./apps-
|
|
966
|
+
} = await import("./apps-MJ47WJNC.js");
|
|
966
967
|
const subcommand = rest[0];
|
|
967
968
|
if (subcommand === "list") {
|
|
968
969
|
await runAppsList(options);
|
|
@@ -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.
|
|
15
|
+
var VERSION = "0.0.31";
|
|
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
|
};
|