gyoshu 0.4.13 → 0.4.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gyoshu",
3
- "version": "0.4.13",
3
+ "version": "0.4.14",
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,6 +1,6 @@
1
1
  {
2
2
  "name": "gyoshu",
3
- "version": "0.4.13",
3
+ "version": "0.4.14",
4
4
  "description": "Scientific research agent extension for OpenCode",
5
5
  "files": {
6
6
  "agent": [
@@ -135,6 +135,9 @@ export interface AutoLoopState {
135
135
  * // Returns: "/home/user/my-project/reports/customer-churn/auto/loop-state.json"
136
136
  */
137
137
  export function getAutoLoopStatePath(reportTitle: string): string {
138
+ if (!reportTitle || typeof reportTitle !== "string") {
139
+ throw new Error("reportTitle is required for getAutoLoopStatePath");
140
+ }
138
141
  return path.join(getReportDir(reportTitle), "auto", "loop-state.json");
139
142
  }
140
143
 
@@ -161,6 +164,10 @@ export function getAutoLoopStatePath(reportTitle: string): string {
161
164
  * ```
162
165
  */
163
166
  export async function loadState(reportTitle: string): Promise<AutoLoopState | null> {
167
+ if (!reportTitle || typeof reportTitle !== "string") {
168
+ return null;
169
+ }
170
+
164
171
  const statePath = getAutoLoopStatePath(reportTitle);
165
172
 
166
173
  try {