@vectorize-io/hindsight-coding-agents 0.0.2 → 0.0.3

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/status.js CHANGED
@@ -128,9 +128,67 @@ function applyLayer(raw, layer, harness) {
128
128
  if (perHarness) out = mergeRaw(out, perHarness);
129
129
  return out;
130
130
  }
131
+ var ENV_KEYS = {
132
+ apiUrl: "HINDSIGHT_API_URL",
133
+ apiToken: "HINDSIGHT_API_TOKEN",
134
+ bankId: "HINDSIGHT_BANK_ID",
135
+ dynamicBankId: "HINDSIGHT_DYNAMIC_BANK_ID",
136
+ bankIdTemplate: "HINDSIGHT_BANK_ID_TEMPLATE",
137
+ resolveWorktrees: "HINDSIGHT_RESOLVE_WORKTREES",
138
+ harness: "HINDSIGHT_HARNESS",
139
+ disabled: "HINDSIGHT_DISABLED",
140
+ retainSessions: "HINDSIGHT_RETAIN_SESSIONS",
141
+ retainEveryTurns: "HINDSIGHT_RETAIN_EVERY_TURNS",
142
+ reflectTimeoutMs: "HINDSIGHT_REFLECT_TIMEOUT_MS",
143
+ autoReflect: "HINDSIGHT_AUTO_REFLECT",
144
+ pageRefreshEveryTurns: "HINDSIGHT_PAGE_REFRESH_EVERY_TURNS",
145
+ autoSeed: "HINDSIGHT_AUTO_SEED",
146
+ seedLimit: "HINDSIGHT_SEED_LIMIT",
147
+ codebaseSurvey: "HINDSIGHT_CODEBASE_SURVEY",
148
+ surveyModel: "HINDSIGHT_SURVEY_MODEL",
149
+ surveyBudgetUsd: "HINDSIGHT_SURVEY_BUDGET_USD",
150
+ surveyRefreshCommits: "HINDSIGHT_SURVEY_REFRESH_COMMITS",
151
+ logLevel: "HINDSIGHT_LOG_LEVEL",
152
+ gitIngest: "HINDSIGHT_GIT_INGEST"
153
+ };
154
+ var ENV_BOOLEANS = /* @__PURE__ */ new Set([
155
+ "dynamicBankId",
156
+ "resolveWorktrees",
157
+ "disabled",
158
+ "retainSessions",
159
+ "autoReflect",
160
+ "autoSeed",
161
+ "codebaseSurvey"
162
+ ]);
163
+ var ENV_NUMBERS = /* @__PURE__ */ new Set([
164
+ "retainEveryTurns",
165
+ "reflectTimeoutMs",
166
+ "pageRefreshEveryTurns",
167
+ "seedLimit",
168
+ "surveyBudgetUsd",
169
+ "surveyRefreshCommits"
170
+ ]);
171
+ function readEnvConfig(env = process.env) {
172
+ const out = {};
173
+ for (const [key, name] of Object.entries(ENV_KEYS)) {
174
+ const value = env[name];
175
+ if (value === void 0 || value.trim() === "") continue;
176
+ if (ENV_BOOLEANS.has(key)) {
177
+ out[key] = ["1", "true", "yes", "on"].includes(value.trim().toLowerCase());
178
+ } else if (ENV_NUMBERS.has(key)) {
179
+ const n = Number(value);
180
+ if (Number.isFinite(n)) out[key] = n;
181
+ else console.error(`hindsight: ignoring ${name}=${value} \u2014 not a number`);
182
+ } else {
183
+ out[key] = value;
184
+ }
185
+ }
186
+ return out;
187
+ }
131
188
  function loadConfig(opts = {}) {
132
189
  const o = typeof opts === "string" ? { path: opts } : opts;
133
- return resolveConfig(applyLayer({}, readRaw(o.path ?? CONFIG_PATH), o.harness));
190
+ const withEnv = applyLayer({}, readEnvConfig(), o.harness);
191
+ return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
134
192
  }
135
193
  var BANK_OVERRIDE_EXCLUDED = [
136
194
  "bankId",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectorize-io/hindsight-coding-agents",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/vectorize-io/hindsight.git",
package/skill/SKILL.md CHANGED
@@ -94,10 +94,10 @@ name, or by one `mapPathToBank` prefix over their parent directory.
94
94
  ## Install / update (for setting up another machine or harness)
95
95
 
96
96
  ```bash
97
- npm install -g hindsight-coding-agents && hindsight-coding-agents install # detects all agents
97
+ npm install -g @vectorize-io/hindsight-coding-agents && hindsight-coding-agents install all # every detected agent
98
98
  hindsight-coding-agents install codex # or specific: opencode|claude-code|codex|antigravity-cli|cursor-cli
99
99
  hindsight-coding-agents uninstall # removes exactly what install added
100
- npm update -g hindsight-coding-agents # update; wired paths stay valid
100
+ npm update -g @vectorize-io/hindsight-coding-agents # update; wired paths stay valid
101
101
  ```
102
102
 
103
103
  ## Debugging