gyoshu 0.4.11 → 0.4.13

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/bin/gyoshu.js CHANGED
@@ -1,28 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- /**
4
- * Gyoshu CLI - Install/uninstall helper for OpenCode
5
- *
6
- * Usage:
7
- * bunx gyoshu install - Add gyoshu to opencode.json
8
- * bunx gyoshu uninstall - Remove gyoshu from opencode.json
9
- * bunx gyoshu check - Verify installation status
10
- */
3
+ import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'fs';
4
+ import { join, dirname } from 'path';
11
5
 
12
- import { readFileSync, writeFileSync, existsSync } from 'fs';
13
- import { join } from 'path';
14
-
15
- const OPENCODE_CONFIG = 'opencode.json';
6
+ const HOME = process.env.HOME || '';
7
+ const OPENCODE_CONFIG_DIR = join(HOME, '.config', 'opencode');
8
+ const OPENCODE_CONFIG_FILE = join(OPENCODE_CONFIG_DIR, 'opencode.json');
9
+ const LEGACY_HOME_CONFIG = join(HOME, 'opencode.json');
16
10
 
17
11
  function findOpencodeConfig() {
18
- // Check current directory
19
- if (existsSync(OPENCODE_CONFIG)) {
20
- return OPENCODE_CONFIG;
12
+ if (existsSync(OPENCODE_CONFIG_FILE)) {
13
+ return OPENCODE_CONFIG_FILE;
21
14
  }
22
- // Check home directory
23
- const homeConfig = join(process.env.HOME || '', OPENCODE_CONFIG);
24
- if (existsSync(homeConfig)) {
25
- return homeConfig;
15
+ if (existsSync(LEGACY_HOME_CONFIG)) {
16
+ return LEGACY_HOME_CONFIG;
26
17
  }
27
18
  return null;
28
19
  }
@@ -37,6 +28,10 @@ function readConfig(configPath) {
37
28
  }
38
29
 
39
30
  function writeConfig(configPath, config) {
31
+ const dir = dirname(configPath);
32
+ if (!existsSync(dir)) {
33
+ mkdirSync(dir, { recursive: true });
34
+ }
40
35
  writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n');
41
36
  }
42
37
 
@@ -51,24 +46,20 @@ function install() {
51
46
  process.exit(1);
52
47
  }
53
48
  } else {
54
- // Create new config in current directory
55
- configPath = OPENCODE_CONFIG;
49
+ configPath = OPENCODE_CONFIG_FILE;
56
50
  config = {};
57
- console.log(`Creating new ${OPENCODE_CONFIG}...`);
51
+ console.log(`Creating ${configPath}...`);
58
52
  }
59
53
 
60
- // Ensure plugin array exists
61
54
  if (!Array.isArray(config.plugin)) {
62
55
  config.plugin = [];
63
56
  }
64
57
 
65
- // Check if already installed
66
58
  if (config.plugin.includes('gyoshu')) {
67
59
  console.log('Gyoshu is already installed in ' + configPath);
68
60
  return;
69
61
  }
70
62
 
71
- // Add gyoshu
72
63
  config.plugin.push('gyoshu');
73
64
  writeConfig(configPath, config);
74
65
 
@@ -98,7 +89,6 @@ function uninstall() {
98
89
  return;
99
90
  }
100
91
 
101
- // Remove gyoshu
102
92
  config.plugin = config.plugin.filter(p => p !== 'gyoshu');
103
93
  writeConfig(configPath, config);
104
94
 
@@ -112,6 +102,7 @@ function check() {
112
102
  if (!configPath) {
113
103
  console.log('Status: NOT INSTALLED');
114
104
  console.log('No opencode.json found.');
105
+ console.log(`Expected: ${OPENCODE_CONFIG_FILE}`);
115
106
  console.log('\nTo install: bunx gyoshu install');
116
107
  return;
117
108
  }
@@ -146,6 +137,8 @@ Usage:
146
137
  gyoshu check Verify installation status
147
138
  gyoshu help Show this help message
148
139
 
140
+ Config location: ~/.config/opencode/opencode.json
141
+
149
142
  Examples:
150
143
  bunx gyoshu install
151
144
  npx gyoshu check
@@ -154,7 +147,6 @@ More info: https://github.com/Yeachan-Heo/My-Jogyo
154
147
  `);
155
148
  }
156
149
 
157
- // Main
158
150
  const command = process.argv[2];
159
151
 
160
152
  switch (command) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gyoshu",
3
- "version": "0.4.11",
3
+ "version": "0.4.13",
4
4
  "description": "Scientific research agent extension for OpenCode - turns research goals into reproducible Jupyter notebooks",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "gyoshu",
3
- "version": "0.4.11",
3
+ "version": "0.4.13",
4
4
  "description": "Scientific research agent extension for OpenCode",
5
5
  "files": {
6
6
  "agent": [
7
7
  "gyoshu.md",
8
8
  "jogyo.md",
9
- "baksa.md"
9
+ "baksa.md",
10
+ "jogyo-paper-writer.md",
11
+ "jogyo-feedback.md",
12
+ "jogyo-insight.md"
10
13
  ],
11
14
  "command": [
12
15
  "gyoshu.md",
@@ -19,9 +22,16 @@
19
22
  "session-manager.ts",
20
23
  "gyoshu-completion.ts",
21
24
  "gyoshu-snapshot.ts",
22
- "retrospective-store.ts"
25
+ "notebook-search.ts",
26
+ "migration-tool.ts",
27
+ "retrospective-store.ts",
28
+ "checkpoint-manager.ts"
29
+ ],
30
+ "skill": [
31
+ "data-analysis",
32
+ "experiment-design",
33
+ "ml-rigor"
23
34
  ],
24
- "skill": [],
25
35
  "lib": [
26
36
  "paths.ts",
27
37
  "atomic-write.ts",
@@ -32,11 +42,25 @@
32
42
  "bridge-meta.ts",
33
43
  "lock-paths.ts",
34
44
  "marker-parser.ts",
35
- "quality-gates.ts"
45
+ "quality-gates.ts",
46
+ "goal-gates.ts",
47
+ "report-gates.ts",
48
+ "report-markdown.ts",
49
+ "pdf-export.ts",
50
+ "checkpoint-schema.ts",
51
+ "artifact-security.ts",
52
+ "auto-loop-state.ts",
53
+ "auto-decision.ts",
54
+ "parallel-queue.ts",
55
+ "environment-capture.ts",
56
+ "readme-index.ts",
57
+ "filesystem-check.ts"
36
58
  ],
37
59
  "bridge": [
38
60
  "gyoshu_bridge.py"
39
61
  ],
40
- "plugin": []
62
+ "plugin": [
63
+ "gyoshu-hooks.ts"
64
+ ]
41
65
  }
42
66
  }