@slope-dev/slope 1.62.0 → 1.62.2

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.
@@ -0,0 +1,53 @@
1
+ import { existsSync, readFileSync } from 'node:fs';
2
+ import { homedir } from 'node:os';
3
+ import { join, resolve } from 'node:path';
4
+ function resolveCodexHome() {
5
+ const override = process.env.SLOPE_CODEX_HOME ?? process.env.CODEX_HOME;
6
+ return override && override.trim().length > 0 ? resolve(override.trim()) : join(homedir(), '.codex');
7
+ }
8
+ function collectCodexGuardNames(filePath) {
9
+ const names = new Set();
10
+ if (!existsSync(filePath))
11
+ return names;
12
+ let parsed;
13
+ try {
14
+ parsed = JSON.parse(readFileSync(filePath, 'utf8'));
15
+ }
16
+ catch {
17
+ return names;
18
+ }
19
+ if (!parsed.hooks || typeof parsed.hooks !== 'object' || Array.isArray(parsed.hooks))
20
+ return names;
21
+ for (const groups of Object.values(parsed.hooks)) {
22
+ if (!Array.isArray(groups))
23
+ continue;
24
+ for (const group of groups) {
25
+ if (!group || typeof group !== 'object' || !Array.isArray(group.hooks))
26
+ continue;
27
+ for (const hook of group.hooks) {
28
+ const command = typeof hook?.command === 'string' ? hook.command : '';
29
+ if (!command.includes('slope-guard.sh'))
30
+ continue;
31
+ const match = command.match(/slope-guard\.sh"?\s+([^\s"']+)/);
32
+ names.add(match?.[1] ?? command);
33
+ }
34
+ }
35
+ }
36
+ return names;
37
+ }
38
+ export function detectActiveHarnessGuardShims(cwd) {
39
+ const candidates = [];
40
+ const projectHooksPath = join(cwd, '.codex', 'hooks.json');
41
+ const userHooksPath = join(resolveCodexHome(), 'hooks.json');
42
+ for (const item of [
43
+ { scope: 'project', configPath: projectHooksPath },
44
+ { scope: 'user', configPath: userHooksPath },
45
+ ]) {
46
+ const guardCount = collectCodexGuardNames(item.configPath).size;
47
+ if (guardCount > 0) {
48
+ candidates.push({ provider: 'codex', scope: item.scope, configPath: item.configPath, guardCount });
49
+ }
50
+ }
51
+ return candidates;
52
+ }
53
+ //# sourceMappingURL=harness-hook-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harness-hook-status.js","sourceRoot":"","sources":["../../src/cli/harness-hook-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAY1C,SAAS,gBAAgB;IACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;IACxE,OAAO,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;AACvG,CAAC;AAED,SAAS,sBAAsB,CAAC,QAAgB;IAC9C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,KAAK,CAAC;IAExC,IAAI,MAA+B,CAAC;IACpC,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAA4B,CAAC;IACjF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAEnG,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK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AAC;QAChE,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;YACnB,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;QACrG,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slope-dev/slope",
3
- "version": "1.62.0",
3
+ "version": "1.62.2",
4
4
  "description": "Quantified sprint metrics for AI-assisted development. Scorecards, handicap tracking, and real-time agent guidance for Claude Code, Cursor, Windsurf, Cline, and OpenCode.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slope",
3
- "version": "1.62.0",
3
+ "version": "1.62.2",
4
4
  "description": "SLOPE sprint tracking, guard hooks, and Codex workflow skills.",
5
5
  "author": {
6
6
  "name": "SLOPE",