delimit-cli 4.1.9 → 4.1.10
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/lib/cross-model-hooks.js +48 -11
- package/package.json +1 -1
package/lib/cross-model-hooks.js
CHANGED
|
@@ -802,9 +802,23 @@ async function hookSessionStart() {
|
|
|
802
802
|
const lines = [];
|
|
803
803
|
lines.push('=== Delimit Status ===');
|
|
804
804
|
|
|
805
|
-
// Server status + tool count
|
|
806
805
|
const home = getHome();
|
|
807
|
-
const
|
|
806
|
+
const delimitHome = path.join(home, '.delimit');
|
|
807
|
+
const cwd = process.cwd();
|
|
808
|
+
|
|
809
|
+
// Governance status + policy source
|
|
810
|
+
const projectPolicy = fs.existsSync(path.join(cwd, 'delimit.yml')) || fs.existsSync(path.join(cwd, '.delimit', 'policies.yml'));
|
|
811
|
+
const userPolicy = fs.existsSync(path.join(delimitHome, 'delimit.yml'));
|
|
812
|
+
if (projectPolicy) {
|
|
813
|
+
lines.push('Governance: active | policy=project');
|
|
814
|
+
} else if (userPolicy) {
|
|
815
|
+
lines.push('Governance: active | policy=user');
|
|
816
|
+
} else {
|
|
817
|
+
lines.push('Governance: not initialized -- run npx delimit-cli init');
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
// Server status + tool count
|
|
821
|
+
const serverFile = path.join(delimitHome, 'server', 'ai', 'server.py');
|
|
808
822
|
if (fs.existsSync(serverFile)) {
|
|
809
823
|
try {
|
|
810
824
|
const content = fs.readFileSync(serverFile, 'utf-8');
|
|
@@ -817,20 +831,43 @@ async function hookSessionStart() {
|
|
|
817
831
|
lines.push('Server: not installed -- run npx delimit-cli setup');
|
|
818
832
|
}
|
|
819
833
|
|
|
820
|
-
//
|
|
821
|
-
const
|
|
822
|
-
const
|
|
823
|
-
|
|
824
|
-
|
|
834
|
+
// Hooks + audit
|
|
835
|
+
const settingsFile = path.join(home, '.claude', 'settings.json');
|
|
836
|
+
const hooksEnabled = fs.existsSync(settingsFile) && fs.readFileSync(settingsFile, 'utf-8').includes('"hooks"');
|
|
837
|
+
const auditOn = fs.existsSync(path.join(delimitHome, 'audit'));
|
|
838
|
+
lines.push(`Hooks: ${hooksEnabled ? 'enabled' : 'disabled'} | Audit: ${auditOn ? 'on' : 'off'}`);
|
|
839
|
+
|
|
840
|
+
// MCP registration
|
|
841
|
+
const mcpFile = path.join(home, '.mcp.json');
|
|
842
|
+
const mcpRegistered = fs.existsSync(mcpFile) && fs.readFileSync(mcpFile, 'utf-8').includes('delimit');
|
|
843
|
+
lines.push(`MCP: ${mcpRegistered ? 'delimit registered' : 'not registered -- run npx delimit-cli setup'}`);
|
|
825
844
|
|
|
826
|
-
|
|
827
|
-
|
|
845
|
+
// Deliberation models
|
|
846
|
+
const modelsFile = path.join(delimitHome, 'models.json');
|
|
847
|
+
const modelNames = [];
|
|
848
|
+
try {
|
|
849
|
+
if (fs.existsSync(modelsFile)) {
|
|
850
|
+
const models = JSON.parse(fs.readFileSync(modelsFile, 'utf-8'));
|
|
851
|
+
for (const [key, val] of Object.entries(models)) {
|
|
852
|
+
if (val && val.enabled) modelNames.push(val.name || key);
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
} catch {}
|
|
856
|
+
// Also check env vars for available models
|
|
857
|
+
if (modelNames.length === 0) {
|
|
858
|
+
const envModels = [];
|
|
859
|
+
if (process.env.XAI_API_KEY) envModels.push('Grok');
|
|
860
|
+
if (process.env.GOOGLE_APPLICATION_CREDENTIALS) envModels.push('Gemini');
|
|
861
|
+
if (process.env.OPENAI_API_KEY) envModels.push('Codex');
|
|
862
|
+
if (envModels.length > 0) {
|
|
863
|
+
lines.push(`Deliberation: ${envModels.join(' + ')}`);
|
|
864
|
+
}
|
|
828
865
|
} else {
|
|
829
|
-
lines.push(
|
|
866
|
+
lines.push(`Deliberation: ${modelNames.join(' + ')}`);
|
|
830
867
|
}
|
|
831
868
|
|
|
832
869
|
// Last session context (prevents cross-session drift)
|
|
833
|
-
const sessionsDir = path.join(
|
|
870
|
+
const sessionsDir = path.join(delimitHome, 'sessions');
|
|
834
871
|
try {
|
|
835
872
|
if (fs.existsSync(sessionsDir)) {
|
|
836
873
|
const sessions = fs.readdirSync(sessionsDir).filter(f => f.startsWith('session_')).sort().reverse();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "delimit-cli",
|
|
3
3
|
"mcpName": "io.github.delimit-ai/delimit-mcp-server",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.10",
|
|
5
5
|
"description": "Unify Claude Code, Codex, Cursor, and Gemini CLI with persistent context, governance, and multi-model debate.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|