@molecule/api-ai-tools 1.4.1 → 1.4.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/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -7
- package/package.json +1 -1
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAoB9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AA+BnE;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAoB9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AA+BnE;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,MAAM,EAAE,CAqzCxF"}
|
package/dist/tools.js
CHANGED
|
@@ -968,11 +968,11 @@ export function buildTools(backend, config) {
|
|
|
968
968
|
? `This command asks for ${declaredSeconds}s, more than this tool's ${ceilingSeconds}s, and its ` +
|
|
969
969
|
'output only appears when it ends — so it was started in the background instead. '
|
|
970
970
|
: '') +
|
|
971
|
-
`Started in the background. Its output is
|
|
972
|
-
`
|
|
973
|
-
`
|
|
974
|
-
`you need this result before you can continue, call wait_for_task
|
|
975
|
-
`never sleep and read the log by hand.`,
|
|
971
|
+
`Started in the background. Its output is written to ${log} and comes back as the ` +
|
|
972
|
+
`stdout of wait_for_task when the command finishes (read_file cannot reach /tmp — ` +
|
|
973
|
+
`to peek mid-run, exec_command: tail ${log}). If you have other work, do it and ` +
|
|
974
|
+
`check back. If you need this result before you can continue, call wait_for_task ` +
|
|
975
|
+
`with this taskId — never sleep and read the log by hand.`,
|
|
976
976
|
};
|
|
977
977
|
}
|
|
978
978
|
catch (e) {
|
|
@@ -1153,7 +1153,8 @@ export function buildTools(backend, config) {
|
|
|
1153
1153
|
status: 'stuck',
|
|
1154
1154
|
waitedMs: waitedBefore + waitedMs,
|
|
1155
1155
|
note: `${Math.round((waitedBefore + waitedMs) / 1000)}s of waiting and it has not exited — it is ` +
|
|
1156
|
-
`stuck, not slow.
|
|
1156
|
+
`stuck, not slow. See what it printed with exec_command (tail /tmp/${taskId}.log — ` +
|
|
1157
|
+
`read_file cannot reach /tmp), kill it (exec_command: ` +
|
|
1157
1158
|
`kill $(cat /tmp/${taskId}.pid) 2>/dev/null; pkill -f ${taskId}.sh) and move on; do not wait on it again.`,
|
|
1158
1159
|
};
|
|
1159
1160
|
}
|
|
@@ -1162,7 +1163,8 @@ export function buildTools(backend, config) {
|
|
|
1162
1163
|
status: 'running',
|
|
1163
1164
|
waitedMs,
|
|
1164
1165
|
note: `Still running after ${Math.round(waitedMs / 1000)}s. Call wait_for_task again to ` +
|
|
1165
|
-
`keep waiting
|
|
1166
|
+
`keep waiting — its result carries the log output. To peek at the output so far, ` +
|
|
1167
|
+
`exec_command: tail ${log} (read_file cannot reach /tmp).`,
|
|
1166
1168
|
};
|
|
1167
1169
|
}
|
|
1168
1170
|
let output;
|