@oss-autopilot/core 1.9.0 → 1.10.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.
@@ -88,6 +88,42 @@ export function getCacheDir() {
88
88
  }
89
89
  return dir;
90
90
  }
91
+ /**
92
+ * Returns the path to the local Gist ID file (`~/.oss-autopilot/gist-id`).
93
+ *
94
+ * This file stores the GitHub Gist ID used by the Gist-based persistence layer,
95
+ * avoiding a search-by-description API call on every session.
96
+ *
97
+ * Implicitly creates the data directory via {@link getDataDir} if it does not exist.
98
+ *
99
+ * @returns Absolute path to `gist-id`
100
+ *
101
+ * @example
102
+ * const gistIdPath = getGistIdPath();
103
+ * // "/Users/you/.oss-autopilot/gist-id"
104
+ */
105
+ export function getGistIdPath() {
106
+ const dir = getDataDir();
107
+ return path.join(dir, 'gist-id');
108
+ }
109
+ /**
110
+ * Returns the path to the local state cache file (`~/.oss-autopilot/state-cache.json`).
111
+ *
112
+ * This file is a write-through cache of the Gist-hosted state, used as a fallback
113
+ * when the GitHub API is unreachable (degraded mode).
114
+ *
115
+ * Implicitly creates the data directory via {@link getDataDir} if it does not exist.
116
+ *
117
+ * @returns Absolute path to `state-cache.json`
118
+ *
119
+ * @example
120
+ * const cachePath = getStateCachePath();
121
+ * // "/Users/you/.oss-autopilot/state-cache.json"
122
+ */
123
+ export function getStateCachePath() {
124
+ const dir = getDataDir();
125
+ return path.join(dir, 'state-cache.json');
126
+ }
91
127
  // Validation patterns for GitHub owner and repo names
92
128
  const OWNER_PATTERN = /^[a-zA-Z0-9_-]+$/;
93
129
  const REPO_PATTERN = /^[a-zA-Z0-9_.-]+$/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oss-autopilot/core",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "CLI and core library for managing open source contributions",
5
5
  "type": "module",
6
6
  "bin": {