@kana-ai/edgar-ext-tinyfish 0.1.1 → 0.1.3
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/README.md +1 -1
- package/dist/src/schemas/config.js +10 -2
- package/dist/src/tools/agent.js +3 -0
- package/edgar-extension.json +4 -2
- package/package.json +3 -3
- package/schemas/config.json +2 -0
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ The TinyFish extension of EDGAR. It runs a TinyFish web agent on a goal in plain
|
|
|
17
17
|
- `run` waits for the end of the run. Use it for a goal that takes less than about a minute. A run that ends `FAILED` returns a failure (see [Errors](#errors)).
|
|
18
18
|
- `timeout_seconds` sets TinyFish's `max_duration_seconds`. When the limit comes, the agent takes one more step to write up what it has, and then ends the run `COMPLETED` with partial data.
|
|
19
19
|
- If the stage's own `timeout_seconds` comes first, the engine ends the call. The TinyFish run continues to its own limit and costs money, because TinyFish cannot cancel a run that `run` started. For a long goal, use `start_run`, then `run_state` in a wait, and `cancel_run` when you stop.
|
|
20
|
-
- `run`, `start_run` and `step_screenshot` read and act on outside websites. `run` and `
|
|
20
|
+
- `run`, `start_run` and `step_screenshot` read and act on outside websites. `run`, `start_run` and `cancel_run` are side effects with no undo: `cancel_run` stops a run, but it does not take back its steps, and a cancelled run does not start again. A dry run holds them back, and `edgar extensions approve` lists them.
|
|
21
21
|
- `run_state` gets the run without its screenshots and HTML. Each step has `id`, `status` and `action`. Just after `cancel_run`, `run_state` can show `RUNNING` for some seconds.
|
|
22
22
|
- `step_screenshot` downloads the JPEG of one step to make sure that it exists, and returns its size and its API URL. The URL needs the TinyFish key in `X-API-Key` to open. A tool output carries JSON only, so the image itself does not travel.
|
|
23
23
|
- `search` reads one page of results and keeps the first `count`. In the smoke test, one page had 5 results.
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/** The extension's `[extensions.tinyfish]` table. */
|
|
3
3
|
export const config = z.strictObject({
|
|
4
|
-
timeout_seconds: z
|
|
5
|
-
|
|
4
|
+
timeout_seconds: z
|
|
5
|
+
.number()
|
|
6
|
+
.int()
|
|
7
|
+
.positive()
|
|
8
|
+
.default(300)
|
|
9
|
+
.describe("The longest one run may take, in seconds, when the tool input sets none. Default 300."),
|
|
10
|
+
capture_screenshots: z
|
|
11
|
+
.boolean()
|
|
12
|
+
.default(true)
|
|
13
|
+
.describe("Capture a screenshot at each step of a run, for step_screenshot. Default true."),
|
|
6
14
|
});
|
package/dist/src/tools/agent.js
CHANGED
|
@@ -101,6 +101,9 @@ export const agentTools = {
|
|
|
101
101
|
input: cancelRun.input,
|
|
102
102
|
output: cancelRun.output,
|
|
103
103
|
...runAccess,
|
|
104
|
+
side_effect: true,
|
|
105
|
+
undo: "none",
|
|
106
|
+
undo_reason: "a stopped run is not started again; start_run starts a new one",
|
|
104
107
|
execute: async ({ run_id }, ctx) => {
|
|
105
108
|
const cancelled = await tinyfish(ctx, "agent", "POST", runPath(run_id, "/cancel"), cancelledRun);
|
|
106
109
|
if (!cancelled.ok)
|
package/edgar-extension.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"contract": 1,
|
|
3
3
|
"name": "tinyfish",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3",
|
|
5
5
|
"config_schema": "schemas/config.json",
|
|
6
6
|
"secrets": [
|
|
7
7
|
{
|
|
@@ -59,7 +59,9 @@
|
|
|
59
59
|
"output_schema": "schemas/cancel_run.out.json",
|
|
60
60
|
"secrets": ["TINYFISH_API_KEY"],
|
|
61
61
|
"capabilities": ["network:agent.tinyfish.ai"],
|
|
62
|
-
"side_effect":
|
|
62
|
+
"side_effect": true,
|
|
63
|
+
"undo": "none",
|
|
64
|
+
"undo_reason": "a stopped run is not started again; start_run starts a new one",
|
|
63
65
|
"approval": "never",
|
|
64
66
|
"disabled": false
|
|
65
67
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kana-ai/edgar-ext-tinyfish",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "EDGAR extension for TinyFish: run a web agent on a goal, search the web and fetch pages.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
".": "./dist/src/index.js"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kana-ai/edgar-sdk": "0.1.
|
|
24
|
+
"@kana-ai/edgar-sdk": "0.1.3",
|
|
25
25
|
"zod": "4.6.7"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@kana-ai/edgar-contracts": "0.1.
|
|
28
|
+
"@kana-ai/edgar-contracts": "0.1.3",
|
|
29
29
|
"@types/node": "24.19.2",
|
|
30
30
|
"ajv": "8.20.0",
|
|
31
31
|
"oxfmt": "0.76.0",
|
package/schemas/config.json
CHANGED
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
"properties": {
|
|
5
5
|
"timeout_seconds": {
|
|
6
6
|
"default": 300,
|
|
7
|
+
"description": "The longest one run may take, in seconds, when the tool input sets none. Default 300.",
|
|
7
8
|
"type": "integer",
|
|
8
9
|
"exclusiveMinimum": 0,
|
|
9
10
|
"maximum": 9007199254740991
|
|
10
11
|
},
|
|
11
12
|
"capture_screenshots": {
|
|
12
13
|
"default": true,
|
|
14
|
+
"description": "Capture a screenshot at each step of a run, for step_screenshot. Default true.",
|
|
13
15
|
"type": "boolean"
|
|
14
16
|
}
|
|
15
17
|
},
|