@skydiveai/pi-extensions 0.1.0-beta.2871 → 0.1.0-beta.2872

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.
Files changed (2) hide show
  1. package/dist/index.mjs +5 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -2929,7 +2929,8 @@ const bashDefaultTimeoutExtension = (pi) => {
2929
2929
  * first time usage crosses a warn threshold, folds a system notification into
2930
2930
  * the open turn so the agent can checkpoint, shed work (constrain
2931
2931
  * parallelism, kill a background hog, clean scratch space), or request a
2932
- * bigger tier BEFORE the kill.
2932
+ * bigger tier BEFORE the kill. The warning is model-facing only; the
2933
+ * agent must not narrate it to the user unless asked.
2933
2934
  *
2934
2935
  * The notification is triggered by the two conditions that actually kill
2935
2936
  * work — memory near the cgroup hard cap, disk near full — and reports a
@@ -3063,7 +3064,8 @@ function resourcePressureWarningText(trigger, { mem, cpuPct, diskPct }) {
3063
3064
  if (diskPct !== null) stats.push(`disk ${diskPct}% full`);
3064
3065
  const lead = trigger === "memory" ? `Your sandbox is at ${mem?.pct}% of its memory cap. If usage keeps climbing, the kernel will kill the offending process and this turn may die with it.` : `Your sandbox's disk is ${diskPct}% full. If it fills completely, writes will start failing and this turn may die with them.`;
3065
3066
  const remedy = trigger === "memory" ? "checkpoint in-flight work (commit and push), then reduce the footprint — constrain parallelism, run heavy steps sequentially, or kill background processes you no longer need." : "checkpoint in-flight work (commit and push), then free space — clean build artifacts, caches, and scratch files you no longer need.";
3066
- return `<system_notification>${lead} Current usage: ${stats.join(", ")}. Act now: ${remedy} If the workload genuinely needs more resources, request a bigger sandbox with \`platform compute request\`. This is an automated resource warning, not a message from the user; continue the task, adjusted.</system_notification>`;
3067
+ const closer = trigger === "memory" ? "If the workload genuinely needs more memory or CPU, request a bigger sandbox with `platform compute request`." : "A bigger compute tier will not add disk. Free space on the current computer instead, and do not request a compute upgrade for disk pressure.";
3068
+ return `<system_notification>${lead} Current usage: ${stats.join(", ")}. Act now: ${remedy} ${closer} Do not mention this constraint as you work unless the user asks. This warning does not change whether the user is owed a reply. Do not call \`platform channel suppress-reply\` because of this warning. Complete any reply already owed after checkpointing. This is an automated resource warning, not a message from the user; continue the task, adjusted.</system_notification>`;
3067
3069
  }
3068
3070
  const resourcePressureWarningExtension = (pi) => {
3069
3071
  let agentActive = false;
@@ -3078,6 +3080,7 @@ const resourcePressureWarningExtension = (pi) => {
3078
3080
  sampleCpu(),
3079
3081
  readDiskUsePct()
3080
3082
  ]);
3083
+ if (!agentActive) return;
3081
3084
  let trigger = null;
3082
3085
  if (!warnedMemThisTurn && mem !== null && mem.pct >= 80) {
3083
3086
  trigger = "memory";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skydiveai/pi-extensions",
3
- "version": "0.1.0-beta.2871",
3
+ "version": "0.1.0-beta.2872",
4
4
  "homepage": "https://skydive.com",
5
5
  "license": "MIT",
6
6
  "author": "Create, Inc.",