hermesdesk-agent 0.1.0-alpha.13 → 0.1.0-alpha.14

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/README.md CHANGED
@@ -72,7 +72,7 @@ Request sources are positional text, `--prompt-file PATH`, or piped UTF-8 text u
72
72
 
73
73
  `--output-format text` streams reply text to stdout and tool notices to stderr. `--output-format json` writes one final JSON object. `--output-format jsonl` streams `start`, `text`, `tool`, `tool_result`, `error` and `done` records; `--json` remains an alias for JSONL. There are no TUI escape sequences or progress spinners. The final result includes `ok`, `status`, `exitCode`, `session`, final/partial `text`, `stopReason`, per-job token `usage` and `durationMs`. Policy refusals appear in `blocked`. Model reasoning is not included in the output stream. Save results using normal shell redirection.
74
74
 
75
- Jobs save their conversations automatically. Use `--continue` for the newest conversation in the selected workspace, or `--session ID` for a specific conversation. History stays on the client computer. Profiles and generation overrides work as in interactive chat; `--max-requests N` bounds model requests for that job. `--timeout SECONDS` applies to an entire job after runtime startup, including tools; without it, the provider's own timeout still applies. Ctrl+C/SIGINT cancels work; SIGTERM cancels and exits. Cancellation does not undo completed actions.
75
+ Jobs save their conversations automatically. Use `--continue` for the newest conversation in the selected workspace, or `--session ID` for a specific conversation. History stays on the client computer. Profiles and generation overrides work as in interactive chat. Jobs have no fixed model-request count. `--timeout SECONDS` applies to an entire job after runtime startup, including tools; without it, the provider's own timeout still applies. Ctrl+C/SIGINT cancels work; SIGTERM cancels and exits. Cancellation does not undo completed actions.
76
76
 
77
77
  File changes are denied unless launched with `--approve-writes`. Shell commands are denied unless launched with `--approve-commands`; this explicitly authorizes model-generated commands with the launching account's permissions, including access outside the workspace. Shell execution has no OS sandbox. `--read-only` takes precedence over both options; protected file-tool paths remain blocked even when writes are pre-approved. Any policy refusal makes the final job status `blocked`, even if the model subsequently writes a response. Ordinary tool failures can be recovered from by the model.
78
78
 
@@ -156,7 +156,6 @@ hermesdesk.cmd config set maxTokens 131072
156
156
  hermesdesk.cmd config set temperature 0.7
157
157
  hermesdesk.cmd config set topP 0.95
158
158
  hermesdesk.cmd config set topK 20
159
- hermesdesk.cmd config set maxRequests 64
160
159
  ```
161
160
 
162
161
  Profiles: `fast` uses 32K with thinking off; `balanced` uses 64K with xhigh thinking; `extended` uses 131K with xhigh thinking. Thinking profiles use Qwen's recommended sampling (temperature 1, top-p .95, top-k 20). `thinkingBudget 0` is automatic. A positive budget is a ceiling, must be below `maxTokens`, and Strata may reduce it to preserve answer space. `maxTokens` includes **thinking plus the final answer**; the model can stop earlier.
@@ -170,7 +169,7 @@ hermesdesk.cmd run "Review this repository" --read-only --max-tokens 65536 --thi
170
169
 
171
170
  Fresh installations default to a 131K total cap with thinking off. Existing saved values are retained: use `config preset extended` to switch to the tested thinking profile. The server must support these limits; older gateways capped output at 8K. Pi's compaction reserves space for the configured output budget.
172
171
 
173
- Changes apply to the next launch. Context is client metadata, not a request to allocate more server context: keep it at or below the server's configured capacity. The updated gateway allows up to 131072 combined output tokens. Input, thinking and answer share the server context; the full 262K-thinking plus 131K-answer allowance in Qwen documentation assumes an extended 1M context. The default request budget is 64 per message and can be set from 1 to 512. Pi's in-chat settings are session-only in this version. Change the server using `hermesdesk connect --url https://your-server/v1`. HTTP is accepted only on loopback addresses.
172
+ Changes apply to the next launch. Context is client metadata, not a request to allocate more server context: keep it at or below the server's configured capacity. The updated gateway allows up to 131072 combined output tokens. Input, thinking and answer share the server context; the full 262K-thinking plus 131K-answer allowance in Qwen documentation assumes an extended 1M context. There is no per-message model-request cap. Legacy `maxRequests` values in saved configurations are ignored; remove the retired `--max-requests` option from scripts. Pi's in-chat settings are session-only in this version. Change the server using `hermesdesk connect --url https://your-server/v1`. HTTP is accepted only on loopback addresses.
174
173
 
175
174
  Windows uses its built-in `curl.exe` for model HTTP requests because the retained Cloudflare bot filter challenged Node fetch and a native Node follow-up request during testing. TLS verification stays enabled, redirects are not followed, credentials are sent through stdin rather than command-line arguments, and disconnects cancel the request. `doctor` checks the connection without loading the model. A browser challenge from zone-wide Bot Fight Mode cannot be solved by an API client; the server owner must configure API-compatible protection. Transport compatibility alone does not guarantee that every computer will be accepted. Cold Strata startup can still take minutes; the client cannot remove server warm-up costs. A Cloudflare 403 is a connection failure, not a model error.
176
175
 
package/bin/hermesdesk.js CHANGED
@@ -94,9 +94,9 @@ headless accepts JSON lines on stdin: prompt, abort, get_state, shutdown.
94
94
  Exit codes: 0 complete, 1 failure, 2 invalid input, 3 blocked, 4 output limit,
