xtrm-tools 0.5.38 → 0.5.40
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/plugin.json +1 -1
- package/cli/dist/index.cjs +64 -16
- package/cli/dist/index.cjs.map +1 -1
- package/cli/package.json +1 -1
- package/hooks/beads-stop-gate.mjs +4 -4
- package/hooks/using-xtrm-reminder.mjs +13 -1
- package/package.json +1 -1
- package/plugins/xtrm-tools/.claude-plugin/plugin.json +1 -1
- package/plugins/xtrm-tools/hooks/beads-stop-gate.mjs +4 -4
- package/plugins/xtrm-tools/hooks/using-xtrm-reminder.mjs +13 -1
package/cli/package.json
CHANGED
|
@@ -31,14 +31,14 @@ withSafeBdContext(() => {
|
|
|
31
31
|
runtime: 'claude',
|
|
32
32
|
sessionId: ctx.sessionId,
|
|
33
33
|
layer: 'gate',
|
|
34
|
-
kind: 'gate.stop.
|
|
35
|
-
outcome: '
|
|
34
|
+
kind: 'gate.stop.nudge',
|
|
35
|
+
outcome: 'nudge',
|
|
36
36
|
issueId: decision.claimed ?? null,
|
|
37
37
|
message,
|
|
38
38
|
extra: { reason_code: decision.reason },
|
|
39
39
|
});
|
|
40
|
-
process.
|
|
41
|
-
process.exit(
|
|
40
|
+
process.stdout.write(JSON.stringify({ additionalContext: message }) + '\n');
|
|
41
|
+
process.exit(0);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
logEvent({
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// so the agent starts every session already oriented on the xtrm workflow.
|
|
5
5
|
// Exit 0 in all paths (fail open).
|
|
6
6
|
|
|
7
|
-
import { readFileSync } from 'node:fs';
|
|
7
|
+
import { readFileSync, existsSync } from 'node:fs';
|
|
8
8
|
import { join } from 'node:path';
|
|
9
9
|
|
|
10
10
|
let input;
|
|
@@ -24,6 +24,18 @@ try {
|
|
|
24
24
|
// Strip YAML frontmatter (--- ... ---\n)
|
|
25
25
|
content = content.replace(/^---[\s\S]*?---\n/, '').trim();
|
|
26
26
|
|
|
27
|
+
// Append .xtrm/memory.md if it exists in the project
|
|
28
|
+
const cwd = input?.cwd ?? process.env.CLAUDE_PROJECT_DIR ?? process.cwd();
|
|
29
|
+
const memoryPath = join(cwd, '.xtrm', 'memory.md');
|
|
30
|
+
if (existsSync(memoryPath)) {
|
|
31
|
+
try {
|
|
32
|
+
const memory = readFileSync(memoryPath, 'utf8').trim();
|
|
33
|
+
if (memory) {
|
|
34
|
+
content += '\n\n---\n\n' + memory;
|
|
35
|
+
}
|
|
36
|
+
} catch { /* fail open */ }
|
|
37
|
+
}
|
|
38
|
+
|
|
27
39
|
process.stdout.write(
|
|
28
40
|
JSON.stringify({
|
|
29
41
|
hookSpecificOutput: {
|
package/package.json
CHANGED
|
@@ -31,14 +31,14 @@ withSafeBdContext(() => {
|
|
|
31
31
|
runtime: 'claude',
|
|
32
32
|
sessionId: ctx.sessionId,
|
|
33
33
|
layer: 'gate',
|
|
34
|
-
kind: 'gate.stop.
|
|
35
|
-
outcome: '
|
|
34
|
+
kind: 'gate.stop.nudge',
|
|
35
|
+
outcome: 'nudge',
|
|
36
36
|
issueId: decision.claimed ?? null,
|
|
37
37
|
message,
|
|
38
38
|
extra: { reason_code: decision.reason },
|
|
39
39
|
});
|
|
40
|
-
process.
|
|
41
|
-
process.exit(
|
|
40
|
+
process.stdout.write(JSON.stringify({ additionalContext: message }) + '\n');
|
|
41
|
+
process.exit(0);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
logEvent({
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// so the agent starts every session already oriented on the xtrm workflow.
|
|
5
5
|
// Exit 0 in all paths (fail open).
|
|
6
6
|
|
|
7
|
-
import { readFileSync } from 'node:fs';
|
|
7
|
+
import { readFileSync, existsSync } from 'node:fs';
|
|
8
8
|
import { join } from 'node:path';
|
|
9
9
|
|
|
10
10
|
let input;
|
|
@@ -24,6 +24,18 @@ try {
|
|
|
24
24
|
// Strip YAML frontmatter (--- ... ---\n)
|
|
25
25
|
content = content.replace(/^---[\s\S]*?---\n/, '').trim();
|
|
26
26
|
|
|
27
|
+
// Append .xtrm/memory.md if it exists in the project
|
|
28
|
+
const cwd = input?.cwd ?? process.env.CLAUDE_PROJECT_DIR ?? process.cwd();
|
|
29
|
+
const memoryPath = join(cwd, '.xtrm', 'memory.md');
|
|
30
|
+
if (existsSync(memoryPath)) {
|
|
31
|
+
try {
|
|
32
|
+
const memory = readFileSync(memoryPath, 'utf8').trim();
|
|
33
|
+
if (memory) {
|
|
34
|
+
content += '\n\n---\n\n' + memory;
|
|
35
|
+
}
|
|
36
|
+
} catch { /* fail open */ }
|
|
37
|
+
}
|
|
38
|
+
|
|
27
39
|
process.stdout.write(
|
|
28
40
|
JSON.stringify({
|
|
29
41
|
hookSpecificOutput: {
|