@aexhq/tool-edit 0.0.0 → 6.1.4
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 +18 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +9 -0
- package/dist/runtime/edit.mjs +14560 -0
- package/dist/runtime/registry.json +55 -0
- package/dist/schema.d.ts +10 -0
- package/dist/schema.js +3 -0
- package/package.json +37 -11
- package/index.js +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# @aexhq/tool-edit
|
|
2
|
+
|
|
3
|
+
Replace one exact occurrence of text in an Environment workspace file.
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
import { environment } from "@aexhq/brain";
|
|
7
|
+
import { edit } from "@aexhq/tool-edit";
|
|
8
|
+
|
|
9
|
+
const workspace = environment({ url: () => process.env.ENVIRONMENT_URL })({ name: "workspace" });
|
|
10
|
+
const tools = [edit({ env: workspace })];
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires a writable workspace. The chosen Environment prepares and executes the
|
|
14
|
+
packaged Node 22 runtime in `dist/runtime/edit.mjs`; `dist/runtime/registry.json`
|
|
15
|
+
contains its manifest and contract digest. The Environment owns isolation and resource grants.
|
|
16
|
+
The factory requires an explicit `env` and accepts no other options.
|
|
17
|
+
|
|
18
|
+
Run `npm test --workspace @aexhq/tool-edit` from the repository root.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const edit: (placement: {
|
|
2
|
+
readonly env: import("@aexhq/brain").Environment;
|
|
3
|
+
} & Record<never, never>) => import("@aexhq/brain").PlacedTool<{
|
|
4
|
+
path: string;
|
|
5
|
+
old_text: string;
|
|
6
|
+
new_text: string;
|
|
7
|
+
}, {
|
|
8
|
+
path: string;
|
|
9
|
+
replacements: 1;
|
|
10
|
+
}>;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { tool } from "@aexhq/brain";
|
|
2
|
+
import { inputSchema, outputSchema } from "./schema.js";
|
|
3
|
+
export const edit = tool({
|
|
4
|
+
name: "edit",
|
|
5
|
+
description: "Replace one exact occurrence of text in an Environment workspace file.",
|
|
6
|
+
input: inputSchema,
|
|
7
|
+
output: outputSchema,
|
|
8
|
+
implementation: Object.freeze({ type: "aex_official_tool", version: 1, name: "edit" }),
|
|
9
|
+
});
|