@asterism-app/builtin-api 0.25.0 → 0.25.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asterism-app/builtin-api",
3
- "version": "0.25.0",
3
+ "version": "0.25.2",
4
4
  "description": "Public domain contracts and extensions for Asterism built-in features",
5
5
  "license": "MIT",
6
6
  "author": "Chien Zhang",
package/src/peek.ts CHANGED
@@ -4,10 +4,10 @@ import { builtin } from "./identity.ts";
4
4
 
5
5
  export const Peek = defineTool({
6
6
  id: builtin.name("tool.peek"), name: "peek",
7
- description: "Investigate an Agent's saved timeline records and return a focused report using the utility model.",
7
+ description: "Investigate an Agent's saved timeline records and return a concise summary or explanation using the utility model.",
8
8
  guidelines: [
9
9
  "target selects an Agent according to the resource implementation's schema.",
10
- "question describes the information to locate and includes context for follow-up questions.",
10
+ "question describes what to summarize or explain and includes context for follow-up questions.",
11
11
  "Each call reads a fresh, fixed snapshot of the selected Agent's current timeline, including records preceding context compression.",
12
12
  "includeThinking admits saved readable thinking into the investigation; its default is false.",
13
13
  ],
@@ -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 `Snapshot: ${data.snapshot.capturedAt}; timeline position: ${data.snapshot.nodeId ?? "origin"}.\n${data.report}`;
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: globGuidelines,
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 non-overlapping hashline operations, all referring to the same current text."),
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