Compare commits
2 Commits
5eb0f28300
...
665b87c350
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
665b87c350 | ||
|
|
965bd34ade |
@@ -131,6 +131,7 @@ async function buildSystemPrompt(vfsRoot, googleAuthId) {
|
|||||||
'- Persistent per-company VFS. Paths are root-relative forward-slash (e.g. "labels/sheet1.png").',
|
'- Persistent per-company VFS. Paths are root-relative forward-slash (e.g. "labels/sheet1.png").',
|
||||||
'- Text: list with find_files, read with read_file, write with patch.',
|
'- Text: list with find_files, read with read_file, write with patch.',
|
||||||
'- User attachments are saved to VFS (e.g. "attachments/...") and tagged in user messages as `[ATTACHMENT name= path= type=]`. Inspect attachments with appropriate tools: `read_file` (text/csv/json), `pdf_read` (PDFs), or `analyze_image` (images).',
|
'- User attachments are saved to VFS (e.g. "attachments/...") and tagged in user messages as `[ATTACHMENT name= path= type=]`. Inspect attachments with appropriate tools: `read_file` (text/csv/json), `pdf_read` (PDFs), or `analyze_image` (images).',
|
||||||
|
'- Markdown links: Internet links are "https://..." or simply "hostname.com" / "hostname.com/filename". A pure relative path with no dotted hostname is always a VFS relative path (e.g. `[download](report.csv)` or ``).',
|
||||||
'',
|
'',
|
||||||
'SKILL FILES:',
|
'SKILL FILES:',
|
||||||
'- Reusable instruction docs: "<slug>.SKILL" at VFS root. First line is title, followed by markdown.',
|
'- Reusable instruction docs: "<slug>.SKILL" at VFS root. First line is title, followed by markdown.',
|
||||||
|
|||||||
@@ -122,11 +122,11 @@ export function createJavascriptExecuteTool({ googleAuthId }) {
|
|||||||
return defineTool({
|
return defineTool({
|
||||||
name: 'javascript_execute',
|
name: 'javascript_execute',
|
||||||
description:
|
description:
|
||||||
'Execute JS in isolated Node worker sandbox. Assign `module.exports` to return value (sync value or Promise; no bare top-level await — wrap async in IIFE: `module.exports = (async () => { ... })()`). ' +
|
'Execute JS in isolated worker sandbox. Assign `module.exports` to return value (sync value or Promise; wrap async in IIFE: `module.exports = (async () => { ... })()`). ' +
|
||||||
'REST API: `await fetch("/path")` (authenticated). ' +
|
'REST API: `await fetch("/path")` (authenticated). ' +
|
||||||
'VFS: `fs.readFileSync`/`writeFileSync` for binary artifacts/buffers/images (`image/` is read-only). ' +
|
'VFS: directly use global `fs.readFileSync`/`writeFileSync` for binary artifacts/buffers/images (`image/` is read-only; paths must be relative paths, root is not allowed). ' +
|
||||||
'Embed generated images in markdown: ``. Use find_files/read_file/patch for text. ' +
|
'Embed generated images/links in markdown: ``. Internet links use `https://...` or `hostname.com`/`hostname.com/filename`; a pure relative file with no dotted hostname is always a VFS relative path. Use find_files/read_file/patch for text. ' +
|
||||||
'Globals: `fs`/`vfs`, `sharp`, WebCrypto `crypto` (`subtle`, `randomUUID`), web standard globals. Node built-ins unavailable (`require` fails).',
|
'All APIs are pre-injected globals: `fs`/`vfs` (virtual filesystem), `sharp` (image processing), WebCrypto `crypto` (`subtle`, `randomUUID`), and standard web globals. Do NOT use `require()` or `import` (disabled; all necessary APIs are already in global scope).',
|
||||||
strict: false,
|
strict: false,
|
||||||
parameters: {
|
parameters: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
@@ -135,7 +135,7 @@ export function createJavascriptExecuteTool({ googleAuthId }) {
|
|||||||
properties: {
|
properties: {
|
||||||
code: {
|
code: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
description: 'CommonJS JS code. Assign result to `module.exports`. Async code must use IIFE.',
|
description: 'JavaScript code. Assign result to `module.exports`. Async code must use IIFE. Do not use require() or import.',
|
||||||
},
|
},
|
||||||
timeout: {
|
timeout: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
|||||||
Reference in New Issue
Block a user