loopengine 0.1.9 → 0.1.10

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.
@@ -1569,6 +1569,7 @@ export const agentsConfigPageHtml = `<!doctype html>
1569
1569
  '<button type="button" id="httpToolAddHeaderBtn" class="hint-btn">Add header</button>' +
1570
1570
  '</label>' +
1571
1571
  '<label class="http-tool-inline-label"><input type="checkbox" name="sendFieldsAsJsonBody"> Send fields as a JSON body (POST/PUT/PATCH only)</label>' +
1572
+ '<label class="http-tool-inline-label"><input type="checkbox" name="safe"> Parallel-safe <span class="hint">(read-only, no side effects &mdash; safe to run alongside other calls)</span></label>' +
1572
1573
  '<label>Response JSON path <span class="hint">(optional &mdash; e.g. data.status; leave blank to return the raw response text)</span>' +
1573
1574
  '<input type="text" name="responseJsonPath" placeholder="data.status">' +
1574
1575
  '</label>' +
@@ -1655,6 +1656,7 @@ export const agentsConfigPageHtml = `<!doctype html>
1655
1656
  }
1656
1657
 
1657
1658
  form.querySelector('[name="sendFieldsAsJsonBody"]').checked = spec.sendFieldsAsJsonBody;
1659
+ form.querySelector('[name="safe"]').checked = spec.safe === true;
1658
1660
  form.querySelector('[name="responseJsonPath"]').value = spec.responseJsonPath || '';
1659
1661
  }
1660
1662
 
@@ -1736,6 +1738,7 @@ export const agentsConfigPageHtml = `<!doctype html>
1736
1738
  url: formData.get('url'),
1737
1739
  headers: headers,
1738
1740
  sendFieldsAsJsonBody: formData.get('sendFieldsAsJsonBody') === 'on',
1741
+ safe: formData.get('safe') === 'on',
1739
1742
  responseJsonPath: formData.get('responseJsonPath') ? formData.get('responseJsonPath') : undefined,
1740
1743
  decision: formData.get('decision') ? formData.get('decision') : undefined,
1741
1744
  };
@@ -27,6 +27,14 @@ export interface HttpToolSpec {
27
27
  }[];
28
28
  sendFieldsAsJsonBody: boolean;
29
29
  responseJsonPath?: string;
30
+ /** Same meaning as ToolDefinition.safe (core/agent-config.ts) — true
31
+ * only for a read-only call with no side effects, so ToolLane can run
32
+ * it in its parallel lane. Defaults to false/omitted (unsafe) rather
33
+ * than inferring from `method`, since a GET can still have side
34
+ * effects (e.g. a webhook-triggering endpoint) and the operator who
35
+ * knows the real API is in a better position to say than a guess
36
+ * based on HTTP verb alone. */
37
+ safe?: boolean;
30
38
  }
31
39
  /** Generates agents/<agentName>/tools/<spec.name>.ts, registers it in
32
40
  * that agent's tools/index.ts, then imports the file it just wrote and
@@ -171,6 +171,7 @@ ${envReads} const res = await fetch(\`${urlInner}\`, {
171
171
  ${headersObj}${bodyLine} })
172
172
  if (!res.ok) throw new Error(\`${spec.name}: HTTP \${res.status}\`)
173
173
  ${responseHandling} },
174
+ safe: ${spec.safe === true},
174
175
  }
175
176
  `;
176
177
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loopengine",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "description": "Runtime for tool-using AI agents with a transparent ReAct loop.",
6
6
  "license": "MIT",