@framers/agentos-ext-citation-check 0.0.0-stage → 0.1.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/LICENSE +98 -0
- package/README.md +167 -2
- package/dist/bin.d.ts +10 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +11 -0
- package/dist/bin.js.map +1 -0
- package/dist/cli.d.ts +36 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +145 -0
- package/dist/cli.js.map +1 -0
- package/dist/embeddings.d.ts +54 -0
- package/dist/embeddings.d.ts.map +1 -0
- package/dist/embeddings.js +52 -0
- package/dist/embeddings.js.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/match.d.ts +44 -0
- package/dist/match.d.ts.map +1 -0
- package/dist/match.js +108 -0
- package/dist/match.js.map +1 -0
- package/dist/page.d.ts +105 -0
- package/dist/page.d.ts.map +1 -0
- package/dist/page.js +400 -0
- package/dist/page.js.map +1 -0
- package/dist/parse.d.ts +36 -0
- package/dist/parse.d.ts.map +1 -0
- package/dist/parse.js +314 -0
- package/dist/parse.js.map +1 -0
- package/dist/report.d.ts +28 -0
- package/dist/report.d.ts.map +1 -0
- package/dist/report.js +128 -0
- package/dist/report.js.map +1 -0
- package/dist/runner.d.ts +89 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +298 -0
- package/dist/runner.js.map +1 -0
- package/dist/tools/citationVerify.d.ts +59 -0
- package/dist/tools/citationVerify.d.ts.map +1 -0
- package/dist/tools/citationVerify.js +98 -0
- package/dist/tools/citationVerify.js.map +1 -0
- package/dist/types.d.ts +150 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +20 -0
- package/dist/types.js.map +1 -0
- package/manifest.json +66 -0
- package/package.json +79 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","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, the verdict on it with
|
|
4
|
+
* the passage it rests on, how each page fared, and the report with its summary.
|
|
5
|
+
*
|
|
6
|
+
* @module agentos/extensions/research/citation-check/types
|
|
7
|
+
*/
|
|
8
|
+
/** Every verdict, in the order a summary lists them. */
|
|
9
|
+
export const CITATION_VERDICTS = [
|
|
10
|
+
'exact',
|
|
11
|
+
'supported',
|
|
12
|
+
'weak',
|
|
13
|
+
'unverifiable',
|
|
14
|
+
'contradicted',
|
|
15
|
+
'not_found',
|
|
16
|
+
'unreachable',
|
|
17
|
+
'unreadable',
|
|
18
|
+
'uncited',
|
|
19
|
+
];
|
|
20
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA8BH,wDAAwD;AACxD,MAAM,CAAC,MAAM,iBAAiB,GAA+B;IAC3D,OAAO;IACP,WAAW;IACX,MAAM;IACN,cAAc;IACd,cAAc;IACd,WAAW;IACX,aAAa;IACb,YAAY;IACZ,SAAS;CACV,CAAC"}
|
package/manifest.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
|
|
3
|
+
"id": "com.framers.research.citation-check",
|
|
4
|
+
"name": "Citation Check",
|
|
5
|
+
"version": "0.1.1",
|
|
6
|
+
"description": "Checks the quoted claims of a document against the pages they cite, with AgentOS's citation tooling: word for word first, then by embeddings when a model is configured",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Frame",
|
|
9
|
+
"email": "team@frame.dev",
|
|
10
|
+
"url": "https://frame.dev"
|
|
11
|
+
},
|
|
12
|
+
"license": "Apache-2.0",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"citations",
|
|
15
|
+
"fact-checking",
|
|
16
|
+
"grounding",
|
|
17
|
+
"research"
|
|
18
|
+
],
|
|
19
|
+
"agentosVersion": ">=0.13.120",
|
|
20
|
+
"categories": ["research"],
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/framerslab/agentos-extensions"
|
|
24
|
+
},
|
|
25
|
+
"extensions": [
|
|
26
|
+
{
|
|
27
|
+
"kind": "tool",
|
|
28
|
+
"id": "citation_verify",
|
|
29
|
+
"displayName": "Citation check",
|
|
30
|
+
"description": "Checks each quoted claim of a document against the page its address names",
|
|
31
|
+
"entry": "./dist/tools/citationVerify.js"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"optionalSecrets": ["openai.apiKey"],
|
|
35
|
+
"configuration": {
|
|
36
|
+
"properties": {
|
|
37
|
+
"embeddings": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"enum": ["none", "openai"],
|
|
40
|
+
"default": "none",
|
|
41
|
+
"description": "Grades a claim that is not on its page word for word with OpenAI embeddings through AgentOS"
|
|
42
|
+
},
|
|
43
|
+
"egress": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"enum": ["hosted", "local"],
|
|
46
|
+
"default": "hosted",
|
|
47
|
+
"description": "The AgentOS egress policy the tool reads pages through: public https addresses alone, or any address"
|
|
48
|
+
},
|
|
49
|
+
"timeoutMs": {
|
|
50
|
+
"type": "number",
|
|
51
|
+
"default": 15000,
|
|
52
|
+
"description": "The deadline for each page, in milliseconds"
|
|
53
|
+
},
|
|
54
|
+
"maxBytes": {
|
|
55
|
+
"type": "number",
|
|
56
|
+
"default": 5000000,
|
|
57
|
+
"description": "The most bytes read from a page"
|
|
58
|
+
},
|
|
59
|
+
"maxPages": {
|
|
60
|
+
"type": "number",
|
|
61
|
+
"default": 100,
|
|
62
|
+
"description": "The most distinct pages one check fetches"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,82 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framers/agentos-ext-citation-check",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Checks the quoted claims of a document against the pages they cite, with AgentOS's citation tooling: word for word first, then by embeddings when a model is configured",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./manifest.json": "./manifest.json",
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"bin": {
|
|
18
|
+
"agentos-citations": "dist/bin.js"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"agentos",
|
|
22
|
+
"citations",
|
|
23
|
+
"fact-checking",
|
|
24
|
+
"grounding",
|
|
25
|
+
"research"
|
|
26
|
+
],
|
|
27
|
+
"author": {
|
|
28
|
+
"name": "Frame",
|
|
29
|
+
"email": "team@frame.dev",
|
|
30
|
+
"url": "https://frame.dev"
|
|
31
|
+
},
|
|
32
|
+
"contributors": [
|
|
33
|
+
{
|
|
34
|
+
"name": "Johnny Dunn",
|
|
35
|
+
"email": "johnnyfived@protonmail.com",
|
|
36
|
+
"url": "https://github.com/jddunn"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"license": "Apache-2.0",
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/framerslab/agentos-extensions.git",
|
|
43
|
+
"directory": "registry/curated/research/citation-check"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=20.19.0"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@framers/agentos": ">=0.13.120"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@framers/agentos-ext-grounding-guard": "^0.7.2",
|
|
56
|
+
"@framers/agentos-ext-public-sources": "^0.2.0",
|
|
57
|
+
"@framers/agentos-ext-web-scraper": "^0.1.3"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@types/node": "^20.12.12",
|
|
61
|
+
"rimraf": "^5.0.7",
|
|
62
|
+
"typescript": "^5.4.5",
|
|
63
|
+
"vitest": "^3.2.7",
|
|
64
|
+
"@framers/agentos": "^0.13.134"
|
|
65
|
+
},
|
|
66
|
+
"homepage": "https://github.com/framerslab/agentos-extensions/tree/master/registry/curated/research/citation-check#readme",
|
|
67
|
+
"bugs": {
|
|
68
|
+
"url": "https://github.com/framerslab/agentos-extensions/issues"
|
|
69
|
+
},
|
|
70
|
+
"files": [
|
|
71
|
+
"dist",
|
|
72
|
+
"manifest.json",
|
|
73
|
+
"README.md"
|
|
74
|
+
],
|
|
75
|
+
"scripts": {
|
|
76
|
+
"build": "tsc",
|
|
77
|
+
"test": "vitest run",
|
|
78
|
+
"test:watch": "vitest",
|
|
79
|
+
"typecheck": "tsc --noEmit",
|
|
80
|
+
"clean": "rimraf dist"
|
|
81
|
+
}
|
|
6
82
|
}
|