@xberg-io/opencode-xberg 0.1.0 → 0.2.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/.opencode/plugins/xberg.js +8 -9
- package/README.md +1 -1
- package/assets/icon.svg +9 -6
- package/package.json +12 -23
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
// AI-RULEZ :: GENERATED FILE — DO NOT EDIT
|
|
2
|
+
// Content-Hash: blake3:23699ce784f85d10d5ee463e2b0b79cb07333120947fcb174daff28a5204d2e6
|
|
3
|
+
// Source-Hash: blake3:423668b412497a7795a67a9bf7832067ab152f86bcbb158d23c8dfdeaf12cf6e
|
|
4
|
+
// Schema-Version: v1
|
|
5
|
+
|
|
1
6
|
import { spawn } from "node:child_process";
|
|
2
7
|
import { tool } from "@opencode-ai/plugin";
|
|
3
8
|
|
|
4
9
|
const schema = tool.schema;
|
|
5
10
|
|
|
6
|
-
const wireFormat = schema
|
|
7
|
-
.enum(["text", "json", "toon"])
|
|
8
|
-
.default("json")
|
|
9
|
-
.describe("CLI output format.");
|
|
11
|
+
const wireFormat = schema.enum(["text", "json", "toon"]).default("json").describe("CLI output format.");
|
|
10
12
|
|
|
11
13
|
const contentFormat = schema
|
|
12
14
|
.enum(["plain", "markdown", "djot", "html", "json"])
|
|
@@ -66,9 +68,7 @@ function runCli(args, context) {
|
|
|
66
68
|
child.on("close", (exitCode, signal) => {
|
|
67
69
|
const stdoutText = Buffer.concat(stdout).toString("utf8").trim();
|
|
68
70
|
const stderrText = Buffer.concat(stderr).toString("utf8").trim();
|
|
69
|
-
const output = [stdoutText, stderrText && `stderr:\n${stderrText}`]
|
|
70
|
-
.filter(Boolean)
|
|
71
|
-
.join("\n\n");
|
|
71
|
+
const output = [stdoutText, stderrText && `stderr:\n${stderrText}`].filter(Boolean).join("\n\n");
|
|
72
72
|
|
|
73
73
|
resolve({
|
|
74
74
|
title: exitCode === 0 ? `xberg ${args[0]}` : `xberg ${args[0]} failed`,
|
|
@@ -87,8 +87,7 @@ function runCli(args, context) {
|
|
|
87
87
|
export const XbergPlugin = async () => ({
|
|
88
88
|
tool: {
|
|
89
89
|
xberg_extract: tool({
|
|
90
|
-
description:
|
|
91
|
-
"Extract text, tables, metadata, and images from a local document with the xberg CLI.",
|
|
90
|
+
description: "Extract text, tables, metadata, and images from a local document with the xberg CLI.",
|
|
92
91
|
args: {
|
|
93
92
|
path: schema.string().min(1).describe("Path to the local document."),
|
|
94
93
|
format: wireFormat,
|
package/README.md
CHANGED
package/assets/icon.svg
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256">
|
|
2
|
-
<rect width="256" height="256" rx="48" fill="#1F6FEB"/>
|
|
3
|
-
<path
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<
|
|
2
|
+
<rect width="256" height="256" rx="48" fill="#1F6FEB" />
|
|
3
|
+
<path
|
|
4
|
+
d="M64 64 L152 64 L192 104 L192 200 C192 204.4 188.4 208 184 208 L64 208 C59.6 208 56 204.4 56 200 L56 72 C56 67.6 59.6 64 64 64 Z"
|
|
5
|
+
fill="white"
|
|
6
|
+
/>
|
|
7
|
+
<path d="M152 64 L152 96 C152 100.4 155.6 104 160 104 L192 104 Z" fill="#1F6FEB" />
|
|
8
|
+
<rect x="80" y="128" width="88" height="12" rx="6" fill="#1F6FEB" />
|
|
9
|
+
<rect x="80" y="152" width="96" height="12" rx="6" fill="#1F6FEB" />
|
|
10
|
+
<rect x="80" y="176" width="64" height="12" rx="6" fill="#1F6FEB" />
|
|
8
11
|
</svg>
|
package/package.json
CHANGED
|
@@ -1,42 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xberg-io/opencode-xberg",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.3",
|
|
4
|
+
"description": "Local document extraction: text, tables, metadata, images from 91+ formats with optional OCR.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"document-intelligence",
|
|
7
7
|
"extraction",
|
|
8
8
|
"ocr",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"pdf",
|
|
10
|
+
"tables"
|
|
11
11
|
],
|
|
12
|
-
"homepage": "https://
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/xberg-io/plugins/issues"
|
|
15
|
-
},
|
|
16
|
-
"license": "MIT",
|
|
12
|
+
"homepage": "https://xberg.io",
|
|
17
13
|
"repository": {
|
|
18
14
|
"type": "git",
|
|
19
|
-
"url": "
|
|
20
|
-
"directory": "plugins/xberg"
|
|
15
|
+
"url": "https://github.com/xberg-io/plugins"
|
|
21
16
|
},
|
|
22
|
-
"
|
|
23
|
-
".opencode/",
|
|
24
|
-
"assets/",
|
|
25
|
-
"README.md"
|
|
26
|
-
],
|
|
17
|
+
"license": "MIT",
|
|
27
18
|
"type": "module",
|
|
28
19
|
"main": ".opencode/plugins/xberg.js",
|
|
29
20
|
"exports": {
|
|
30
21
|
".": "./.opencode/plugins/xberg.js"
|
|
31
22
|
},
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
23
|
+
"files": [
|
|
24
|
+
".opencode/",
|
|
25
|
+
"assets/",
|
|
26
|
+
"README.md"
|
|
27
|
+
],
|
|
36
28
|
"dependencies": {
|
|
37
29
|
"@opencode-ai/plugin": "^1.17.8"
|
|
38
|
-
},
|
|
39
|
-
"engines": {
|
|
40
|
-
"node": ">=22.14.0"
|
|
41
30
|
}
|
|
42
31
|
}
|