gramatr 0.3.0 → 0.3.44

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/AGENTS.md ADDED
@@ -0,0 +1,17 @@
1
+ # Gramatr Codex Guidance
2
+
3
+ ## Repo Expectations
4
+
5
+ - Prefer gramatr memory and project handoff context over ad hoc local summaries.
6
+ - Treat Codex hook augmentation as authoritative when a `[GMTR Intelligence]` block is present.
7
+ - If gramatr augmentation is missing, query gramatr memory before relying on stale local notes.
8
+ - Prefer TypeScript implementations over shell scripts for client integration code unless the platform requires shell.
9
+ - Maintain test coverage for new hook and utility logic.
10
+
11
+ ## Codex Integration
12
+
13
+ - Repo-local Codex hooks are configured in `.codex/hooks.json`.
14
+ - `UserPromptSubmit` is responsible for prompt enrichment.
15
+ - `SessionStart` is responsible for session restore and continuity.
16
+ - Hook failures must degrade cleanly and never block the user session.
17
+
package/codex/install.ts CHANGED
@@ -56,12 +56,25 @@ function main(): void {
56
56
  const currentFile = fileURLToPath(import.meta.url);
57
57
  const codexSourceDir = dirname(currentFile);
58
58
  const clientSourceDir = dirname(codexSourceDir);
59
- const packagesDir = dirname(clientSourceDir);
60
- const repoRoot = dirname(packagesDir);
61
59
  const codexTargetDir = join(gmtrDir, 'codex');
62
60
  const sharedHookUtilsSource = join(clientSourceDir, 'hooks', 'lib', 'gmtr-hook-utils.ts');
63
61
  const sharedHookUtilsTarget = join(gmtrDir, 'hooks', 'lib', 'gmtr-hook-utils.ts');
64
- const managedAgentsContent = readFileSync(join(repoRoot, 'AGENTS.md'), 'utf8');
62
+
63
+ // AGENTS.md: check package root first (npm install), then repo root (dev)
64
+ let managedAgentsContent = '';
65
+ const agentsMdCandidates = [
66
+ join(clientSourceDir, 'AGENTS.md'), // npm package root
67
+ join(dirname(dirname(clientSourceDir)), 'AGENTS.md'), // monorepo root
68
+ ];
69
+ for (const candidate of agentsMdCandidates) {
70
+ if (existsSync(candidate)) {
71
+ managedAgentsContent = readFileSync(candidate, 'utf8');
72
+ break;
73
+ }
74
+ }
75
+ if (!managedAgentsContent) {
76
+ log(' WARN: AGENTS.md not found — skipping Codex agents block');
77
+ }
65
78
 
66
79
  ensureDir(gmtrDir);
67
80
  ensureDir(codexHome);
package/core/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** Auto-generated by version-sync.ts — do not edit */
2
- export const VERSION = '0.3.0';
2
+ export const VERSION = '0.3.44';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gramatr",
3
- "version": "0.3.0",
3
+ "version": "0.3.44",
4
4
  "description": "gramatr — your cross-agent AI brain. Intelligence layer for Claude Code, Codex, Gemini CLI.",
5
5
  "license": "MIT",
6
6
  "repository": {