opencode-docker-panel 0.4.8

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/dist/tui.js ADDED
@@ -0,0 +1,55 @@
1
+ import { createComponent as _$createComponent } from "@opentui/solid";
2
+ import { DockerPanel } from "./panel.js";
3
+ const MIN_INTERVAL = 1000;
4
+ const MAX_INTERVAL = 60000;
5
+ const plugin = {
6
+ id: "docker.panel.cli",
7
+ setup(context) {
8
+ const requested = Number(context.options.intervalMs);
9
+ const intervalMs = Number.isFinite(requested) ? Math.min(Math.max(requested, MIN_INTERVAL), MAX_INTERVAL) : 3000;
10
+ const agentDir = context.location?.directory ?? process.cwd();
11
+ const [pinned, setPinned] = context.storage.store("docker-panel.pinned", {
12
+ initial: {
13
+ names: []
14
+ }
15
+ });
16
+ let dispose;
17
+
18
+ /** Durable storage is the host's own, so a pin outlives the TUI without this plugin owning any user file. */
19
+ async function togglePin(name) {
20
+ await setPinned(draft => {
21
+ const index = draft.names.indexOf(name);
22
+ if (index >= 0) draft.names.splice(index, 1);else draft.names.push(name);
23
+ });
24
+ }
25
+
26
+ /** Drops the current claim and registers it again, which is the only way to make the host paint the slot anew. */
27
+ function reload() {
28
+ queueMicrotask(() => {
29
+ dispose?.();
30
+ dispose = context.ui.slot(claim);
31
+ });
32
+ }
33
+ const claim = {
34
+ append: "sidebar.content",
35
+ render: () => _$createComponent(DockerPanel, {
36
+ intervalMs: intervalMs,
37
+ agentDir: agentDir,
38
+ get pinned() {
39
+ return pinned.names;
40
+ },
41
+ onTogglePin: togglePin,
42
+ get theme() {
43
+ return context.theme;
44
+ },
45
+ get ui() {
46
+ return context.ui;
47
+ },
48
+ reload: reload
49
+ })
50
+ };
51
+ dispose = context.ui.slot(claim);
52
+ return () => dispose?.();
53
+ }
54
+ };
55
+ export default plugin;
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "opencode-docker-panel",
3
+ "version": "0.4.8",
4
+ "description": "Docker container panel for the OpenCode 2 TUI sidebar",
5
+ "keywords": [
6
+ "opencode",
7
+ "opencode-plugin",
8
+ "opencode-tui",
9
+ "docker",
10
+ "docker-compose",
11
+ "sidebar",
12
+ "tui"
13
+ ],
14
+ "homepage": "https://github.com/victor-ochenin/opencodeDockerPlugin#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/victor-ochenin/opencodeDockerPlugin/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/victor-ochenin/opencodeDockerPlugin.git",
21
+ "directory": "."
22
+ },
23
+ "type": "module",
24
+ "license": "MIT",
25
+ "exports": {
26
+ "./tui": "./dist/tui.js"
27
+ },
28
+ "files": [
29
+ "dist",
30
+ "README.md",
31
+ "CHANGELOG.md",
32
+ "LICENSE"
33
+ ],
34
+ "scripts": {
35
+ "build": "node --experimental-strip-types scripts/build.ts",
36
+ "check": "node --experimental-strip-types scripts/check-parser.ts",
37
+ "typecheck": "tsc --noEmit",
38
+ "check-build": "node --experimental-strip-types scripts/check-build.ts"
39
+ },
40
+ "peerDependencies": {
41
+ "@opencode/plugin": "^2.0.20",
42
+ "@opencode/theme": "^2.0.20",
43
+ "@opentui/core": ">=0.5.8",
44
+ "@opentui/solid": ">=0.5.8",
45
+ "solid-js": "^1.9.0"
46
+ },
47
+ "peerDependenciesMeta": {
48
+ "@opencode/plugin": {
49
+ "optional": true
50
+ },
51
+ "@opencode/theme": {
52
+ "optional": true
53
+ },
54
+ "@opentui/core": {
55
+ "optional": true
56
+ },
57
+ "@opentui/solid": {
58
+ "optional": true
59
+ },
60
+ "solid-js": {
61
+ "optional": true
62
+ }
63
+ },
64
+ "devDependencies": {
65
+ "@babel/core": "^7.28.0",
66
+ "@babel/preset-typescript": "^7.27.1",
67
+ "@opencode/plugin": "^2.0.20",
68
+ "@opencode/theme": "^2.0.20",
69
+ "@opentui/core": "0.5.12",
70
+ "@opentui/solid": "0.5.12",
71
+ "@types/babel__core": "^7.20.5",
72
+ "babel-preset-solid": "^1.9.12",
73
+ "solid-js": "1.9.12",
74
+ "typescript": "^5.9.2"
75
+ }
76
+ }