opencrowd 0.12.0 → 0.12.1
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/bundle/opencrowd.js +3 -2
- package/package.json +1 -1
package/bundle/opencrowd.js
CHANGED
|
@@ -16845,7 +16845,8 @@ function minimalEnv() {
|
|
|
16845
16845
|
HOME: process.env.HOME,
|
|
16846
16846
|
PATH: process.env.PATH,
|
|
16847
16847
|
USER: process.env.USER,
|
|
16848
|
-
TMPDIR: process.env.TMPDIR
|
|
16848
|
+
TMPDIR: process.env.TMPDIR,
|
|
16849
|
+
...process.env.OPENCROWD_SCRATCH_DIR ? { OPENCROWD_SCRATCH_DIR: process.env.OPENCROWD_SCRATCH_DIR } : {}
|
|
16849
16850
|
};
|
|
16850
16851
|
}
|
|
16851
16852
|
function capOutput(output3, maxBytes) {
|
|
@@ -82509,7 +82510,7 @@ async function runAgentTaskDetailed(session, task, options = {}) {
|
|
|
82509
82510
|
systemPromptParts.push("Using secrets from chat: call vault_request to send one HTTPS request with a vault secret injected, writing {{SECRET_NAME}} where the value belongs (for example an authorization header). The platform substitutes the real value only for hosts the user approved for that secret, refreshes OAuth tokens automatically, and never returns the value to you. If it reports that a host needs approval, tell the user to allow it in the Vault tab and stop; never look for paid third-party services to do what an approved secret already lets you do. To upload a file (an image or video you rendered with run_shell, where ffmpeg is installed), pass body_artifact with its path under artifacts/ and, for multipart APIs, body_field plus form_fields; files over an API's chunk limit can be split with run_shell first.");
|
|
82510
82511
|
}
|
|
82511
82512
|
if (options.hosted && hostedTools.includes("run_shell")) {
|
|
82512
|
-
systemPromptParts.push("Delivering files: run_shell starts in the session directory, so a command that writes artifacts/<name> produces exactly the file save_file would write and the user receives. Treat anything you write elsewhere as scratch the user will not see. Write every deliverable under artifacts/ with its final name before you finish, and name those paths in your answer.", "Tooling: ffmpeg, python3 with pip and venv, node and npm are installed; the system image is read-only, but `pip install --user <package>` and `npm install` persist on this machine
|
|
82513
|
+
systemPromptParts.push("Delivering files: run_shell starts in the session directory, so a command that writes artifacts/<name> produces exactly the file save_file would write and the user receives. Treat anything you write elsewhere as scratch the user will not see. Write every deliverable under artifacts/ with its final name before you finish, and name those paths in your answer.", "Tooling: ffmpeg, python3 with pip and venv, node and npm are installed; the system image is read-only, but `pip install --user <package>` and `npm install` persist on this machine between runs, so install once and reuse.", "Heavy toolchains: this machine's CPU, memory and disk come from the agent's compute tier, and a multi-gigabyte toolchain needs the heavy tier. Measure before installing one (`df -h \"$HOME\"`, `free -m`, `nproc`) and compare the numbers with what it needs. Install it under `$HOME`, which is where the disk is, and keep build trees there too; the session workspace is archived after every run with a 25 MB cap, so a multi-gigabyte directory inside it breaks the backup. Give a long download or compile the time it really needs through run_shell `timeout_ms` instead of accepting the 10 s default, redirect build logs to a file under `$HOME` and tail it rather than printing everything, and re-check free space between steps. `No space left on device` or an OOM kill twice means the tier is too small, not that the command was wrong: stop retrying, and tell the owner exactly which limit you hit, how much you need, and that they can switch this agent to the heavy compute tier from Machine in the agent menu (which also raises the shell timeout).", "Scratch disk: on the heavy tier `$HOME` and `$TMPDIR` are on a temporary scratch disk (its path is also in `$OPENCROWD_SCRATCH_DIR`), which is why there is room for a toolchain at all. It is not backed up and it is deleted when the owner returns the agent to the standard tier or after a few idle days, so treat everything under it as re-creatable: pin versions, write down the install commands you used so a later run can repeat them, and never leave the only copy of something the owner needs there. Anything you want to survive goes under `artifacts/` in the session directory, which is uploaded and reaches the owner. When `$OPENCROWD_SCRATCH_DIR` is unset there is no scratch disk and `$HOME` is on the agent's own 1 GB volume, which is far too small for a toolchain.", 'Lean 4 and Mathlib, when a task asks for machine-checked proofs: install elan into `$HOME` (`ELAN_HOME="$HOME/.elan" curl -fsSL https://elan.lean-lang.org/elan-init.sh | sh -s -- -y --default-toolchain none`, then source `$HOME/.elan/env`), create or clone the project under `$HOME` so `lake-manifest.json` pins the toolchain, and always run `lake exe cache get` to fetch prebuilt `.olean` files before `lake build` \u2014 compiling Mathlib from source is not viable here. Expect roughly 2 GB for the toolchain, 10 GB for the Mathlib cache, several minutes for `cache get`, and a few GB of memory to elaborate one file that imports Mathlib. All of that lands on the scratch disk and will have to be fetched again in a later session; say so rather than promising the owner it is kept. Report the compiler\'s real output; a file containing `sorry` is not a proof.', "Resource recovery: before installing large ML dependencies, check available memory, disk space and Python version. A killed install or OOM is a failed approach, not the end of the task. Inspect partial installs and preserve user files, then choose a materially lighter backend or an external service within the user's budget. Verify package metadata: optional extras add dependencies and do not remove default ones; never invent an extra such as basic-pitch[tflite]. For audio-to-MIDI, prefer a verified TFLite or ONNX inference setup in an isolated venv over full TensorFlow; test on a short audio segment before processing the whole file. If no viable path remains, report the concrete blocker and useful artifacts. Do not claim success until the output has been checked.");
|
|
82513
82514
|
}
|
|
82514
82515
|
systemPromptParts.push("End by calling complete_session with a concise final message.");
|
|
82515
82516
|
if (options.subagent) {
|
package/package.json
CHANGED