95
95
  124 timed out, 130 cancelled, 143 terminated.
96
96
  Settings: model, context, maxTokens (total thinking + answer), thinking,
97
- reasoningEffort (low|medium|xhigh), thinkingBudget (0=automatic), temperature, topP, topK, maxRequests.
97
+ reasoningEffort (low|medium|xhigh), thinkingBudget (0=automatic), temperature, topP, topK.
98
98
  Run overrides: --profile fast|balanced|extended --max-tokens N --thinking on|off
99
- --reasoning-effort low|medium|xhigh --thinking-budget N --max-requests N
99
+ --reasoning-effort low|medium|xhigh --thinking-budget N
100
100
  `;
101
101
  async function main() {
102
102
  const { values: v, positionals: p } = parseArgs({
@@ -104,7 +104,6 @@ async function main() {
104
104
  options: {
105
105
  profile: { type: "string" },
106
106
  "max-tokens": { type: "string" },
107
- "max-requests": { type: "string" },
108
107
  "prompt-file": { type: "string" },
109
108
  stdin: { type: "boolean" },
110
109
  timeout: { type: "string" },
@@ -361,12 +360,6 @@ async function main() {
361
360
  return;
362
361
  }
363
362
  const overrides = {};
364
- if (v["max-requests"] !== undefined)
365
- overrides.maxRequests = positiveInteger(
366
- v["max-requests"],
367
- "--max-requests",
368
- 512,
369
- );
370
363
  if (v.profile) Object.assign(overrides, profile(v.profile));
371
364
  if (v["max-tokens"] !== undefined)
372
365
  overrides.maxTokens = Number(v["max-tokens"]);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "hermesdesk-agent",
3
- "version": "0.1.0-alpha.13",
3
+ "version": "0.1.0-alpha.14",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "hermesdesk-agent",
9
- "version": "0.1.0-alpha.13",
9
+ "version": "0.1.0-alpha.14",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@earendil-works/pi-coding-agent": "1.5.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hermesdesk-agent",
3
- "version": "0.1.0-alpha.13",
3
+ "version": "0.1.0-alpha.14",
4
4
  "description": "Pi-based terminal coding client for HermesDesk and Strata",
5
5
  "type": "module",
6
6
  "bin": {
package/src/agent.js CHANGED
@@ -107,7 +107,6 @@ export async function createRuntime({
107
107
  throw error;
108
108
  }
109
109
  };
110
- let requestCount = 0;
111
110
  modelRuntime.registerProvider("hermesdesk", {
112
111
  name: "HermesDesk / Strata",
113
112
  baseUrl: config.baseUrl,
@@ -135,10 +134,6 @@ export async function createRuntime({
135
134
  transportFailure = undefined;
136
135
  transportAttempts = 0;
137
136
  syncThinking();
138
- if (++requestCount > config.maxRequests)
139
- throw Error(
140
- "Request budget reached. Send another message to continue.",
141
- );
142
137
  return streamSimple(model, context, {
143
138
  ...options,
144
139
  fetch: safeFetch,
@@ -264,10 +259,6 @@ export async function createRuntime({
264
259
  approveCommands,
265
260
  onPolicyBlock,
266
261
  readPermissions: permissions.read,
267
- maxRequests: config.maxRequests,
268
- onAgentStart: () => {
269
- requestCount = 0;
270
- },
271
262
  }),
272
263
  interfaceExtension({
273
264
  version: VERSION,
package/src/config.js CHANGED
@@ -2,7 +2,7 @@ import fs from "node:fs";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
4
  import crypto from "node:crypto";
5
- export const VERSION = "0.1.0-alpha.13";
5
+ export const VERSION = "0.1.0-alpha.14";
6
6
  export const DEFAULTS = {
7
7
  baseUrl: null,
8
8
  model: null,
@@ -14,7 +14,6 @@ export const DEFAULTS = {
14
14
  temperature: 0.7,
15
15
  topP: 0.95,
16
16
  topK: 20,
17
- maxRequests: 64,
18
17
  };
19
18
  export function configHome() {
20
19
  return path.resolve(
@@ -58,7 +57,6 @@ export function validateConfig(input) {
58
57
  ["maxTokens", 1, 131072],
59
58
  ["thinkingBudget", 0, 131071],
60
59
  ["topK", 0, 1000],
61
- ["maxRequests", 1, 512],
62
60
  ])
63
61
  if (!Number.isInteger(c[k]) || c[k] < min || c[k] > max)
64
62
  throw Error(k + " must be an integer from " + min + " to " + max + ".");
package/src/policy.js CHANGED
@@ -63,24 +63,13 @@ export function policyExtension({
63
63
  approveCommands = false,
64
64
  onPolicyBlock = () => {},
65
65
  readPermissions = () => ({ readOnly, approveWrites, approveCommands }),
66
- maxRequests = 16,
67
- onAgentStart = () => {},
68
66
  }) {
69
67
  return (pi) => {
70
- let requests = 0,
71
- lastCall,
68
+ let lastCall,
72
69
  repeats = 0;
73
70
  pi.on("agent_start", () => {
74
- requests = 0;
75
71
  lastCall = undefined;
76
72
  repeats = 0;
77
- onAgentStart();
78
- });
79
- pi.on("before_provider_request", () => {
80
- if (++requests > maxRequests)
81
- throw Error(
82
- "Request budget reached. Continue with a new message if needed.",
83
- );
84
73
  });
85
74
  pi.on("tool_call", async (event, ctx) => {
86
75
  const block = (reason) => {