@itsaplan/runner 0.5.1 → 0.5.3

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 (3) hide show
  1. package/README.md +12 -6
  2. package/dist/cli.js +6 -2
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -200,12 +200,18 @@ sends `$ITSAPLAN_API_KEY` as a bearer token, and acts as its own user with its r
200
200
 
201
201
  Every run holds these variables:
202
202
 
203
- | Variable | What it holds |
204
- | ------------------------ | ----------------------------------------------------------------- |
205
- | `ITSAPLAN_URL` | the instance that sent the task |
206
- | `ITSAPLAN_API_KEY` | the agent's key, for the API and the MCP server |
207
- | `ITSAPLAN_TRIGGER` | `mention`, `delegation`, `field`, `schedule`, `manual`, or `chat` |
208
- | `ITSAPLAN_SYSTEM_PROMPT` | the context of the run, for a command that takes a system prompt |
203
+ | Variable | What it holds |
204
+ | ------------------------ | --------------------------------------------------------------------------- |
205
+ | `ITSAPLAN_URL` | the instance that sent the task |
206
+ | `ITSAPLAN_API_KEY` | the agent's key, for the API and the MCP server |
207
+ | `ITSAPLAN_TRIGGER` | `mention`, `delegation`, `field`, `schedule`, `manual`, `status`, or `chat` |
208
+ | `ITSAPLAN_SYSTEM_PROMPT` | the context of the run, for a command that takes a system prompt |
209
+ | `ITSAPLAN_TIMEOUT_MS` | the effective task timeout in milliseconds, including per-agent overrides |
210
+
211
+ Custom commands can read `ITSAPLAN_TIMEOUT_MS` to configure their own execution timeout.
212
+ The runner supplies the resolved `timeoutMs`, overriding any inherited value or value in
213
+ `env`. Its timer starts when the command is spawned, so startup and waiting inside the
214
+ command count toward the same limit.
209
215
 
210
216
  A queued run adds three more:
211
217
 
package/dist/cli.js CHANGED
@@ -473,7 +473,10 @@ class UsageReader {
473
473
  }
474
474
  }
475
475
  function tail(text, limit) {
476
- return text.length <= limit ? text : `…${text.slice(-limit)}`;
476
+ if (text.length <= limit)
477
+ return text;
478
+ const mark = "…";
479
+ return mark + text.slice(-(limit - mark.length));
477
480
  }
478
481
  function textOfResult(content) {
479
482
  if (typeof content === "string")
@@ -791,7 +794,8 @@ function childEnv(config, task) {
791
794
  ...config.env,
792
795
  ITSAPLAN_URL: config.url,
793
796
  ITSAPLAN_API_KEY: config.apiKey,
794
- ...task.env
797
+ ...task.env,
798
+ ITSAPLAN_TIMEOUT_MS: String(config.timeoutMs)
795
799
  };
796
800
  }
797
801
  function killGroup(pid) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itsaplan/runner",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "Runs an Itsaplan external agent's queued tasks and answers its chat on your own machine",
5
5
  "keywords": [
6
6
  "itsaplan",
@@ -53,7 +53,7 @@
53
53
  "devDependencies": {
54
54
  "@repo/eslint-config": "workspace:*",
55
55
  "@types/bun": "latest",
56
- "@types/node": "^26.2.0",
56
+ "@types/node": "^26.6.5",
57
57
  "eslint": "^9.39.0",
58
58
  "typescript": "^6.0.3"
59
59
  }