Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions hindsight-integrations/claude-code/tests/test_manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""Validate that JSON manifests are strict-valid JSON (no trailing commas, etc.)."""

import json
from pathlib import Path

INTEGRATION_ROOT = Path(__file__).resolve().parent.parent


def test_hooks_json_is_valid():
path = INTEGRATION_ROOT / "hooks" / "hooks.json"
raw = path.read_text()
parsed = json.loads(raw)
assert "hooks" in parsed
assert isinstance(parsed["hooks"], dict)
4 changes: 2 additions & 2 deletions hindsight-integrations/openclaw/openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
"type": "number",
"description": "Interval in ms to batch retain/recall log summaries. 0 = log every event individually. Default: 300000 (5 min).",
"default": 300000
},
}
},
"additionalProperties": false
},
Expand Down Expand Up @@ -349,6 +349,6 @@
"logSummaryIntervalMs": {
"label": "Log Summary Interval (ms)",
"placeholder": "300000"
},
}
}
}
22 changes: 22 additions & 0 deletions hindsight-integrations/openclaw/src/manifest.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { describe, it, expect } from 'vitest';
import { readFileSync } from 'fs';
import { resolve, dirname } from 'path';
import { fileURLToPath } from 'url';

const __dirname = dirname(fileURLToPath(import.meta.url));
const manifestPath = resolve(__dirname, '..', 'openclaw.plugin.json');

describe('openclaw.plugin.json', () => {
it('is valid JSON', () => {
const raw = readFileSync(manifestPath, 'utf-8');
expect(() => JSON.parse(raw)).not.toThrow();
});

it('has required top-level fields', () => {
const manifest = JSON.parse(readFileSync(manifestPath, 'utf-8'));
expect(manifest.id).toBe('hindsight-openclaw');
expect(manifest.name).toBeTypeOf('string');
expect(manifest.configSchema).toBeDefined();
expect(manifest.configSchema.properties).toBeDefined();
});
});
Loading