@warlock.js/ai-workspace 4.8.1 → 4.9.0

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 (67) hide show
  1. package/cjs/index.cjs +14 -14
  2. package/cjs/index.cjs.map +1 -1
  3. package/esm/backends/local.d.mts +1 -1
  4. package/esm/backends/local.d.mts.map +1 -1
  5. package/esm/backends/local.mjs +1 -1
  6. package/esm/backends/local.mjs.map +1 -1
  7. package/esm/backends/mock.d.mts +1 -1
  8. package/esm/backends/mock.d.mts.map +1 -1
  9. package/esm/backends/mock.mjs +1 -1
  10. package/esm/backends/mock.mjs.map +1 -1
  11. package/esm/contracts/tool-io.type.d.mts +1 -1
  12. package/esm/contracts/tool-io.type.d.mts.map +1 -1
  13. package/esm/contracts/workspace-backend.contract.d.mts +1 -1
  14. package/esm/contracts/workspace-backend.contract.d.mts.map +1 -1
  15. package/esm/contracts/workspace-ops.contract.d.mts +1 -1
  16. package/esm/contracts/workspace-ops.contract.d.mts.map +1 -1
  17. package/esm/contracts/workspace-policy.type.d.mts +1 -1
  18. package/esm/contracts/workspace-policy.type.d.mts.map +1 -1
  19. package/esm/contracts/workspace.contract.d.mts +1 -1
  20. package/esm/contracts/workspace.contract.d.mts.map +1 -1
  21. package/esm/errors.d.mts +1 -1
  22. package/esm/errors.d.mts.map +1 -1
  23. package/esm/errors.mjs +1 -1
  24. package/esm/errors.mjs.map +1 -1
  25. package/esm/ops.d.mts +1 -1
  26. package/esm/ops.d.mts.map +1 -1
  27. package/esm/ops.mjs +1 -1
  28. package/esm/ops.mjs.map +1 -1
  29. package/esm/policy/policy.d.mts +1 -1
  30. package/esm/policy/policy.d.mts.map +1 -1
  31. package/esm/policy/policy.mjs +1 -1
  32. package/esm/policy/policy.mjs.map +1 -1
  33. package/esm/tools/edit-file.d.mts +1 -1
  34. package/esm/tools/edit-file.d.mts.map +1 -1
  35. package/esm/tools/edit-file.mjs +1 -1
  36. package/esm/tools/edit-file.mjs.map +1 -1
  37. package/esm/tools/glob.d.mts +1 -1
  38. package/esm/tools/glob.d.mts.map +1 -1
  39. package/esm/tools/glob.mjs +1 -1
  40. package/esm/tools/glob.mjs.map +1 -1
  41. package/esm/tools/grep.d.mts +1 -1
  42. package/esm/tools/grep.d.mts.map +1 -1
  43. package/esm/tools/grep.mjs +1 -1
  44. package/esm/tools/grep.mjs.map +1 -1
  45. package/esm/tools/read-file.d.mts +1 -1
  46. package/esm/tools/read-file.d.mts.map +1 -1
  47. package/esm/tools/read-file.mjs +1 -1
  48. package/esm/tools/read-file.mjs.map +1 -1
  49. package/esm/tools/run-shell.d.mts +1 -1
  50. package/esm/tools/run-shell.d.mts.map +1 -1
  51. package/esm/tools/run-shell.mjs +1 -1
  52. package/esm/tools/run-shell.mjs.map +1 -1
  53. package/esm/tools/run-tests.d.mts +1 -1
  54. package/esm/tools/run-tests.d.mts.map +1 -1
  55. package/esm/tools/run-tests.mjs +1 -1
  56. package/esm/tools/run-tests.mjs.map +1 -1
  57. package/esm/tools/schema.mjs +1 -1
  58. package/esm/tools/schema.mjs.map +1 -1
  59. package/esm/tools/write-file.d.mts +1 -1
  60. package/esm/tools/write-file.d.mts.map +1 -1
  61. package/esm/tools/write-file.mjs +1 -1
  62. package/esm/tools/write-file.mjs.map +1 -1
  63. package/esm/workspace.d.mts +1 -1
  64. package/esm/workspace.d.mts.map +1 -1
  65. package/esm/workspace.mjs +1 -1
  66. package/esm/workspace.mjs.map +1 -1
  67. package/package.json +3 -3
package/cjs/index.cjs CHANGED
@@ -34,7 +34,7 @@ let _warlock_js_fs = require("@warlock.js/fs");
34
34
  let node_child_process = require("node:child_process");
35
35
  let node_process = require("node:process");
36
36
 
37
- //#region ../@warlock.js/ai-workspace/src/errors.ts
37
+ //#region ../ai-workspace/src/errors.ts
38
38
  /**
39
39
  * The workspace policy engine refused an operation — a path escaped the
40
40
  * jail (or hit a deny glob), or a shell command's executable was not
@@ -88,7 +88,7 @@ var WorkspaceEditError = class extends _warlock_js_ai.AIError {
88
88
  };
89
89
 
90
90
  //#endregion
91
- //#region ../@warlock.js/ai-workspace/src/policy/policy.ts
91
+ //#region ../ai-workspace/src/policy/policy.ts
92
92
  /**
93
93
  * Resolve the canonical absolute form of `target`, collapsing any
94
94
  * symlinks. `target` may not yet exist (a fresh `writeFile`/`mkdir`),
@@ -266,7 +266,7 @@ function buildEnv(policy) {
266
266
  }
267
267
 
268
268
  //#endregion
269
- //#region ../@warlock.js/ai-workspace/src/ops.ts
269
+ //#region ../ai-workspace/src/ops.ts
270
270
  /** Default line window a read returns when the policy sets no `defaultLines`. */
