@pushpalsdev/cli 1.0.79 → 1.0.81
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/pushpals-cli.js +66 -3
- package/monitor-ui/+not-found.html +1 -1
- package/monitor-ui/_expo/static/js/web/{entry-c6862f701ea52ccf8692a6c9e749af5c.js → entry-e66b4de45f75e702ac16916082bcc9a5.js} +172 -171
- package/monitor-ui/_expo/static/js/web/{index-6013f9ebc87a963a55bb9137af1a5a06.js → index-ec13ec62e2b37ed3c5f6d324ef6784e1.js} +4 -4
- package/monitor-ui/_sitemap.html +1 -1
- package/monitor-ui/index.html +1 -1
- package/monitor-ui/modal.html +1 -1
- package/package.json +1 -1
- package/runtime/prompts/remotebuddy/autonomy_ideation_system_prompt.md +5 -3
- package/runtime/prompts/workerpals/openai_codex_default_system_prompt.md +1 -0
- package/runtime/prompts/workerpals/openai_codex_runtime_policy_appendix.md +1 -0
- package/runtime/prompts/workerpals/openai_codex_task_execute_system_prompt.md +1 -0
- package/runtime/sandbox/.pushpals-remotebuddy-fallback.js +560 -23
- package/runtime/sandbox/apps/workerpals/src/execute_job.ts +282 -33
- package/runtime/sandbox/apps/workerpals/src/workerpals_main.ts +113 -2
- package/runtime/sandbox/packages/shared/src/client_preflight.ts +2 -0
- package/runtime/sandbox/packages/shared/src/config.ts +1 -6
- package/runtime/sandbox/packages/shared/src/index.ts +19 -0
- package/runtime/sandbox/packages/shared/src/tooling.ts +422 -0
- package/runtime/sandbox/packages/shared/src/vision.ts +12 -0
- package/runtime/sandbox/prompts/workerpals/openai_codex_default_system_prompt.md +1 -0
- package/runtime/sandbox/prompts/workerpals/openai_codex_runtime_policy_appendix.md +1 -0
- package/runtime/sandbox/prompts/workerpals/openai_codex_task_execute_system_prompt.md +1 -0
- package/runtime/vision.example.md +125 -122
package/dist/pushpals-cli.js
CHANGED
|
@@ -14,7 +14,16 @@ import {
|
|
|
14
14
|
rmSync as rmSync2,
|
|
15
15
|
writeFileSync
|
|
16
16
|
} from "fs";
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
basename,
|
|
19
|
+
delimiter,
|
|
20
|
+
dirname,
|
|
21
|
+
extname,
|
|
22
|
+
join as join2,
|
|
23
|
+
relative as relative2,
|
|
24
|
+
resolve as resolve4,
|
|
25
|
+
win32 as pathWin32
|
|
26
|
+
} from "path";
|
|
18
27
|
import { createInterface } from "readline";
|
|
19
28
|
|
|
20
29
|
// ../shared/src/localbuddy_runtime.ts
|
|
@@ -793,7 +802,7 @@ function loadPushPalsConfig(options = {}) {
|
|
|
793
802
|
const canonical = coerceAutonomyComponentConfigKey(rawKey);
|
|
794
803
|
if (!canonical)
|
|
795
804
|
continue;
|
|
796
|
-
const parsed =
|
|
805
|
+
const parsed = rawValue;
|
|
797
806
|
remoteAutonomyDispatchByComponent[canonical] = Number.isFinite(parsed) ? Math.max(0, Math.floor(parsed)) : 0;
|
|
798
807
|
}
|
|
799
808
|
const workerNode = getObject(merged, "workerpals");
|
|
@@ -1384,6 +1393,7 @@ function evaluateClientRuntimePreflight(options) {
|
|
|
1384
1393
|
issues.push({
|
|
1385
1394
|
code: "missing_vision_doc",
|
|
1386
1395
|
message: "Missing required autonomy vision file: vision.md " + "(required when remotebuddy.autonomy.enabled=true).",
|
|
1396
|
+
detail: "Run `pushpals --create_vision_md` to create a starter vision.md, then edit it for this repo.",
|
|
1387
1397
|
copyCommands: existsSync3(visionTemplatePath) ? buildCopyCommands(projectRoot, visionTemplatePath, visionPath) : undefined
|
|
1388
1398
|
});
|
|
1389
1399
|
return {
|
|
@@ -1778,6 +1788,7 @@ function printUsage() {
|
|
|
1778
1788
|
console.log(" --runtime-only Start the local runtime and wait for shutdown without opening the interactive chat");
|
|
1779
1789
|
console.log(" --status-once Print active endpoints once and exit");
|
|
1780
1790
|
console.log(" --clear Remove repo-local PushPals state and exit");
|
|
1791
|
+
console.log(" --create_vision_md Create a starter vision.md in the current repo and exit");
|
|
1781
1792
|
console.log(" -h, --help Show this help");
|
|
1782
1793
|
console.log("");
|
|
1783
1794
|
console.log("Chat commands:");
|
|
@@ -1797,7 +1808,8 @@ function parseArgs(argv) {
|
|
|
1797
1808
|
noStream: false,
|
|
1798
1809
|
runtimeOnly: false,
|
|
1799
1810
|
statusOnce: false,
|
|
1800
|
-
clear: false
|
|
1811
|
+
clear: false,
|
|
1812
|
+
createVisionMd: false
|
|
1801
1813
|
};
|
|
1802
1814
|
for (let i = 0;i < argv.length; i++) {
|
|
1803
1815
|
const arg = argv[i];
|
|
@@ -1825,6 +1837,10 @@ function parseArgs(argv) {
|
|
|
1825
1837
|
options.clear = true;
|
|
1826
1838
|
continue;
|
|
1827
1839
|
}
|
|
1840
|
+
if (arg === "--create_vision_md" || arg === "--create-vision-md") {
|
|
1841
|
+
options.createVisionMd = true;
|
|
1842
|
+
continue;
|
|
1843
|
+
}
|
|
1828
1844
|
if (arg === "--server-url") {
|
|
1829
1845
|
options.serverUrl = argv[++i];
|
|
1830
1846
|
continue;
|
|
@@ -2471,6 +2487,46 @@ function emitCliRuntimePreflight(result) {
|
|
|
2471
2487
|
for (const line of lines)
|
|
2472
2488
|
console.error(line);
|
|
2473
2489
|
}
|
|
2490
|
+
function displayPath(fromRoot, pathValue) {
|
|
2491
|
+
const rel = relative2(fromRoot, pathValue);
|
|
2492
|
+
if (!rel || rel === "")
|
|
2493
|
+
return ".";
|
|
2494
|
+
if (rel.startsWith(".."))
|
|
2495
|
+
return pathValue;
|
|
2496
|
+
return rel.replace(/\\/g, "/");
|
|
2497
|
+
}
|
|
2498
|
+
function resolveVisionTemplatePathForCreate(opts) {
|
|
2499
|
+
const candidates = [
|
|
2500
|
+
join2(opts.runtimeRoot, "vision.example.md"),
|
|
2501
|
+
join2(opts.repoRoot, "vision.example.md"),
|
|
2502
|
+
resolve4(import.meta.dir, "..", "runtime", "vision.example.md"),
|
|
2503
|
+
resolve4(import.meta.dir, "..", "packages", "cli", "runtime", "vision.example.md"),
|
|
2504
|
+
resolve4(import.meta.dir, "..", "vision.example.md")
|
|
2505
|
+
];
|
|
2506
|
+
for (const candidate of candidates) {
|
|
2507
|
+
if (existsSync5(candidate))
|
|
2508
|
+
return candidate;
|
|
2509
|
+
}
|
|
2510
|
+
return null;
|
|
2511
|
+
}
|
|
2512
|
+
function createVisionMdFromTemplate(opts) {
|
|
2513
|
+
const visionPath = join2(opts.repoRoot, "vision.md");
|
|
2514
|
+
if (existsSync5(visionPath)) {
|
|
2515
|
+
console.log(`[pushpals] vision.md already exists at ${displayPath(opts.repoRoot, visionPath)}; leaving it unchanged.`);
|
|
2516
|
+
return 0;
|
|
2517
|
+
}
|
|
2518
|
+
const templatePath = resolveVisionTemplatePathForCreate(opts);
|
|
2519
|
+
if (!templatePath) {
|
|
2520
|
+
console.error("[pushpals] Could not create vision.md: bundled vision.example.md template was not found.");
|
|
2521
|
+
return 1;
|
|
2522
|
+
}
|
|
2523
|
+
const template = readFileSync4(templatePath, "utf8");
|
|
2524
|
+
writeFileSync(visionPath, template, "utf8");
|
|
2525
|
+
console.log(`[pushpals] Created ${displayPath(opts.repoRoot, visionPath)} from ${displayPath(opts.repoRoot, templatePath)}.`);
|
|
2526
|
+
console.log("[pushpals] Edit vision.md with this repo's users, priorities, guardrails, and validation path.");
|
|
2527
|
+
console.log("[pushpals] Then run `pushpals` again.");
|
|
2528
|
+
return 0;
|
|
2529
|
+
}
|
|
2474
2530
|
function runtimeBinaryFilename(serviceName, platformKey) {
|
|
2475
2531
|
const serviceToken = serviceName === "source_control_manager" ? "source-control-manager" : serviceName;
|
|
2476
2532
|
const extension = platformKey.startsWith("windows-") ? ".exe" : "";
|
|
@@ -5003,6 +5059,13 @@ async function main() {
|
|
|
5003
5059
|
});
|
|
5004
5060
|
const config = preparedRuntime.runtimePreflight.config;
|
|
5005
5061
|
const statePath = resolveCliStatePath(repoRoot);
|
|
5062
|
+
if (parsed.createVisionMd) {
|
|
5063
|
+
const exitCode = createVisionMdFromTemplate({
|
|
5064
|
+
repoRoot,
|
|
5065
|
+
runtimeRoot: preparedRuntime.runtimeRoot
|
|
5066
|
+
});
|
|
5067
|
+
process.exit(exitCode);
|
|
5068
|
+
}
|
|
5006
5069
|
if (parsed.clear) {
|
|
5007
5070
|
const serverUrl2 = normalizeLoopbackUrl(parsed.serverUrl ?? process.env.PUSHPALS_SERVER_URL, config.server.url);
|
|
5008
5071
|
const exitCode = await clearPushpalsState({
|
|
@@ -435,5 +435,5 @@ input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-web
|
|
|
435
435
|
@keyframes r-1pzkwqh{0%{transform:translateY(100%);}100%{transform:translateY(0%);}}
|
|
436
436
|
@keyframes r-imtty0{0%{opacity:0;}100%{opacity:1;}}
|
|
437
437
|
@keyframes r-q67da2{0%{transform:translateX(-100%);}100%{transform:translateX(400%);}}
|
|
438
|
-
@keyframes r-t2lo5v{0%{opacity:1;}100%{opacity:0;}}</style><script type="module">globalThis.__EXPO_ROUTER_HYDRATE__=true;</script><link rel="icon" href="/favicon.ico" /></head><body><div id="root"><div class="css-g5y9jx r-13awgt0"></div></div><script src="/_expo/static/js/web/entry-
|
|
438
|
+
@keyframes r-t2lo5v{0%{opacity:1;}100%{opacity:0;}}</style><script type="module">globalThis.__EXPO_ROUTER_HYDRATE__=true;</script><link rel="icon" href="/favicon.ico" /></head><body><div id="root"><div class="css-g5y9jx r-13awgt0"></div></div><script src="/_expo/static/js/web/entry-e66b4de45f75e702ac16916082bcc9a5.js" defer></script>
|
|
439
439
|
</body></html>
|