@asterism-app/builtin-api 0.25.0 → 0.25.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.
- package/package.json +1 -1
- package/src/peek.ts +1 -1
- package/src/search.ts +4 -3
- package/src/tools.ts +2 -1
package/package.json
CHANGED
package/src/peek.ts
CHANGED
|
@@ -27,5 +27,5 @@ export const peekResultSchema = z.strictObject({
|
|
|
27
27
|
export type PeekResult = z.infer<typeof peekResultSchema>;
|
|
28
28
|
|
|
29
29
|
export function peekToModel(data: PeekResult): string {
|
|
30
|
-
return
|
|
30
|
+
return data.report;
|
|
31
31
|
}
|
package/src/search.ts
CHANGED
|
@@ -14,11 +14,12 @@ const globGuidelines = [
|
|
|
14
14
|
export const Find = defineTool({
|
|
15
15
|
id: builtin.name("tool.find"), name: "find",
|
|
16
16
|
description: "Find files by glob pattern within a resource.",
|
|
17
|
-
guidelines:
|
|
17
|
+
guidelines: [
|
|
18
|
+
...globGuidelines,
|
|
19
|
+
"target selects the search scope and resource-specific file filtering according to the resource implementation's schema.",
|
|
20
|
+
],
|
|
18
21
|
argsSchema: z.strictObject({
|
|
19
22
|
pattern: pattern.describe("File glob relative to the selected search directory, using '/' separators; for example '**/*.ts' or '**/package.json'."),
|
|
20
|
-
hidden: z.boolean().optional().describe("Disable hidden-entry filtering; defaults to false. Ignore-file filtering is controlled separately by noIgnore."),
|
|
21
|
-
noIgnore: z.boolean().optional().describe("Disable ignore-file filtering; defaults to false. Hidden-entry filtering is controlled separately by hidden."),
|
|
22
23
|
...selection,
|
|
23
24
|
}).describe("A file glob and search selection options."),
|
|
24
25
|
});
|
package/src/tools.ts
CHANGED
|
@@ -51,10 +51,11 @@ export const Edit = defineTool({
|
|
|
51
51
|
"insert_before/insert_after preserve the anchor line. body contains the new lines.",
|
|
52
52
|
"append/prepend take body. Each body item is one text line; an empty string represents a blank line.",
|
|
53
53
|
"All operations refer to the same pre-edit content and commit as one batch. Anchor or overlap failures preserve the original text.",
|
|
54
|
+
"Replace/delete ranges conflict when they share original lines. Insertions can share range boundaries; an insertion strictly inside a replaced or deleted range conflicts. Insertions at the same original gap appear in edits array order.",
|
|
54
55
|
"Anchor mismatch results include current-line or shifted candidates. Successful results include the actual diff and fresh anchors.",
|
|
55
56
|
],
|
|
56
57
|
argsSchema: z.strictObject({
|
|
57
|
-
edits: z.array(editOperationSchema).min(1).max(500).describe("One to 500
|
|
58
|
+
edits: z.array(editOperationSchema).min(1).max(500).describe("One to 500 hashline operations referring to the same current text. Replace/delete ranges have no shared lines; insertions may share boundaries and use array order at the same gap."),
|
|
58
59
|
}).describe("A complete batch of line-based edit operations. The target is selected separately."),
|
|
59
60
|
});
|
|
60
61
|
|