stitchkit 0.103.11 → 0.103.12

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 (48) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
  3. package/dist/agent-runtime/sandbox-process-owner.d.ts +1 -1
  4. package/dist/agent-runtime/sandbox-process-owner.d.ts.map +1 -1
  5. package/dist/durability/json.d.ts.map +1 -1
  6. package/dist/entrypoints/agent-runtime/coding-tools.js +2 -2
  7. package/dist/entrypoints/agent-runtime/harness.js +2 -2
  8. package/dist/entrypoints/agent-runtime/sandbox.js +20 -16
  9. package/dist/entrypoints/agent-runtime.js +2 -2
  10. package/dist/entrypoints/application/diagnostic-journal.js +1 -1
  11. package/dist/entrypoints/files.js +1 -1
  12. package/dist/entrypoints/primitives.js +4 -3
  13. package/dist/entrypoints/process.js +1 -1
  14. package/dist/entrypoints/tools.js +1 -1
  15. package/dist/{index-ary5s7k0.js → index-69nvze1q.js} +1 -2
  16. package/dist/{index-g4jxe7ve.js → index-806d5phm.js} +3 -2
  17. package/dist/{index-32jkwkdm.js → index-f330qqyg.js} +253 -165
  18. package/dist/index-fm1c1a08.js +138 -0
  19. package/dist/{index-ttf0y7b8.js → index-xvdd2rbb.js} +37 -18
  20. package/dist/{index-9jb61j5a.js → index-zp4jpkp0.js} +1 -1
  21. package/dist/internal/exclusive-lock.d.ts +1 -1
  22. package/dist/internal/exclusive-lock.d.ts.map +1 -1
  23. package/dist/internal/json-data.d.ts +8 -2
  24. package/dist/internal/json-data.d.ts.map +1 -1
  25. package/dist/internal/json-string-size.d.ts +3 -0
  26. package/dist/internal/json-string-size.d.ts.map +1 -0
  27. package/dist/primitives/canonical-json.d.ts.map +1 -1
  28. package/dist/process/cleanup.d.ts +12 -0
  29. package/dist/process/cleanup.d.ts.map +1 -0
  30. package/dist/process/command-lifetime.d.ts +19 -0
  31. package/dist/process/command-lifetime.d.ts.map +1 -0
  32. package/dist/process/command-owner.d.ts +0 -3
  33. package/dist/process/command-owner.d.ts.map +1 -1
  34. package/dist/process/group.d.ts.map +1 -1
  35. package/dist/process/launch.d.ts +15 -6
  36. package/dist/process/launch.d.ts.map +1 -1
  37. package/dist/process/owned-child.d.ts +10 -0
  38. package/dist/process/owned-child.d.ts.map +1 -0
  39. package/dist/process/start-failure.d.ts +2 -5
  40. package/dist/process/start-failure.d.ts.map +1 -1
  41. package/dist/process/transport.d.ts +30 -0
  42. package/dist/process/transport.d.ts.map +1 -0
  43. package/llms/agent-runtime-sandbox.txt +9 -1
  44. package/llms/process.txt +29 -4
  45. package/llms-full.txt +38 -5
  46. package/llms.txt +2 -2
  47. package/package.json +1 -1
  48. package/dist/index-c1jmtxa0.js +0 -74
@@ -1,74 +0,0 @@
1
- // src/internal/json-data.ts
2
- function isJsonData(value, limits) {
3
- const ancestors = new Set;
4
- let nodes = 0;
5
- let bytes = 0;
6
- const charge = (amount) => {
7
- bytes += amount;
8
- return bytes <= limits.maxBytes;
9
- };
10
- const textSize = (text) => {
11
- if (text.length > limits.maxBytes)
12
- return limits.maxBytes + 1;
13
- return new TextEncoder().encode(JSON.stringify(text)).byteLength;
14
- };
15
- const visit = (item, depth) => {
16
- if (++nodes > limits.maxNodes || depth > limits.maxDepth)
17
- return false;
18
- if (item === null)
19
- return charge(4);
20
- if (typeof item === "string")
21
- return charge(textSize(item));
22
- if (typeof item === "boolean")
23
- return charge(item ? 4 : 5);
24
- if (typeof item === "number")
25
- return Number.isFinite(item) && !Object.is(item, -0) && charge(String(item).length);
26
- if (typeof item !== "object" || ancestors.has(item))
27
- return false;
28
- const array = Array.isArray(item);
29
- const prototype = Object.getPrototypeOf(item);
30
- if (array ? prototype !== Array.prototype : prototype !== Object.prototype && prototype !== null)
31
- return false;
32
- if (array && item.length > limits.maxNodes - nodes)
33
- return false;
34
- const keys = Reflect.ownKeys(item);
35
- if (keys.length > limits.maxNodes - nodes + (array ? 1 : 0))
36
- return false;
37
- if (array && keys.length !== item.length + 1)
38
- return false;
39
- ancestors.add(item);
40
- try {
41
- if (!charge(2))
42
- return false;
43
- let members = 0;
44
- for (const key of keys) {
45
- if (array && key === "length")
46
- continue;
47
- if (typeof key !== "string")
48
- return false;
49
- if (array && (!/^(0|[1-9][0-9]*)$/.test(key) || Number(key) >= item.length))
50
- return false;
51
- const descriptor = Object.getOwnPropertyDescriptor(item, key);
52
- if (!descriptor?.enumerable || !("value" in descriptor))
53
- return false;
54
- if (!array && limits.omitObjectUndefined && descriptor.value === undefined) {
55
- if (++nodes > limits.maxNodes)
56
- return false;
57
- continue;
58
- }
59
- if (members++ > 0 && !charge(1))
60
- return false;
61
- if (!array && !charge(textSize(key) + 1))
62
- return false;
63
- if (!visit(descriptor.value, depth + 1))
64
- return false;
65
- }
66
- return true;
67
- } finally {
68
- ancestors.delete(item);
69
- }
70
- };
71
- return visit(value, 0);
72
- }
73
-
74
- export { isJsonData };