271
271
  const DEFAULT_READ_LINES = 2e3;
272
272
  /** Hard ceiling on grep matches returned, so a broad pattern can't flood. */
@@ -553,7 +553,7 @@ function createOps(backend, policy) {
553
553
  }
554
554
 
555
555
  //#endregion
556
- //#region ../@warlock.js/ai-workspace/src/backends/local.ts
556
+ //#region ../ai-workspace/src/backends/local.ts
557
557
  /**
558
558
  * Hard ceiling on captured `stdout`/`stderr` per stream, in bytes. The raw
559
559
  * executor truncates each stream once this many bytes have accumulated so a
@@ -754,7 +754,7 @@ function createLocalBackend() {
754
754
  }
755
755
 
756
756
  //#endregion
757
- //#region ../@warlock.js/ai-workspace/src/backends/mock.ts
757
+ //#region ../ai-workspace/src/backends/mock.ts
758
758
  /**
759
759
  * Normalize an absolute path to a stable in-memory key: forward slashes,
760
760
  * collapsed duplicate separators, and resolved `.` / `..` segments. There
@@ -919,7 +919,7 @@ function isMockBackendSeed(seed) {
919
919
  }
920
920
 
921
921
  //#endregion
922
- //#region ../@warlock.js/ai-workspace/src/tools/schema.ts
922
+ //#region ../ai-workspace/src/tools/schema.ts
923
923
  /**
924
924
  * Tiny, dependency-free [Standard Schema](https://standardschema.dev)
925
925
  * builders for the workspace tools' input validation. The package pins
@@ -1028,7 +1028,7 @@ function objectSchema(shape) {
1028
1028
  }
1029
1029
 
1030
1030
  //#endregion
1031
- //#region ../@warlock.js/ai-workspace/src/tools/edit-file.ts
1031
+ //#region ../ai-workspace/src/tools/edit-file.ts
1032
1032
  /** Default tool name exposed to the LLM. */
1033
1033
  const DEFAULT_NAME$2 = "edit_file";
1034
1034
  /** Input schema for the `edit_file` tool. */
@@ -1080,7 +1080,7 @@ function makeEditFileTool(ops, options) {
1080
1080
  }
1081
1081
 
1082
1082
  //#endregion
1083
- //#region ../@warlock.js/ai-workspace/src/tools/glob.ts
1083
+ //#region ../ai-workspace/src/tools/glob.ts
1084
1084
  /**
1085
1085
  * Standard Schema for {@link GlobInput} — a single required `pattern`
1086
1086
  * string. Built on the package's shared, dependency-free schema builders
@@ -1120,7 +1120,7 @@ function makeGlobTool(ops, options) {
1120
1120
  }
1121
1121
 
1122
1122
  //#endregion
1123
- //#region ../@warlock.js/ai-workspace/src/tools/grep.ts
1123
+ //#region ../ai-workspace/src/tools/grep.ts
1124
1124
  /**
1125
1125
  * Standard Schema for {@link GrepInput} — `pattern` is a required string;
1126
1126
  * `glob` and `ignoreCase` are optional. Built on the package's shared,
@@ -1166,7 +1166,7 @@ function makeGrepTool(ops, options) {
1166
1166
  }
1167
1167
 
1168
1168
  //#endregion
1169
- //#region ../@warlock.js/ai-workspace/src/tools/read-file.ts
1169
+ //#region ../ai-workspace/src/tools/read-file.ts
1170
1170
  /** Default tool name exposed to the LLM. */
1171
1171
  const DEFAULT_NAME$1 = "read_file";
1172
1172
  /** Input schema for the `read_file` tool. */
@@ -1225,7 +1225,7 @@ function makeReadFileTool(ops, options) {
1225
1225
  }
1226
1226
 
1227
1227
  //#endregion
1228
- //#region ../@warlock.js/ai-workspace/src/tools/run-shell.ts
1228
+ //#region ../ai-workspace/src/tools/run-shell.ts
1229
1229
  /** The default tool name `run_shell` is exposed to the LLM under. */
1230
1230
  const DEFAULT_RUN_SHELL_TOOL_NAME = "run_shell";
1231
1231
  /**
@@ -1286,7 +1286,7 @@ function makeRunShellTool(ops, options) {
1286
1286
  }
1287
1287
 
1288
1288
  //#endregion
1289
- //#region ../@warlock.js/ai-workspace/src/tools/run-tests.ts
1289
+ //#region ../ai-workspace/src/tools/run-tests.ts
1290
1290
  /** The default tool name `run_tests` is exposed to the LLM under. */
1291
1291
  const DEFAULT_RUN_TESTS_TOOL_NAME = "run_tests";
1292
1292
  /** The default command run when no `command` override is configured. */
@@ -1349,7 +1349,7 @@ function makeRunTestsTool(ops, options) {
1349
1349
  }
1350
1350
 
1351
1351
  //#endregion
1352
- //#region ../@warlock.js/ai-workspace/src/tools/write-file.ts
1352
+ //#region ../ai-workspace/src/tools/write-file.ts
1353
1353
  /** Default tool name exposed to the LLM. */
1354
1354
  const DEFAULT_NAME = "write_file";
1355
1355
  /** Input schema for the `write_file` tool. */
@@ -1396,7 +1396,7 @@ function makeWriteFileTool(ops, options) {
1396
1396
  }
1397
1397
 
1398
1398
  //#endregion
1399
- //#region ../@warlock.js/ai-workspace/src/workspace.ts
1399
+ //#region ../ai-workspace/src/workspace.ts
1400
1400
  /**
1401
1401
  * The full set of tool names a writable workspace vends, in a stable
1402
1402
  * canonical order so `tools.all()` is deterministic.