opencode-context-dropper-plugin 0.1.3 → 0.1.5
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 +22 -32
- package/dist/index.js +41 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,24 +9,38 @@ A Context Dropper plugin for OpenCode, built with Bun and TypeScript. It leverag
|
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
You can install the `context-dropper` plugin using one of the following methods.
|
|
13
13
|
|
|
14
|
-
1.
|
|
14
|
+
### 1. Configure OpenCode (Recommended)
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
You do not need to manually install the package. OpenCode will automatically resolve and install it from the NPM registry when you add it to your configuration.
|
|
17
|
+
|
|
18
|
+
You can configure the plugin either globally for all projects, or locally for a single project:
|
|
19
|
+
|
|
20
|
+
**Option A: Project-Level (Local)**
|
|
21
|
+
|
|
22
|
+
1. Create or edit the `opencode.json` file in the root of your project.
|
|
23
|
+
2. Add the package name to the `plugin` array:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"plugin": ["opencode-context-dropper-plugin"]
|
|
28
|
+
}
|
|
19
29
|
```
|
|
20
30
|
|
|
21
|
-
|
|
22
|
-
|
|
31
|
+
**Option B: Global-Level**
|
|
32
|
+
|
|
33
|
+
1. Create or edit your global OpenCode config file at `~/.config/opencode/opencode.json`.
|
|
34
|
+
2. Add the package name to the `plugin` array:
|
|
23
35
|
|
|
24
36
|
```json
|
|
25
37
|
{
|
|
26
|
-
"
|
|
38
|
+
"plugin": ["opencode-context-dropper-plugin"]
|
|
27
39
|
}
|
|
28
40
|
```
|
|
29
41
|
|
|
42
|
+
(Optional) If you prefer to manage the installation yourself, you can install the plugin globally using Bun (`bun install -g opencode-context-dropper-plugin`) or NPM (`npm install -g opencode-context-dropper-plugin`).
|
|
43
|
+
|
|
30
44
|
## Usage
|
|
31
45
|
|
|
32
46
|
Once installed, start OpenCode:
|
|
@@ -60,27 +74,3 @@ Once invoked, the plugin completely takes over the context management:
|
|
|
60
74
|
4. This loop continues until all files are processed.
|
|
61
75
|
|
|
62
76
|
To forcefully stop the loop before it finishes, type **"stop context-dropper"**.
|
|
63
|
-
|
|
64
|
-
## Development & Debugging
|
|
65
|
-
|
|
66
|
-
To develop the plugin further, modify files under `src/`.
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
bun install
|
|
70
|
-
# rebuild the bundle after changes
|
|
71
|
-
bun run build
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Debugging Logs
|
|
75
|
-
|
|
76
|
-
The plugin writes activity and execution state to a dedicated log file located at:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
~/.opencode/context-dropper.log
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
You can monitor these logs in real-time by running the following command in your terminal:
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
tail -f ~/.opencode/context-dropper.log
|
|
86
|
-
```
|
package/dist/index.js
CHANGED
|
@@ -12337,6 +12337,44 @@ tool.schema = exports_external;
|
|
|
12337
12337
|
import * as fs from "node:fs";
|
|
12338
12338
|
import * as os from "node:os";
|
|
12339
12339
|
import * as path4 from "node:path";
|
|
12340
|
+
// ../package.json
|
|
12341
|
+
var package_default = {
|
|
12342
|
+
name: "context-dropper",
|
|
12343
|
+
version: "0.1.5",
|
|
12344
|
+
description: "CLI for iterating through a fixed list of files, tracking position, and tagging progress within an AI agent's session.",
|
|
12345
|
+
author: {
|
|
12346
|
+
name: "Fardjad Davari",
|
|
12347
|
+
email: "public@fardjad.com"
|
|
12348
|
+
},
|
|
12349
|
+
license: "MIT",
|
|
12350
|
+
repository: {
|
|
12351
|
+
type: "git",
|
|
12352
|
+
url: "https://github.com/fardjad/context-dropper"
|
|
12353
|
+
},
|
|
12354
|
+
keywords: ["cli", "context", "llm", "ai", "opencode", "automation"],
|
|
12355
|
+
bin: {
|
|
12356
|
+
"context-dropper": "./dist/index.js"
|
|
12357
|
+
},
|
|
12358
|
+
main: "dist/index.js",
|
|
12359
|
+
module: "dist/index.js",
|
|
12360
|
+
type: "module",
|
|
12361
|
+
files: ["dist/index.js"],
|
|
12362
|
+
scripts: {
|
|
12363
|
+
build: "bun build ./src/index.ts --outdir ./dist --target node",
|
|
12364
|
+
prepack: "npm run build"
|
|
12365
|
+
},
|
|
12366
|
+
devDependencies: {
|
|
12367
|
+
"@types/bun": "latest",
|
|
12368
|
+
typescript: "^5"
|
|
12369
|
+
},
|
|
12370
|
+
dependencies: {
|
|
12371
|
+
"@types/yargs": "^17.0.35",
|
|
12372
|
+
yargs: "^18.0.0"
|
|
12373
|
+
}
|
|
12374
|
+
};
|
|
12375
|
+
|
|
12376
|
+
// ../src/version/version.ts
|
|
12377
|
+
var getPackageVersion = () => package_default.version;
|
|
12340
12378
|
|
|
12341
12379
|
// src/session.ts
|
|
12342
12380
|
class SessionManager {
|
|
@@ -12979,11 +13017,12 @@ var log = (msg, ...args) => {
|
|
|
12979
13017
|
var sessionManager = new SessionManager;
|
|
12980
13018
|
var toolkit = new Toolkit(process.cwd());
|
|
12981
13019
|
var ContextDropperPlugin = async (ctx) => {
|
|
12982
|
-
|
|
13020
|
+
const version2 = getPackageVersion();
|
|
13021
|
+
log(`Plugin initializing! Version: ${version2}`);
|
|
12983
13022
|
setTimeout(() => {
|
|
12984
13023
|
ctx.client.tui.showToast({
|
|
12985
13024
|
body: {
|
|
12986
|
-
title:
|
|
13025
|
+
title: `Context Dropper v${version2}`,
|
|
12987
13026
|
message: "Plugin is active! Type '/drop <filesetName> <instructions>' to start.",
|
|
12988
13027
|
variant: "success",
|
|
12989
13028
|
duration: 5000
|
package/package.json
CHANGED