toolcraft 0.0.383 → 0.0.384

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
@@ -98,8 +98,10 @@ provider and effective limits as `ctx.regex.executor` and `ctx.regex.limits`.
98
98
  safe-bash exports; missing regex never gains a native JavaScript fallback. Native
99
99
  handlers can use `signal`, byte `stdin`/`stdout`/`stderr`, `cwd`, `inputBudget`,
100
100
  `invoke` and `registerCleanup`. Dry-run readback uses an explicitly supplied mock
101
- or overlay filesystem. Library services combine with invocation services; runtime
102
- capability names are reserved and cannot be replaced through services.
101
+ or overlay filesystem. Library services combine with invocation services, with
102
+ invocation-owned services taking precedence on name collisions. Runtime capability
103
+ names are reserved and cannot be replaced through services. Explicitly revoking
104
+ `humanInLoop` also disables a library-configured approval provider.
103
105
  Schema pattern validation currently follows Toolcraft's existing validator.
104
106
 
105
107
  ## What the owner decides
package/composition.json CHANGED
@@ -113,7 +113,7 @@
113
113
  },
114
114
  {
115
115
  "name": "toolcraft",
116
- "version": "0.0.383",
116
+ "version": "0.0.384",
117
117
  "license": "MIT"
118
118
  },
119
119
  {
@@ -123,7 +123,7 @@
123
123
  },
124
124
  {
125
125
  "name": "toolcraft-schema",
126
- "version": "0.0.383",
126
+ "version": "0.0.384",
127
127
  "license": "MIT"
128
128
  },
129
129
  {
@@ -113,7 +113,7 @@
113
113
  },
114
114
  {
115
115
  "name": "toolcraft",
116
- "version": "0.0.383",
116
+ "version": "0.0.384",
117
117
  "license": "MIT"
118
118
  },
119
119
  {
@@ -123,7 +123,7 @@
123
123
  },
124
124
  {
125
125
  "name": "toolcraft-schema",
126
- "version": "0.0.383",
126
+ "version": "0.0.384",
127
127
  "license": "MIT"
128
128
  },
129
129
  {
@@ -17,7 +17,7 @@ export interface ToolcraftInvocation<TServices extends object = Record<string, n
17
17
  signal: AbortSignal;
18
18
  services?: TServices;
19
19
  fetch?: typeof globalThis.fetch;
20
- humanInLoop?: HumanInLoopRuntime;
20
+ humanInLoop?: HumanInLoopRuntime | undefined;
21
21
  }
22
22
  declare module "./index.js" {
23
23
  interface HandlerInvocationCapabilities {
package/dist/safe-bash.js CHANGED
@@ -106,7 +106,7 @@ export function createToolcraftCommandExecutor(library, options = {}) {
106
106
  let root;
107
107
  try {
108
108
  const configuredServices = typeof options.services === "function" ? options.services(invocation) : options.services;
109
- services = { ...invocation.services, ...configuredServices };
109
+ services = { ...configuredServices, ...invocation.services };
110
110
  const rootName = multiple ? argv[0] : roots[0]?.name;
111
111
  const selectedRoot = multiple ? roots.find(candidate => candidate.name === rootName || candidate.aliases.includes(rootName ?? "")) : roots[0];
112
112
  if (!selectedRoot)
@@ -152,7 +152,7 @@ export function createToolcraftCommandExecutor(library, options = {}) {
152
152
  env: { ...invocation.env },
153
153
  fs: handlerFileSystem(invocation),
154
154
  fetch: invocation.fetch ?? deniedFetch,
155
- humanInLoop: invocation.humanInLoop ?? options.humanInLoop,
155
+ humanInLoop: Object.prototype.hasOwnProperty.call(invocation, "humanInLoop") ? invocation.humanInLoop : options.humanInLoop,
156
156
  controls: { output: true, yes: true, ...options.controls },
157
157
  errorReports: false,
158
158
  outputEmitter: entry => runtime.write(`${entry}\n`)
@@ -184,7 +184,7 @@ export function toolcraftCommands(library, options = {}) {
184
184
  services: capabilities?.services,
185
185
  fetch: capabilities?.fetch,
186
186
  regex: capabilities?.regex,
187
- humanInLoop: capabilities?.humanInLoop
187
+ ...(Object.prototype.hasOwnProperty.call(capabilities ?? {}, "humanInLoop") ? { humanInLoop: capabilities?.humanInLoop } : {})
188
188
  });
189
189
  }
190
190
  });
@@ -8,7 +8,7 @@
8
8
  },
9
9
  {
10
10
  "name": "toolcraft-schema",
11
- "version": "0.0.383",
11
+ "version": "0.0.384",
12
12
  "license": "MIT"
13
13
  }
14
14
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-schema",
3
- "version": "0.0.383",
3
+ "version": "0.0.384",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft",
3
- "version": "0.0.383",
3
+ "version": "0.0.384",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -162,7 +162,7 @@
162
162
  "yaml"
163
163
  ],
164
164
  "optionalDependencies": {
165
- "toolcraft-schema": "0.0.383",
165
+ "toolcraft-schema": "0.0.384",
166
166
  "toolcraft-design": "*",
167
167
  "@poe-code/frontmatter": "*",
168
168
  "@poe-code/agent-mcp-config": "*",