@assemblyline-agents/runtime 7.3.2 → 8.0.1

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 (38) hide show
  1. package/dist/channel.d.ts +6 -0
  2. package/dist/channel.d.ts.map +1 -1
  3. package/dist/conversation-turn-dispatch.d.ts +6 -0
  4. package/dist/conversation-turn-dispatch.d.ts.map +1 -1
  5. package/dist/conversation-turn-dispatch.js +33 -4
  6. package/dist/conversation-turn-dispatch.js.map +1 -1
  7. package/dist/harness-tool-execution.js +3 -3
  8. package/dist/harness-tool-execution.js.map +1 -1
  9. package/dist/runtime-engine-base.d.ts.map +1 -1
  10. package/dist/runtime-engine-base.js +4 -0
  11. package/dist/runtime-engine-base.js.map +1 -1
  12. package/dist/runtime-engine-capabilities.d.ts.map +1 -1
  13. package/dist/runtime-engine-capabilities.js +2 -1
  14. package/dist/runtime-engine-capabilities.js.map +1 -1
  15. package/dist/runtime-types.d.ts +1 -1
  16. package/dist/runtime-types.d.ts.map +1 -1
  17. package/dist/sandbox-authored-tool-child.d.ts.map +1 -1
  18. package/dist/sandbox-authored-tool-child.js +3 -0
  19. package/dist/sandbox-authored-tool-child.js.map +1 -1
  20. package/dist/schedule-execution.d.ts +6 -0
  21. package/dist/schedule-execution.d.ts.map +1 -1
  22. package/dist/schedule-execution.js +19 -1
  23. package/dist/schedule-execution.js.map +1 -1
  24. package/dist/task-continuation.d.ts.map +1 -1
  25. package/dist/task-continuation.js +19 -9
  26. package/dist/task-continuation.js.map +1 -1
  27. package/dist/tool-apis.d.ts +1 -1
  28. package/dist/tool-apis.d.ts.map +1 -1
  29. package/dist/tool-apis.js +5 -4
  30. package/dist/tool-apis.js.map +1 -1
  31. package/dist/tool-execution.d.ts.map +1 -1
  32. package/dist/tool-execution.js +3 -1
  33. package/dist/tool-execution.js.map +1 -1
  34. package/dist/tool-http.d.ts +4 -0
  35. package/dist/tool-http.d.ts.map +1 -0
  36. package/dist/tool-http.js +39 -0
  37. package/dist/tool-http.js.map +1 -0
  38. package/package.json +3 -3
@@ -0,0 +1,39 @@
1
+ const REQUEST_FIELDS = new Set(["method", "headers", "body", "redirect"]);
2
+ /** Keep authority in the configured host fetch and cancellation in the tool runtime. */
3
+ export function createToolHttpFetch(fetchImpl, signal) {
4
+ return async (url, init = {}) => {
5
+ validateRequest(url, init);
6
+ signal?.throwIfAborted();
7
+ const response = await fetchImpl(url, { ...init, ...(signal ? { signal } : {}) });
8
+ signal?.throwIfAborted();
9
+ return response;
10
+ };
11
+ }
12
+ function validateRequest(url, init) {
13
+ if (typeof url !== "string" || !url.trim()) {
14
+ throw new TypeError("Tool HTTP requires a URL string; Request and URL objects cannot cross the sandbox bridge.");
15
+ }
16
+ if (!isPlainObject(init))
17
+ throw new TypeError("Tool HTTP request options must be a plain object.");
18
+ for (const key of Object.keys(init)) {
19
+ if (!REQUEST_FIELDS.has(key)) {
20
+ throw new TypeError(`Tool HTTP does not support request option ${key}. Deadlines and cancellation belong to the tool runtime; declare timeoutMs on the tool.`);
21
+ }
22
+ }
23
+ if (init.method !== undefined && typeof init.method !== "string")
24
+ throw new TypeError("Tool HTTP method must be a string.");
25
+ if (init.headers !== undefined && (!isPlainObject(init.headers) || Object.values(init.headers).some(value => typeof value !== "string"))) {
26
+ throw new TypeError("Tool HTTP headers must be a plain record of strings.");
27
+ }
28
+ if (init.body !== undefined && typeof init.body !== "string" && !(init.body instanceof Uint8Array)) {
29
+ throw new TypeError("Tool HTTP body must be a string or Uint8Array.");
30
+ }
31
+ if (init.redirect !== undefined && (typeof init.redirect !== "string" || !["follow", "error", "manual"].includes(init.redirect))) {
32
+ throw new TypeError("Tool HTTP redirect must be follow, error, or manual.");
33
+ }
34
+ }
35
+ function isPlainObject(value) {
36
+ return Boolean(value && typeof value === "object"
37
+ && [Object.prototype, null].includes(Object.getPrototypeOf(value)));
38
+ }
39
+ //# sourceMappingURL=tool-http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-http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exports": {
6
6
  ".": {
@@ -18,8 +18,8 @@
18
18
  "esbuild": "^0.28.1",
19
19
  "heic-decode": "^2.1.0",
20
20
  "jpeg-js": "^0.4.4",
21
- "@assemblyline-agents/core": "7.3.2",
22
- "@assemblyline-agents/pi": "7.3.2"
21
+ "@assemblyline-agents/core": "8.0.1",
22
+ "@assemblyline-agents/pi": "8.0.1"
23
23
  },
24
24
  "description": "Vendor-neutral, filesystem-first framework for durable AI agents.",
25
25
  "files": [