@elizaos/plugin-pdf 2.0.0-beta.1 → 2.0.3-beta.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/README.md +57 -43
- package/dist/browser/index.browser.js +5 -111
- package/dist/browser/index.browser.js.map +5 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/node/index.node.js +72 -44730
- package/dist/node/index.node.js.map +5 -7
- package/dist/services/pdf.d.ts +4 -3
- package/dist/services/pdf.d.ts.map +1 -1
- package/package.json +11 -4
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/services/pdf.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { IAgentRuntime } from "@elizaos/core";
|
|
2
2
|
import { Service } from "@elizaos/core";
|
|
3
3
|
import type { PdfConversionResult, PdfDocumentInfo, PdfExtractionOptions } from "../types";
|
|
4
|
+
export declare const MAX_PDF_BUFFER_BYTES: number;
|
|
4
5
|
export declare class PdfService extends Service {
|
|
5
6
|
static serviceType: "pdf";
|
|
6
7
|
capabilityDescription: string;
|
|
7
8
|
static start(runtime: IAgentRuntime): Promise<PdfService>;
|
|
8
9
|
static stop(runtime: IAgentRuntime): Promise<void>;
|
|
9
10
|
stop(): Promise<void>;
|
|
10
|
-
convertPdfToText(pdfBuffer: Buffer): Promise<string>;
|
|
11
|
-
convertPdfToTextWithOptions(pdfBuffer: Buffer, options?: PdfExtractionOptions): Promise<PdfConversionResult>;
|
|
12
|
-
getDocumentInfo(pdfBuffer: Buffer): Promise<PdfDocumentInfo>;
|
|
11
|
+
convertPdfToText(pdfBuffer: Buffer | Uint8Array): Promise<string>;
|
|
12
|
+
convertPdfToTextWithOptions(pdfBuffer: Buffer | Uint8Array, options?: PdfExtractionOptions): Promise<PdfConversionResult>;
|
|
13
|
+
getDocumentInfo(pdfBuffer: Buffer | Uint8Array): Promise<PdfDocumentInfo>;
|
|
13
14
|
cleanUpContent(content: string): string;
|
|
14
15
|
}
|
|
15
16
|
export default PdfService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdf.d.ts","sourceRoot":"","sources":["../../services/pdf.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAU,OAAO,EAAe,MAAM,eAAe,CAAC;AAG7D,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EAGrB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"pdf.d.ts","sourceRoot":"","sources":["../../services/pdf.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAU,OAAO,EAAe,MAAM,eAAe,CAAC;AAG7D,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EAGrB,MAAM,UAAU,CAAC;AAIlB,eAAO,MAAM,oBAAoB,QAAoB,CAAC;AAkGtD,qBAAa,UAAW,SAAQ,OAAO;IACrC,MAAM,CAAC,WAAW,QAAmB;IACrC,qBAAqB,SAAoD;WAE5D,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC;WAKlD,IAAI,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAErB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IA0BjE,2BAA2B,CAC/B,SAAS,EAAE,MAAM,GAAG,UAAU,EAC9B,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,mBAAmB,CAAC;IAsCzB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,eAAe,CAAC;IA+C/E,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;CA6BxC;AAED,eAAe,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-pdf",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/node/index.node.js",
|
|
6
6
|
"module": "dist/node/index.node.js",
|
|
@@ -26,13 +26,19 @@
|
|
|
26
26
|
"default": "./dist/node/index.node.js"
|
|
27
27
|
},
|
|
28
28
|
"default": "./dist/node/index.node.js"
|
|
29
|
+
},
|
|
30
|
+
"./*.css": "./dist/*.css",
|
|
31
|
+
"./*": {
|
|
32
|
+
"types": "./dist/*.d.ts",
|
|
33
|
+
"import": "./dist/*.js",
|
|
34
|
+
"default": "./dist/*.js"
|
|
29
35
|
}
|
|
30
36
|
},
|
|
31
37
|
"files": [
|
|
32
38
|
"dist"
|
|
33
39
|
],
|
|
34
40
|
"dependencies": {
|
|
35
|
-
"@elizaos/core": "2.0.
|
|
41
|
+
"@elizaos/core": "2.0.3-beta.2",
|
|
36
42
|
"unpdf": "^1.4.0"
|
|
37
43
|
},
|
|
38
44
|
"devDependencies": {
|
|
@@ -50,7 +56,7 @@
|
|
|
50
56
|
"clean": "rm -rf dist .turbo",
|
|
51
57
|
"format": "bunx @biomejs/biome format --write .",
|
|
52
58
|
"format:check": "bunx @biomejs/biome format .",
|
|
53
|
-
"typecheck": "
|
|
59
|
+
"typecheck": "tsgo --noEmit",
|
|
54
60
|
"test": "vitest run",
|
|
55
61
|
"test:ts": "vitest run",
|
|
56
62
|
"build": "bun run build.ts"
|
|
@@ -72,5 +78,6 @@
|
|
|
72
78
|
"browser": "Browser-compatible build available via exports.browser",
|
|
73
79
|
"node": "Node.js build available via exports.node"
|
|
74
80
|
}
|
|
75
|
-
}
|
|
81
|
+
},
|
|
82
|
+
"gitHead": "82fe0f44215954c2417328203f5bd6510985c1fc"
|
|
76
83
|
}
|