@agentmap/opencode 0.1.0

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.
@@ -0,0 +1,3 @@
1
+ import type { Plugin } from '@opencode-ai/plugin';
2
+ export declare const AgentMapPlugin: Plugin;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAGjD,eAAO,MAAM,cAAc,EAAE,MAa5B,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ // @agentmap
2
+ // OpenCode plugin that injects codebase map into system prompt.
3
+ import { generateMapYaml } from 'agentmap';
4
+ export const AgentMapPlugin = async ({ directory }) => {
5
+ return {
6
+ 'experimental.chat.system.transform': async (_input, output) => {
7
+ const yaml = await generateMapYaml({ dir: directory });
8
+ if (!yaml.trim())
9
+ return;
10
+ output.system.push(`<agentmap>
11
+ These are some of the files in the repo with their descriptions and definition locations:
12
+
13
+ ${yaml}
14
+ </agentmap>`);
15
+ },
16
+ };
17
+ };
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,gEAAgE;AAGhE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1C,MAAM,CAAC,MAAM,cAAc,GAAW,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC5D,OAAO;QACL,oCAAoC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YAC7D,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAA;YACtD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBAAE,OAAM;YAExB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;;;EAGvB,IAAI;YACM,CAAC,CAAA;QACT,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@agentmap/opencode",
3
+ "version": "0.1.0",
4
+ "description": "OpenCode plugin that injects agentmap codebase map into system prompt",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/remorses/agentmap.git",
9
+ "directory": "opencode"
10
+ },
11
+ "homepage": "https://github.com/remorses/agentmap#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/remorses/agentmap/issues"
14
+ },
15
+ "main": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "default": "./dist/index.js"
21
+ }
22
+ },
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "scripts": {
27
+ "build": "tsc"
28
+ },
29
+ "dependencies": {
30
+ "agentmap": "0.2.0"
31
+ },
32
+ "devDependencies": {
33
+ "@opencode-ai/plugin": "^1.0.224",
34
+ "@types/node": "^22.10.2",
35
+ "typescript": "^5.7.2"
36
+ },
37
+ "keywords": [
38
+ "opencode",
39
+ "plugin",
40
+ "agentmap",
41
+ "ai",
42
+ "agent"
43
+ ],
44
+ "license": "MIT"
45
+ }