@dimi-agent/cli 0.6.5 → 0.6.6
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/main.mjs +1 -1
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -123100,7 +123100,7 @@ var init_waitService = __esmMin((() => {
|
|
|
123100
123100
|
//#region ../../packages/agent-core-v2/src/agent/tools/wait-for/wait-for.md?raw
|
|
123101
123101
|
var wait_for_default;
|
|
123102
123102
|
var init_wait_for = __esmMin((() => {
|
|
123103
|
-
wait_for_default = "Wait for a future notification when no independent work remains. Provide a concise reason and an optional timeout in seconds. The default is 60 seconds; use longer waits only for clearly long-running work, up to 1800 seconds.\n\nCall WaitFor by itself. It waits on the current agent, not a specific task. Any later notification wakes the agent. A timeout wakes the agent with an explicit `wait_expired` message and never cancels background work.\n\nWhen you are waiting on an external state that can change on its own (a file being written, a service coming up, a process finishing, a remote resource becoming ready, …), do not just park on a timeout and re-check later. Start a background Bash task that polls exactly the part of that state you care about and exits as soon as it changes — for example a loop that checks every few seconds and breaks on the expected condition, printing what changed. Because a finished background task notifies the agent, the wait then wakes you the moment the state flips instead of on a blind timeout, and you can act immediately. Keep the polling script narrowly scoped to the monitored condition and make sure it terminates on its own (or after the wait timeout); do not leave a watcher running forever.\n\nSurface errors from the watcher loudly instead of hiding them. If a check fails, a command errors, or the target becomes unreachable, print the error and exit with a non-zero code so the failed background task wakes you with the real reason — then you can diagnose and retry immediately. Do not swallow failures with `|| true`, `2>/dev/null`, or a `continue` that keeps polling forever; a watcher that silently runs to timeout hides the very condition you are waiting on.\n\n";
|
|
123103
|
+
wait_for_default = "Wait for a future notification when no independent work remains. Provide a concise reason and an optional timeout in seconds. The default is 60 seconds; use longer waits only for clearly long-running work, up to 1800 seconds.\n\nCall WaitFor by itself. It waits on the current agent, not a specific task. Any later notification wakes the agent. A timeout wakes the agent with an explicit `wait_expired` message and never cancels background work.\n\nWhen you are waiting on an external state that can change on its own (a file being written, a service coming up, a process finishing, a remote resource becoming ready, …), do not just park on a timeout and re-check later. Start a background Bash task that polls exactly the part of that state you care about and exits as soon as it changes — for example a loop that checks every few seconds and breaks on the expected condition, printing what changed. Because a finished background task notifies the agent, the wait then wakes you the moment the state flips instead of on a blind timeout, and you can act immediately. Keep the polling script narrowly scoped to the monitored condition and make sure it terminates on its own (or after the wait timeout); do not leave a watcher running forever.\n\nStart the watcher as a dimi background task with `run_in_background=true` on the Bash tool — never launch it detached from the session (no `nohup`, no `&` outside the tool, no cron or external scheduler). Only a dimi background task is tracked by the agent runtime, so only its completion (success or failure) can wake the wait; a detached process is invisible to dimi, gives no notification, and leaves you sleeping until the timeout. The watcher must exit on its own when the state flips or the wait deadline passes.\n\nSurface errors from the watcher loudly instead of hiding them. If a check fails, a command errors, or the target becomes unreachable, print the error and exit with a non-zero code so the failed background task wakes you with the real reason — then you can diagnose and retry immediately. Do not swallow failures with `|| true`, `2>/dev/null`, or a `continue` that keeps polling forever; a watcher that silently runs to timeout hides the very condition you are waiting on.\n\n\n";
|
|
123104
123104
|
}));
|
|
123105
123105
|
//#endregion
|
|
123106
123106
|
//#region ../../packages/agent-core-v2/src/agent/tools/wait-for/waitForTool.ts
|