@nxxxsooo/opencode-annotate 0.7.0 → 0.8.1
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/CHANGELOG.md +12 -0
- package/README.md +15 -0
- package/agy/cli.mjs +366 -0
- package/agy/cli.test.mjs +51 -0
- package/agy/daemon.mjs +64 -0
- package/agy/hooks.json +22 -0
- package/agy/hooks.mjs +100 -0
- package/agy/hooks.test.mjs +60 -0
- package/agy/inbox.mjs +72 -0
- package/agy/inbox.test.mjs +40 -0
- package/agy/plugin.json +6 -0
- package/agy/receiver.mjs +44 -0
- package/agy/receiver.test.mjs +73 -0
- package/agy/session.mjs +93 -0
- package/agy/skills/annotate/SKILL.md +30 -0
- package/agy/transcript.mjs +81 -0
- package/agy/transcript.test.mjs +76 -0
- package/bridge/receiver.mjs +10 -3
- package/browser/panel.mjs +8 -4
- package/package.json +6 -2
- package/review.mjs +5 -1
package/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxxxsooo/opencode-annotate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Unofficial OpenCode plugin: annotate replies, documents and webpages, then send the feedback to the originating session.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
"./tui": "./tui.ts"
|
|
9
9
|
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"agy-annotate": "./agy/cli.mjs"
|
|
12
|
+
},
|
|
10
13
|
"scripts": {
|
|
11
|
-
"test": "node --test *.test.mjs bridge/*.test.mjs",
|
|
14
|
+
"test": "node --test *.test.mjs bridge/*.test.mjs agy/*.test.mjs",
|
|
12
15
|
"test:browser": "node tests/browser.mjs",
|
|
13
16
|
"install:bridge": "node scripts/install-bridge.mjs",
|
|
14
17
|
"install:plugin": "node scripts/install-plugin.mjs",
|
|
@@ -26,6 +29,7 @@
|
|
|
26
29
|
"bridge/native-host.mjs",
|
|
27
30
|
"bridge/receiver.mjs",
|
|
28
31
|
"bridge/wire.mjs",
|
|
32
|
+
"agy",
|
|
29
33
|
"scripts/install-bridge.mjs",
|
|
30
34
|
"scripts/install-plugin.mjs",
|
|
31
35
|
"scripts/migrate-page-context.mjs",
|
package/review.mjs
CHANGED
|
@@ -76,6 +76,10 @@ function eligibleReplies(messages) {
|
|
|
76
76
|
return textMessages(messages).filter(message => !message.progress).map(({ id, text }) => ({ id, text }))
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
// OpenCode 2.2.0 compresses API responses at roughly 80 KB/s, so a page of long
|
|
80
|
+
// replies took 10–30 s; uncompressed, the same local page arrives in milliseconds.
|
|
81
|
+
const uncompressed = { "accept-encoding": "identity" }
|
|
82
|
+
|
|
79
83
|
// Walk the session-scoped history newest first; the UI cache holds only a recent page.
|
|
80
84
|
async function* history(client, sessionID, signal) {
|
|
81
85
|
const seen = new Set()
|
|
@@ -85,7 +89,7 @@ async function* history(client, sessionID, signal) {
|
|
|
85
89
|
const page = await client.message.list({
|
|
86
90
|
sessionID, type: "assistant", limit: 50,
|
|
87
91
|
...(cursor ? { cursor } : { order: "desc" }),
|
|
88
|
-
}, { signal })
|
|
92
|
+
}, { signal, headers: uncompressed })
|
|
89
93
|
yield page.data
|
|
90
94
|
cursor = page.cursor?.next
|
|
91
95
|
if (cursor && seen.has(cursor)) throw new Error("Session history returned a repeated page cursor.")
|