heyspex 0.2.5 → 0.2.6
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/.claude-plugin/marketplace.json +1 -1
- package/bin/hs.mjs +281 -30
- package/dev-factory/lib/dispatch-guard.mjs +75 -0
- package/dev-factory/lib/runner-path.mjs +51 -0
- package/dev-factory/spexcrawl/spexcrawl-cli.mjs +734 -0
- package/dist/cli/hs-connect.mjs +20 -1
- package/dist/cli/hs-defer.mjs +3802 -3744
- package/dist/cli/hs-events.mjs +1296 -0
- package/dist/cli/hs-export-events.mjs +1252 -0
- package/dist/cli/hs-handoff.mjs +2576 -0
- package/dist/cli/hs-index-rebuild.mjs +209 -36
- package/dist/cli/hs-index-reconcile.mjs +212 -39
- package/dist/cli/hs-init.mjs +20 -1
- package/dist/cli/hs-install.mjs +20 -1
- package/dist/cli/hs-join.mjs +20 -1
- package/dist/cli/hs-next-launch.mjs +2698 -0
- package/dist/cli/hs-pin.mjs +1336 -0
- package/dist/cli/hs-prereq.mjs +1380 -0
- package/dist/cli/hs-revalidate.mjs +3257 -0
- package/dist/cli/hs-spawn.mjs +12377 -0
- package/dist/cli/hs-test.mjs +1046 -0
- package/dist/cli/hs-trash.mjs +362 -0
- package/dist/cli/hs-trust.mjs +197 -0
- package/dist/cli/hs-vault-pull.mjs +214 -41
- package/dist/cli/hs-vault-push.mjs +212 -39
- package/dist/cli-templates/harness-commands/claude/hs-res.md +71 -63
- package/dist/cli-templates/harness-commands/cursor/hs-res.md +66 -58
- package/docs/copilot-plugin-install.md +2 -2
- package/package.json +261 -257
- package/plugins/heyspex/.claude-plugin/plugin.json +1 -1
- package/plugins/heyspex/.cursor-plugin/plugin.json +1 -1
- package/scripts/claude-hooks/wip-checkpoint.mjs +17 -2
- package/scripts/claude-statusline/statusline-command.mjs +287 -27
- package/scripts/hs-companion.mjs +8 -0
- package/scripts/install-claude-code-hooks.mjs +104 -3
- package/scripts/install-copilot-hooks.mjs +21 -1
- package/scripts/install-cursor-hooks.mjs +4 -3
- package/scripts/lib/capture-execution-guard.mjs +221 -0
- package/scripts/lib/customer-kit.mjs +48 -0
- package/scripts/lib/hs-companion-settings.mjs +25 -0
- package/scripts/record-grounding.mjs +38 -0
- package/vendor/heyspex-mcp/http-transport.mjs +1 -1
- package/vendor/heyspex-mcp/test-helpers.mjs +37 -23
- package/bin/postinstall.mjs +0 -88
|
@@ -1077,10 +1077,10 @@ var require_stringify = __commonJS({
|
|
|
1077
1077
|
data = Object.assign({}, file.data, data);
|
|
1078
1078
|
const open2 = opts.delimiters[0];
|
|
1079
1079
|
const close = opts.delimiters[1];
|
|
1080
|
-
const
|
|
1080
|
+
const matter5 = engine.stringify(data, options2).trim();
|
|
1081
1081
|
let buf = "";
|
|
1082
|
-
if (
|
|
1083
|
-
buf = newline(open2) + newline(
|
|
1082
|
+
if (matter5 !== "{}") {
|
|
1083
|
+
buf = newline(open2) + newline(matter5) + newline(close);
|
|
1084
1084
|
}
|
|
1085
1085
|
if (typeof file.excerpt === "string" && file.excerpt !== "") {
|
|
1086
1086
|
if (str2.indexOf(file.excerpt.trim()) === -1) {
|
|
@@ -1186,19 +1186,19 @@ var require_gray_matter = __commonJS({
|
|
|
1186
1186
|
var toFile = require_to_file();
|
|
1187
1187
|
var parse2 = require_parse();
|
|
1188
1188
|
var utils = require_utils();
|
|
1189
|
-
function
|
|
1189
|
+
function matter5(input, options2) {
|
|
1190
1190
|
if (input === "") {
|
|
1191
1191
|
return { data: {}, content: input, excerpt: "", orig: input };
|
|
1192
1192
|
}
|
|
1193
1193
|
let file = toFile(input);
|
|
1194
|
-
const cached =
|
|
1194
|
+
const cached = matter5.cache[file.content];
|
|
1195
1195
|
if (!options2) {
|
|
1196
1196
|
if (cached) {
|
|
1197
1197
|
file = Object.assign({}, cached);
|
|
1198
1198
|
file.orig = cached.orig;
|
|
1199
1199
|
return file;
|
|
1200
1200
|
}
|
|
1201
|
-
|
|
1201
|
+
matter5.cache[file.content] = file;
|
|
1202
1202
|
}
|
|
1203
1203
|
return parseMatter(file, options2);
|
|
1204
1204
|
}
|
|
@@ -1220,7 +1220,7 @@ var require_gray_matter = __commonJS({
|
|
|
1220
1220
|
}
|
|
1221
1221
|
str2 = str2.slice(openLen);
|
|
1222
1222
|
const len = str2.length;
|
|
1223
|
-
const language =
|
|
1223
|
+
const language = matter5.language(str2, opts);
|
|
1224
1224
|
if (language.name) {
|
|
1225
1225
|
file.language = language.name;
|
|
1226
1226
|
str2 = str2.slice(language.raw.length);
|
|
@@ -1255,24 +1255,24 @@ var require_gray_matter = __commonJS({
|
|
|
1255
1255
|
}
|
|
1256
1256
|
return file;
|
|
1257
1257
|
}
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
if (typeof file === "string") file =
|
|
1258
|
+
matter5.engines = engines2;
|
|
1259
|
+
matter5.stringify = function(file, data, options2) {
|
|
1260
|
+
if (typeof file === "string") file = matter5(file, options2);
|
|
1261
1261
|
return stringify(file, data, options2);
|
|
1262
1262
|
};
|
|
1263
|
-
|
|
1263
|
+
matter5.read = function(filepath, options2) {
|
|
1264
1264
|
const str2 = fs12.readFileSync(filepath, "utf8");
|
|
1265
|
-
const file =
|
|
1265
|
+
const file = matter5(str2, options2);
|
|
1266
1266
|
file.path = filepath;
|
|
1267
1267
|
return file;
|
|
1268
1268
|
};
|
|
1269
|
-
|
|
1269
|
+
matter5.test = function(str2, options2) {
|
|
1270
1270
|
return utils.startsWith(str2, defaults(options2).delimiters[0]);
|
|
1271
1271
|
};
|
|
1272
|
-
|
|
1272
|
+
matter5.language = function(str2, options2) {
|
|
1273
1273
|
const opts = defaults(options2);
|
|
1274
1274
|
const open2 = opts.delimiters[0];
|
|
1275
|
-
if (
|
|
1275
|
+
if (matter5.test(str2)) {
|
|
1276
1276
|
str2 = str2.slice(open2.length);
|
|
1277
1277
|
}
|
|
1278
1278
|
const language = str2.slice(0, str2.search(/\r?\n/));
|
|
@@ -1281,11 +1281,11 @@ var require_gray_matter = __commonJS({
|
|
|
1281
1281
|
name: language ? language.trim() : ""
|
|
1282
1282
|
};
|
|
1283
1283
|
};
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1284
|
+
matter5.cache = {};
|
|
1285
|
+
matter5.clearCache = function() {
|
|
1286
|
+
matter5.cache = {};
|
|
1287
1287
|
};
|
|
1288
|
-
module2.exports =
|
|
1288
|
+
module2.exports = matter5;
|
|
1289
1289
|
}
|
|
1290
1290
|
});
|
|
1291
1291
|
|
|
@@ -3072,11 +3072,12 @@ function getPostgresAdminDb() {
|
|
|
3072
3072
|
function inertClient() {
|
|
3073
3073
|
return false;
|
|
3074
3074
|
}
|
|
3075
|
-
var isNeonPool;
|
|
3075
|
+
var isNeonPool, registerVaultScopedDbAccessor;
|
|
3076
3076
|
var init_postgres_client_cli_shim = __esm({
|
|
3077
3077
|
"dist/cli/._postgres-client.cli-shim.mjs"() {
|
|
3078
3078
|
"use strict";
|
|
3079
3079
|
isNeonPool = inertClient;
|
|
3080
|
+
registerVaultScopedDbAccessor = inertClient;
|
|
3080
3081
|
}
|
|
3081
3082
|
});
|
|
3082
3083
|
|
|
@@ -3333,6 +3334,141 @@ var init_clients = __esm({
|
|
|
3333
3334
|
}
|
|
3334
3335
|
});
|
|
3335
3336
|
|
|
3337
|
+
// spex-console/src/lib/rate-limits.ts
|
|
3338
|
+
var RATE_LIMIT_BUDGETS;
|
|
3339
|
+
var init_rate_limits = __esm({
|
|
3340
|
+
"spex-console/src/lib/rate-limits.ts"() {
|
|
3341
|
+
"use strict";
|
|
3342
|
+
RATE_LIMIT_BUDGETS = {
|
|
3343
|
+
mcp_tool_calls: { daily: 500, hourly: 125 },
|
|
3344
|
+
spec_writes: { daily: 100, hourly: 25 },
|
|
3345
|
+
capture_sessions: { daily: 20, hourly: 5 },
|
|
3346
|
+
// Paul's Advocate free-text chat ([[HS-4YYB-XEBI-TASK-paul-s-advocate-answers-real-questions]]):
|
|
3347
|
+
// a public YC reviewer can otherwise run up LLM spend on an unauthenticated-feeling
|
|
3348
|
+
// widget. 30/hour matches the builder brief's "e.g. 30 messages/hour" starting point;
|
|
3349
|
+
// daily is 4x hourly (looser than the 25%-of-daily pattern above — a reviewer chatting
|
|
3350
|
+
// steadily through a demo session should not get cut off mid-conversation).
|
|
3351
|
+
advocate_chat: { daily: 120, hourly: 30 }
|
|
3352
|
+
};
|
|
3353
|
+
}
|
|
3354
|
+
});
|
|
3355
|
+
|
|
3356
|
+
// spex-console/src/lib/plan-tier.ts
|
|
3357
|
+
function scaledBudgets(multiplier) {
|
|
3358
|
+
const out = {};
|
|
3359
|
+
for (const [bucket, budget] of Object.entries(RATE_LIMIT_BUDGETS)) {
|
|
3360
|
+
out[bucket] = {
|
|
3361
|
+
daily: Math.round(budget.daily * multiplier),
|
|
3362
|
+
hourly: Math.round(budget.hourly * multiplier)
|
|
3363
|
+
};
|
|
3364
|
+
}
|
|
3365
|
+
return Object.freeze(out);
|
|
3366
|
+
}
|
|
3367
|
+
var PLAN_TIER_RATE_LIMIT_MULTIPLIER, PLAN_TIER_LIMITS;
|
|
3368
|
+
var init_plan_tier = __esm({
|
|
3369
|
+
"spex-console/src/lib/plan-tier.ts"() {
|
|
3370
|
+
"use strict";
|
|
3371
|
+
init_sql_orm_inert_cli_shim();
|
|
3372
|
+
init_postgres_client_cli_shim();
|
|
3373
|
+
init_postgres();
|
|
3374
|
+
init_rate_limits();
|
|
3375
|
+
PLAN_TIER_RATE_LIMIT_MULTIPLIER = {
|
|
3376
|
+
free: 1,
|
|
3377
|
+
pro: 4,
|
|
3378
|
+
enterprise: 20
|
|
3379
|
+
};
|
|
3380
|
+
PLAN_TIER_LIMITS = {
|
|
3381
|
+
free: {
|
|
3382
|
+
statement_timeout_ms: 5e3,
|
|
3383
|
+
read_work_mem: "4MB",
|
|
3384
|
+
rate_limit_budgets: scaledBudgets(PLAN_TIER_RATE_LIMIT_MULTIPLIER.free)
|
|
3385
|
+
},
|
|
3386
|
+
pro: {
|
|
3387
|
+
statement_timeout_ms: 15e3,
|
|
3388
|
+
read_work_mem: "16MB",
|
|
3389
|
+
rate_limit_budgets: scaledBudgets(PLAN_TIER_RATE_LIMIT_MULTIPLIER.pro)
|
|
3390
|
+
},
|
|
3391
|
+
enterprise: {
|
|
3392
|
+
statement_timeout_ms: 3e4,
|
|
3393
|
+
read_work_mem: "64MB",
|
|
3394
|
+
rate_limit_budgets: scaledBudgets(PLAN_TIER_RATE_LIMIT_MULTIPLIER.enterprise)
|
|
3395
|
+
}
|
|
3396
|
+
};
|
|
3397
|
+
}
|
|
3398
|
+
});
|
|
3399
|
+
|
|
3400
|
+
// spex-console/src/lib/db/clients/vault-router.ts
|
|
3401
|
+
import { existsSync as existsSync8, readFileSync as readFileSync13 } from "node:fs";
|
|
3402
|
+
import { homedir as homedir10 } from "node:os";
|
|
3403
|
+
import { join as join11 } from "node:path";
|
|
3404
|
+
var CREDENTIALS_PATH, ROUTER_KEY, globalRouter, router;
|
|
3405
|
+
var init_vault_router = __esm({
|
|
3406
|
+
"spex-console/src/lib/db/clients/vault-router.ts"() {
|
|
3407
|
+
"use strict";
|
|
3408
|
+
init_sql_orm_inert_cli_shim();
|
|
3409
|
+
init_sql_orm_inert_cli_shim();
|
|
3410
|
+
init_postgres();
|
|
3411
|
+
init_postgres_client_cli_shim();
|
|
3412
|
+
CREDENTIALS_PATH = join11(homedir10(), ".heyspex", "credentials.yaml");
|
|
3413
|
+
ROUTER_KEY = Symbol.for("heyspex.vaultRouter");
|
|
3414
|
+
globalRouter = globalThis;
|
|
3415
|
+
if (!globalRouter[ROUTER_KEY]) {
|
|
3416
|
+
globalRouter[ROUTER_KEY] = {
|
|
3417
|
+
dedicated: /* @__PURE__ */ new Map(),
|
|
3418
|
+
refCache: /* @__PURE__ */ new Map(),
|
|
3419
|
+
warnedSchemaMissing: false
|
|
3420
|
+
};
|
|
3421
|
+
}
|
|
3422
|
+
router = globalRouter[ROUTER_KEY];
|
|
3423
|
+
}
|
|
3424
|
+
});
|
|
3425
|
+
|
|
3426
|
+
// spex-console/src/lib/db/clients/vault-scope.ts
|
|
3427
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3428
|
+
function warnScopeClosedOnce(ctx) {
|
|
3429
|
+
if (ctx.warnedClosed) return;
|
|
3430
|
+
ctx.warnedClosed = true;
|
|
3431
|
+
console.warn(
|
|
3432
|
+
`[vault-scope] db use after vault scope closed; falling back to the pool connection (unscoped) (vaultId: ${ctx.vaultId})`
|
|
3433
|
+
);
|
|
3434
|
+
}
|
|
3435
|
+
function handleScopeClosedAccess(ctx) {
|
|
3436
|
+
if (ctx.onStaleUse === "throw") {
|
|
3437
|
+
throw new VaultScopeClosedError(ctx.vaultId);
|
|
3438
|
+
}
|
|
3439
|
+
warnScopeClosedOnce(ctx);
|
|
3440
|
+
}
|
|
3441
|
+
var VaultScopeClosedError, vaultScopeStorage;
|
|
3442
|
+
var init_vault_scope = __esm({
|
|
3443
|
+
"spex-console/src/lib/db/clients/vault-scope.ts"() {
|
|
3444
|
+
"use strict";
|
|
3445
|
+
init_sql_orm_inert_cli_shim();
|
|
3446
|
+
init_plan_tier();
|
|
3447
|
+
init_postgres_client_cli_shim();
|
|
3448
|
+
init_vault_router();
|
|
3449
|
+
VaultScopeClosedError = class extends Error {
|
|
3450
|
+
vaultId;
|
|
3451
|
+
constructor(vaultId) {
|
|
3452
|
+
super(
|
|
3453
|
+
`Vault scope for "${vaultId}" is closed; this path opted into onStaleUseAfterClose: "throw", so a db handle used after the scope's transaction settled fails loudly instead of silently falling back to the unscoped pool connection.`
|
|
3454
|
+
);
|
|
3455
|
+
this.name = "VaultScopeClosedError";
|
|
3456
|
+
this.vaultId = vaultId;
|
|
3457
|
+
}
|
|
3458
|
+
};
|
|
3459
|
+
vaultScopeStorage = new AsyncLocalStorage();
|
|
3460
|
+
registerVaultScopedDbAccessor(() => {
|
|
3461
|
+
const ctx = vaultScopeStorage.getStore();
|
|
3462
|
+
if (!ctx) return null;
|
|
3463
|
+
if (ctx.closed) {
|
|
3464
|
+
handleScopeClosedAccess(ctx);
|
|
3465
|
+
return null;
|
|
3466
|
+
}
|
|
3467
|
+
return ctx.proxy;
|
|
3468
|
+
});
|
|
3469
|
+
}
|
|
3470
|
+
});
|
|
3471
|
+
|
|
3336
3472
|
// spex-console/src/lib/scheduler/types.ts
|
|
3337
3473
|
var init_types2 = __esm({
|
|
3338
3474
|
"spex-console/src/lib/scheduler/types.ts"() {
|
|
@@ -3992,10 +4128,45 @@ var init_config = __esm({
|
|
|
3992
4128
|
}
|
|
3993
4129
|
});
|
|
3994
4130
|
|
|
3995
|
-
// spex-console/src/lib/
|
|
4131
|
+
// spex-console/src/lib/safe-yaml.ts
|
|
3996
4132
|
import yaml2 from "js-yaml";
|
|
4133
|
+
function dropUndefinedDeep(value) {
|
|
4134
|
+
if (Array.isArray(value)) {
|
|
4135
|
+
return value.filter((item) => item !== void 0).map((item) => dropUndefinedDeep(item));
|
|
4136
|
+
}
|
|
4137
|
+
if (value && typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype) {
|
|
4138
|
+
const out = {};
|
|
4139
|
+
for (const [k, v] of Object.entries(value)) {
|
|
4140
|
+
if (v === void 0) continue;
|
|
4141
|
+
out[k] = dropUndefinedDeep(v);
|
|
4142
|
+
}
|
|
4143
|
+
return out;
|
|
4144
|
+
}
|
|
4145
|
+
return value;
|
|
4146
|
+
}
|
|
4147
|
+
function safeYamlDump(value, options2 = {}) {
|
|
4148
|
+
const { schema: _ignoredSchema, ...rest } = options2;
|
|
4149
|
+
const data = dropUndefinedDeep(value);
|
|
4150
|
+
if (grayMatterYamlStringify) return grayMatterYamlStringify(data, rest);
|
|
4151
|
+
return yaml2.dump(data, { ...rest, schema: SAFE_YAML_SCHEMA });
|
|
4152
|
+
}
|
|
4153
|
+
var import_gray_matter, SAFE_YAML_SCHEMA, grayMatterYamlStringify, YAML_FAILSAFE_SCHEMA;
|
|
4154
|
+
var init_safe_yaml = __esm({
|
|
4155
|
+
"spex-console/src/lib/safe-yaml.ts"() {
|
|
4156
|
+
"use strict";
|
|
4157
|
+
import_gray_matter = __toESM(require_gray_matter(), 1);
|
|
4158
|
+
SAFE_YAML_SCHEMA = yaml2.DEFAULT_SAFE_SCHEMA ?? yaml2.DEFAULT_SCHEMA;
|
|
4159
|
+
grayMatterYamlStringify = (() => {
|
|
4160
|
+
const engine = import_gray_matter.default.engines?.yaml;
|
|
4161
|
+
return typeof engine?.stringify === "function" ? engine.stringify : void 0;
|
|
4162
|
+
})();
|
|
4163
|
+
YAML_FAILSAFE_SCHEMA = yaml2.FAILSAFE_SCHEMA;
|
|
4164
|
+
}
|
|
4165
|
+
});
|
|
4166
|
+
|
|
4167
|
+
// spex-console/src/lib/vault-frontmatter.ts
|
|
3997
4168
|
function normalizeFrontmatterForYaml(frontmatter) {
|
|
3998
|
-
const processed =
|
|
4169
|
+
const processed = dropUndefinedDeep(frontmatter);
|
|
3999
4170
|
for (const [key, value] of Object.entries(processed)) {
|
|
4000
4171
|
if (value instanceof Date) {
|
|
4001
4172
|
processed[key] = value.toISOString();
|
|
@@ -4004,20 +4175,21 @@ function normalizeFrontmatterForYaml(frontmatter) {
|
|
|
4004
4175
|
return processed;
|
|
4005
4176
|
}
|
|
4006
4177
|
function stringifySpecMarkdown(body, frontmatter) {
|
|
4007
|
-
const fm =
|
|
4178
|
+
const fm = safeYamlDump(normalizeFrontmatterForYaml(frontmatter), YAML_STRINGIFY_OPTIONS).trim();
|
|
4008
4179
|
return `---
|
|
4009
4180
|
${fm}
|
|
4010
4181
|
---
|
|
4011
4182
|
${body}`;
|
|
4012
4183
|
}
|
|
4013
4184
|
function parseSpecMarkdown(raw) {
|
|
4014
|
-
return (0,
|
|
4185
|
+
return (0, import_gray_matter2.default)(raw);
|
|
4015
4186
|
}
|
|
4016
|
-
var
|
|
4187
|
+
var import_gray_matter2, YAML_STRINGIFY_OPTIONS;
|
|
4017
4188
|
var init_vault_frontmatter = __esm({
|
|
4018
4189
|
"spex-console/src/lib/vault-frontmatter.ts"() {
|
|
4019
4190
|
"use strict";
|
|
4020
|
-
|
|
4191
|
+
import_gray_matter2 = __toESM(require_gray_matter(), 1);
|
|
4192
|
+
init_safe_yaml();
|
|
4021
4193
|
YAML_STRINGIFY_OPTIONS = {
|
|
4022
4194
|
quotingType: '"',
|
|
4023
4195
|
skipInvalid: true,
|
|
@@ -5053,11 +5225,11 @@ var init_guardrail_naming = __esm({
|
|
|
5053
5225
|
import { createHash as createHash3 } from "node:crypto";
|
|
5054
5226
|
import { promises as fs6 } from "node:fs";
|
|
5055
5227
|
import path9 from "node:path";
|
|
5056
|
-
var
|
|
5228
|
+
var import_gray_matter3;
|
|
5057
5229
|
var init_parser = __esm({
|
|
5058
5230
|
"spex-console/src/lib/indexer/parser.ts"() {
|
|
5059
5231
|
"use strict";
|
|
5060
|
-
|
|
5232
|
+
import_gray_matter3 = __toESM(require_gray_matter(), 1);
|
|
5061
5233
|
init_vault_id();
|
|
5062
5234
|
init_vault_shared();
|
|
5063
5235
|
}
|
|
@@ -5196,12 +5368,12 @@ var init_linkage_validation = __esm({
|
|
|
5196
5368
|
});
|
|
5197
5369
|
|
|
5198
5370
|
// spex-console/src/lib/perf-timing.ts
|
|
5199
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5371
|
+
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
5200
5372
|
var storage;
|
|
5201
5373
|
var init_perf_timing = __esm({
|
|
5202
5374
|
"spex-console/src/lib/perf-timing.ts"() {
|
|
5203
5375
|
"use strict";
|
|
5204
|
-
storage = new
|
|
5376
|
+
storage = new AsyncLocalStorage2();
|
|
5205
5377
|
}
|
|
5206
5378
|
});
|
|
5207
5379
|
|
|
@@ -5223,12 +5395,12 @@ var init_planning_flow_model = __esm({
|
|
|
5223
5395
|
});
|
|
5224
5396
|
|
|
5225
5397
|
// spex-console/src/lib/request-memo.ts
|
|
5226
|
-
import { AsyncLocalStorage as
|
|
5398
|
+
import { AsyncLocalStorage as AsyncLocalStorage3 } from "node:async_hooks";
|
|
5227
5399
|
var storage2;
|
|
5228
5400
|
var init_request_memo = __esm({
|
|
5229
5401
|
"spex-console/src/lib/request-memo.ts"() {
|
|
5230
5402
|
"use strict";
|
|
5231
|
-
storage2 = new
|
|
5403
|
+
storage2 = new AsyncLocalStorage3();
|
|
5232
5404
|
}
|
|
5233
5405
|
});
|
|
5234
5406
|
|
|
@@ -5557,10 +5729,9 @@ var init_search_body_hit = __esm({
|
|
|
5557
5729
|
|
|
5558
5730
|
// spex-console/src/lib/vault.ts
|
|
5559
5731
|
import { spawn } from "node:child_process";
|
|
5560
|
-
import { readdirSync as readdirSync2, readFileSync as
|
|
5732
|
+
import { readdirSync as readdirSync2, readFileSync as readFileSync14, statSync as statSync5 } from "node:fs";
|
|
5561
5733
|
import { promises as fs9 } from "node:fs";
|
|
5562
5734
|
import path14 from "node:path";
|
|
5563
|
-
import yaml3 from "js-yaml";
|
|
5564
5735
|
function normalizeDateField(value) {
|
|
5565
5736
|
let d = null;
|
|
5566
5737
|
if (value instanceof Date) {
|
|
@@ -5809,7 +5980,7 @@ async function parseLoadedSpec(absPath, root) {
|
|
|
5809
5980
|
}
|
|
5810
5981
|
let parsed;
|
|
5811
5982
|
try {
|
|
5812
|
-
parsed = (0,
|
|
5983
|
+
parsed = (0, import_gray_matter4.default)(raw);
|
|
5813
5984
|
} catch {
|
|
5814
5985
|
const summary2 = toSummary(absPath, root, {}, raw);
|
|
5815
5986
|
return { ...summary2, frontmatter: {}, body: raw, absPath };
|
|
@@ -5823,11 +5994,11 @@ function extractWikilinks(value) {
|
|
|
5823
5994
|
const arr = Array.isArray(value) ? value : [value];
|
|
5824
5995
|
return arr.map((v) => normalizeWikilink(String(v))).filter(Boolean);
|
|
5825
5996
|
}
|
|
5826
|
-
var
|
|
5997
|
+
var import_gray_matter4, DIAGNOSE_SEVERITY_TIER, VAULT_CACHE_TTL_MS, VAULT_CACHE_TTL_WATCHED_MS, VAULT_CACHE_KEY, vaultCacheStore, VAULT_CACHE_DELTA_LISTENERS_KEY, vaultCacheDeltaListeners, SEARCH_TEXT_KEY, searchTextStore, VAULT_SNAPSHOT_KEY, vaultSnapshotStore, VaultDiskWriteError;
|
|
5827
5998
|
var init_vault = __esm({
|
|
5828
5999
|
"spex-console/src/lib/vault.ts"() {
|
|
5829
6000
|
"use strict";
|
|
5830
|
-
|
|
6001
|
+
import_gray_matter4 = __toESM(require_gray_matter(), 1);
|
|
5831
6002
|
init_diagnose_skeleton();
|
|
5832
6003
|
init_auth();
|
|
5833
6004
|
init_capture_vault();
|
|
@@ -5838,6 +6009,7 @@ var init_vault = __esm({
|
|
|
5838
6009
|
init_skips();
|
|
5839
6010
|
init_clients();
|
|
5840
6011
|
init_postgres_client_cli_shim();
|
|
6012
|
+
init_vault_scope();
|
|
5841
6013
|
init_helpers();
|
|
5842
6014
|
init_index_write_service();
|
|
5843
6015
|
init_spec_read_service();
|
|
@@ -5854,6 +6026,7 @@ var init_vault = __esm({
|
|
|
5854
6026
|
init_planning_flow_model();
|
|
5855
6027
|
init_request_memo();
|
|
5856
6028
|
init_review_mode();
|
|
6029
|
+
init_safe_yaml();
|
|
5857
6030
|
init_active_milestone();
|
|
5858
6031
|
init_area();
|
|
5859
6032
|
init_claim_eligibility();
|
|
@@ -7670,7 +7843,7 @@ var init_esm2 = __esm({
|
|
|
7670
7843
|
});
|
|
7671
7844
|
|
|
7672
7845
|
// spex-console/bin/hs-vault-pull.ts
|
|
7673
|
-
import { readFileSync as
|
|
7846
|
+
import { readFileSync as readFileSync16 } from "node:fs";
|
|
7674
7847
|
import path15 from "node:path";
|
|
7675
7848
|
import process4 from "node:process";
|
|
7676
7849
|
|
|
@@ -8495,7 +8668,7 @@ function formatPullSummary(result, { detail = false, sampleSize = 5 } = {}) {
|
|
|
8495
8668
|
}
|
|
8496
8669
|
|
|
8497
8670
|
// spex-console/src/lib/vault-sync/pull-io.ts
|
|
8498
|
-
import { promises as fs10, readFileSync as
|
|
8671
|
+
import { promises as fs10, readFileSync as readFileSync15 } from "node:fs";
|
|
8499
8672
|
import { EOL } from "node:os";
|
|
8500
8673
|
import nodePath3 from "node:path";
|
|
8501
8674
|
|
|
@@ -8540,7 +8713,7 @@ var PullTargetNotVaultError = class extends Error {
|
|
|
8540
8713
|
function assertPullTargetIsVault(repoRoot) {
|
|
8541
8714
|
let text2;
|
|
8542
8715
|
try {
|
|
8543
|
-
text2 =
|
|
8716
|
+
text2 = readFileSync15(nodePath3.join(repoRoot, "heyspex.yaml"), "utf8");
|
|
8544
8717
|
} catch {
|
|
8545
8718
|
text2 = null;
|
|
8546
8719
|
}
|
|
@@ -9442,7 +9615,7 @@ function makeSleeper() {
|
|
|
9442
9615
|
}
|
|
9443
9616
|
function readMarkerVaultId(vaultRoot2) {
|
|
9444
9617
|
try {
|
|
9445
|
-
return parseVaultId(
|
|
9618
|
+
return parseVaultId(readFileSync16(path15.join(vaultRoot2, "heyspex.yaml"), "utf8"));
|
|
9446
9619
|
} catch {
|
|
9447
9620
|
return null;
|
|
9448
9621
|
}
|