@trim21/personal-pi-extensions 0.1.698 → 0.1.699
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/codemode/tool.ts +6 -3
package/package.json
CHANGED
package/src/codemode/tool.ts
CHANGED
|
@@ -107,9 +107,12 @@ function buildDescription(tools: readonly CallableTool[]): string {
|
|
|
107
107
|
"- Call tools with `await call(name, args)`. Arguments and results make a JSON round trip,",
|
|
108
108
|
" and a failing tool rejects with a `CallFailedError` you can catch.",
|
|
109
109
|
"- Only what the script passes to `text(value)` / `console.log(...)` and its `return` value enter",
|
|
110
|
-
" this conversation; nested calls and their results stay out of it.",
|
|
111
|
-
"
|
|
112
|
-
"
|
|
110
|
+
" this conversation; nested calls and their results stay out of it. Print what the next step needs,",
|
|
111
|
+
" nothing else.",
|
|
112
|
+
"- Every `call` overload below declares that tool's return shape: read it, then project just the",
|
|
113
|
+
" fields you need into `text(value)` / `return` — e.g. `text(result.items.map((item) => item.title))`.",
|
|
114
|
+
"- Do not stringify whole results (`JSON.stringify(result)`) or print every field the tool happened to",
|
|
115
|
+
" return: urls, ids and metadata you will not use cost context and buy nothing.",
|
|
113
116
|
"- `store.set(key, value)`, `store.get(key)` and `store.list()` are a small key/value store that",
|
|
114
117
|
" persists across codemode calls in this session; `store.set(key, undefined)` removes a key.",
|
|
115
118
|
"- The sandbox has no file system, network, timers or Node APIs: calling tools is its only",
|