delimit-cli 3.6.3 → 3.6.5

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.
Files changed (91) hide show
  1. package/README.md +125 -30
  2. package/package.json +11 -2
  3. package/.dockerignore +0 -7
  4. package/.github/workflows/api-governance.yml +0 -43
  5. package/.github/workflows/ci.yml +0 -22
  6. package/CODE_OF_CONDUCT.md +0 -48
  7. package/CONTRIBUTING.md +0 -67
  8. package/Dockerfile +0 -9
  9. package/SECURITY.md +0 -42
  10. package/adapters/codex-forge.js +0 -107
  11. package/adapters/codex-jamsons.js +0 -142
  12. package/adapters/codex-security.js +0 -94
  13. package/adapters/gemini-forge.js +0 -120
  14. package/adapters/gemini-jamsons.js +0 -152
  15. package/delimit.yml +0 -19
  16. package/gateway/core/__pycache__/__init__.cpython-310.pyc +0 -0
  17. package/gateway/core/__pycache__/auto_baseline.cpython-310.pyc +0 -0
  18. package/gateway/core/__pycache__/ci_formatter.cpython-310.pyc +0 -0
  19. package/gateway/core/__pycache__/contract_ledger.cpython-310.pyc +0 -0
  20. package/gateway/core/__pycache__/dependency_graph.cpython-310.pyc +0 -0
  21. package/gateway/core/__pycache__/dependency_manifest.cpython-310.pyc +0 -0
  22. package/gateway/core/__pycache__/diff_engine_v2.cpython-310.pyc +0 -0
  23. package/gateway/core/__pycache__/event_backbone.cpython-310.pyc +0 -0
  24. package/gateway/core/__pycache__/event_schema.cpython-310.pyc +0 -0
  25. package/gateway/core/__pycache__/explainer.cpython-310.pyc +0 -0
  26. package/gateway/core/__pycache__/gateway.cpython-310.pyc +0 -0
  27. package/gateway/core/__pycache__/gateway_v2.cpython-310.pyc +0 -0
  28. package/gateway/core/__pycache__/gateway_v3.cpython-310.pyc +0 -0
  29. package/gateway/core/__pycache__/impact_analyzer.cpython-310.pyc +0 -0
  30. package/gateway/core/__pycache__/policy_engine.cpython-310.pyc +0 -0
  31. package/gateway/core/__pycache__/registry.cpython-310.pyc +0 -0
  32. package/gateway/core/__pycache__/registry_v2.cpython-310.pyc +0 -0
  33. package/gateway/core/__pycache__/registry_v3.cpython-310.pyc +0 -0
  34. package/gateway/core/__pycache__/semver_classifier.cpython-310.pyc +0 -0
  35. package/gateway/core/__pycache__/spec_detector.cpython-310.pyc +0 -0
  36. package/gateway/core/__pycache__/surface_bridge.cpython-310.pyc +0 -0
  37. package/gateway/core/diff_engine_v2.py.bak +0 -426
  38. package/gateway/core/zero_spec/__pycache__/__init__.cpython-310.pyc +0 -0
  39. package/gateway/core/zero_spec/__pycache__/detector.cpython-310.pyc +0 -0
  40. package/gateway/core/zero_spec/__pycache__/express_extractor.cpython-310.pyc +0 -0
  41. package/gateway/core/zero_spec/__pycache__/fastapi_extractor.cpython-310.pyc +0 -0
  42. package/gateway/core/zero_spec/__pycache__/nestjs_extractor.cpython-310.pyc +0 -0
  43. package/gateway/tasks/__pycache__/__init__.cpython-310.pyc +0 -0
  44. package/gateway/tasks/__pycache__/check_policy.cpython-310.pyc +0 -0
  45. package/gateway/tasks/__pycache__/check_policy_v2.cpython-310.pyc +0 -0
  46. package/gateway/tasks/__pycache__/check_policy_v3.cpython-310.pyc +0 -0
  47. package/gateway/tasks/__pycache__/explain_diff.cpython-310.pyc +0 -0
  48. package/gateway/tasks/__pycache__/explain_diff_v2.cpython-310.pyc +0 -0
  49. package/gateway/tasks/__pycache__/validate_api.cpython-310.pyc +0 -0
  50. package/gateway/tasks/__pycache__/validate_api_v2.cpython-310.pyc +0 -0
  51. package/gateway/tasks/__pycache__/validate_api_v3.cpython-310.pyc +0 -0
  52. package/glama.json +0 -1
  53. package/hooks/evidence-status.sh +0 -12
  54. package/hooks/git/commit-msg +0 -4
  55. package/hooks/git/pre-commit +0 -4
  56. package/hooks/git/pre-push +0 -4
  57. package/hooks/install-hooks.sh +0 -583
  58. package/hooks/message-auth-hook.js +0 -9
  59. package/hooks/message-governance-hook.js +0 -9
  60. package/hooks/models/claude-post.js +0 -4
  61. package/hooks/models/claude-pre.js +0 -4
  62. package/hooks/models/codex-post.js +0 -4
  63. package/hooks/models/codex-pre.js +0 -4
  64. package/hooks/models/cursor-post.js +0 -4
  65. package/hooks/models/cursor-pre.js +0 -4
  66. package/hooks/models/gemini-post.js +0 -4
  67. package/hooks/models/gemini-pre.js +0 -4
  68. package/hooks/models/openai-post.js +0 -4
  69. package/hooks/models/openai-pre.js +0 -4
  70. package/hooks/models/windsurf-post.js +0 -4
  71. package/hooks/models/windsurf-pre.js +0 -4
  72. package/hooks/models/xai-post.js +0 -4
  73. package/hooks/models/xai-pre.js +0 -4
  74. package/hooks/post-bash-hook.js +0 -13
  75. package/hooks/post-mcp-hook.js +0 -13
  76. package/hooks/post-response-hook.js +0 -4
  77. package/hooks/post-tool-hook.js +0 -126
  78. package/hooks/post-write-hook.js +0 -13
  79. package/hooks/pre-bash-hook.js +0 -30
  80. package/hooks/pre-mcp-hook.js +0 -13
  81. package/hooks/pre-read-hook.js +0 -13
  82. package/hooks/pre-search-hook.js +0 -13
  83. package/hooks/pre-submit-hook.js +0 -4
  84. package/hooks/pre-task-hook.js +0 -13
  85. package/hooks/pre-tool-hook.js +0 -121
  86. package/hooks/pre-web-hook.js +0 -13
  87. package/hooks/pre-write-hook.js +0 -31
  88. package/hooks/test-hooks.sh +0 -12
  89. package/hooks/update-delimit.sh +0 -6
  90. package/scripts/infect.js +0 -128
  91. package/tests/setup-onboarding.test.js +0 -147
@@ -1,142 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Delimit™ Codex Jamsons Adapter
4
- * Layer: Jamsons OS (strategy + operational governance)
5
- * Injects portfolio context, logs decisions, surfaces venture/priority state.
6
- */
7
-
8
- 'use strict';
9
-
10
- const axios = require('axios');
11
- const AGENT_URL = `http://127.0.0.1:${process.env.DELIMIT_AGENT_PORT || 7823}`;
12
- const JAMSONS_URL = `http://localhost:${process.env.JAMSONS_PORT || 8091}`;
13
-
14
- const VENTURES = {
15
- delimit: { priority: 'P0', status: 'active' },
16
- domainvested: { priority: 'P2', status: 'maintenance' },
17
- 'wire.report': { priority: 'held', status: 'held' },
18
- 'livetube.ai': { priority: 'held', status: 'held' },
19
- };
20
-
21
- class DelimitCodexJamsons {
22
- constructor() {
23
- this.name = 'delimit-jamsons';
24
- this.version = '1.0.0';
25
- }
26
-
27
- /**
28
- * Before suggestion: inject portfolio context so the model has strategic awareness.
29
- */
30
- async onBeforeSuggestion(context) {
31
- try {
32
- const portfolioCtx = await this._getPortfolioContext(context);
33
- // Attach context metadata — Codex passes this through to the model
34
- context._jamsons = portfolioCtx;
35
- } catch (_) { /* fail open */ }
36
- return { allow: true };
37
- }
38
-
39
- async onAfterAccept(context) {
40
- // Log accepted suggestion to Jamsons decision ledger
41
- try {
42
- await axios.post(`${JAMSONS_URL}/api/chatops/decisions`, {
43
- type: 'task',
44
- title: `Codex: accepted suggestion in ${context.file || 'unknown file'}`,
45
- detail: `Language: ${context.language || 'unknown'} | Tool: codex`,
46
- user_id: 'codex-adapter',
47
- tags: ['delimit', 'chatops'],
48
- }, {
49
- headers: { Authorization: `Bearer ${process.env.CHATOPS_AUTH_TOKEN}` },
50
- timeout: 2000,
51
- });
52
- } catch (_) { /* silent */ }
53
- }
54
-
55
- async _getPortfolioContext(context) {
56
- const [memory, decisions] = await Promise.allSettled([
57
- this._searchMemory(context.file || context.language || 'delimit'),
58
- this._getPendingDecisions(),
59
- ]);
60
-
61
- return {
62
- ventures: VENTURES,
63
- activeVenture: this._detectVenture(context),
64
- memory: memory.status === 'fulfilled' ? memory.value : [],
65
- pendingDecisions: decisions.status === 'fulfilled' ? decisions.value : [],
66
- timestamp: new Date().toISOString(),
67
- };
68
- }
69
-
70
- _detectVenture(context) {
71
- const path = (context.file || '').toLowerCase();
72
- if (path.includes('delimit')) return 'delimit';
73
- if (path.includes('domainvested')) return 'domainvested';
74
- return 'delimit'; // default active venture
75
- }
76
-
77
- async _searchMemory(query) {
78
- const r = await axios.get(`${JAMSONS_URL}/api/memory/search`, {
79
- params: { q: query, limit: 5 },
80
- timeout: 2000,
81
- });
82
- return r.data?.results || [];
83
- }
84
-
85
- async _getPendingDecisions() {
86
- const r = await axios.get(`${JAMSONS_URL}/api/chatops/decisions`, {
87
- params: { status: 'pending', limit: 5 },
88
- headers: { Authorization: `Bearer ${process.env.CHATOPS_AUTH_TOKEN}` },
89
- timeout: 2000,
90
- });
91
- return r.data?.decisions || r.data || [];
92
- }
93
-
94
- async handleCommand(command, _args) {
95
- const { execSync } = require('child_process');
96
- const cmds = {
97
- 'jamsons': 'delimit status --layer=jamsons',
98
- 'portfolio': 'delimit portfolio --summary',
99
- 'decisions': 'delimit decisions --pending',
100
- 'memory': 'delimit memory --recent',
101
- };
102
- if (cmds[command]) {
103
- try {
104
- return execSync(cmds[command], { timeout: 10000 }).toString();
105
- } catch (e) {
106
- return `[JAMSONS] Command failed: ${e.message}`;
107
- }
108
- }
109
- }
110
-
111
- /**
112
- * Returns structured Jamsons context for consensus use.
113
- */
114
- async getContext() {
115
- const [memory, decisions] = await Promise.allSettled([
116
- axios.get(`${JAMSONS_URL}/api/memory/search`, {
117
- params: { q: 'delimit strategy', limit: 5 },
118
- timeout: 3000,
119
- }),
120
- axios.get(`${JAMSONS_URL}/api/chatops/decisions`, {
121
- params: { status: 'pending' },
122
- headers: { Authorization: `Bearer ${process.env.CHATOPS_AUTH_TOKEN}` },
123
- timeout: 3000,
124
- }),
125
- ]);
126
-
127
- return {
128
- layer: 'jamsons',
129
- ventures: VENTURES,
130
- memory: memory.status === 'fulfilled' ? (memory.value.data?.results || []) : null,
131
- pendingDecisions: decisions.status === 'fulfilled' ? (decisions.value.data || []) : null,
132
- };
133
- }
134
- }
135
-
136
- if (typeof module !== 'undefined' && module.exports) {
137
- module.exports = new DelimitCodexJamsons();
138
- }
139
-
140
- if (typeof registerSkill === 'function') {
141
- registerSkill(new DelimitCodexJamsons());
142
- }
@@ -1,94 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Delimit™ Codex Security Skill Adapter
4
- * Layer: Delimit (code governance) — Security surface
5
- * Triggered on pre-code-generation and pre-suggestion events
6
- */
7
-
8
- 'use strict';
9
-
10
- const axios = require('axios');
11
- const AGENT_URL = `http://127.0.0.1:${process.env.DELIMIT_AGENT_PORT || 7823}`;
12
-
13
- class DelimitCodexSecurity {
14
- constructor() {
15
- this.name = 'delimit-security';
16
- this.version = '1.0.0';
17
- }
18
-
19
- async onBeforeSuggestion(context) {
20
- try {
21
- const { code, language, file } = context;
22
- const response = await axios.post(`${AGENT_URL}/security`, {
23
- action: 'codex_suggestion',
24
- code,
25
- language,
26
- file,
27
- tool: 'codex',
28
- }, { timeout: 3000 });
29
-
30
- const { severity, findings } = response.data;
31
-
32
- if (severity === 'critical') {
33
- return {
34
- allow: false,
35
- message: `[DELIMIT SECURITY] Blocked — critical finding: ${findings?.[0]?.message || 'see audit log'}`,
36
- };
37
- }
38
-
39
- if (severity === 'high') {
40
- return {
41
- allow: true,
42
- warning: `[DELIMIT SECURITY] High-severity finding: ${findings?.[0]?.message || 'review before accepting'}`,
43
- };
44
- }
45
-
46
- return { allow: true };
47
- } catch (err) {
48
- if (err.response?.data?.action === 'block') {
49
- return { allow: false, message: `[DELIMIT SECURITY] ${err.response.data.reason}` };
50
- }
51
- // Fail open — security service unavailable
52
- console.warn('[DELIMIT SECURITY] Scan unavailable:', err.message);
53
- return { allow: true };
54
- }
55
- }
56
-
57
- async onAfterAccept(context) {
58
- try {
59
- await axios.post(`${AGENT_URL}/audit`, {
60
- action: 'codex_security_accept',
61
- context,
62
- timestamp: new Date().toISOString(),
63
- }, { timeout: 2000 });
64
- } catch (_) { /* silent */ }
65
- }
66
-
67
- async handleCommand(command, _args) {
68
- if (command === 'security') {
69
- const { execSync } = require('child_process');
70
- try {
71
- return execSync('delimit security --verbose', { timeout: 10000 }).toString();
72
- } catch (e) {
73
- return `[DELIMIT SECURITY] Command failed: ${e.message}`;
74
- }
75
- }
76
- }
77
-
78
- async getContext() {
79
- try {
80
- const r = await axios.get(`${AGENT_URL}/security/status`, { timeout: 3000 });
81
- return { layer: 'delimit-security', status: 'ok', data: r.data };
82
- } catch (_) {
83
- return { layer: 'delimit-security', status: 'unavailable' };
84
- }
85
- }
86
- }
87
-
88
- if (typeof module !== 'undefined' && module.exports) {
89
- module.exports = new DelimitCodexSecurity();
90
- }
91
-
92
- if (typeof registerSkill === 'function') {
93
- registerSkill(new DelimitCodexSecurity());
94
- }
@@ -1,120 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Delimit™ Gemini CLI Forge Adapter
4
- * Layer: Forge (execution governance)
5
- * Used as: command handler called from Gemini CLI hooks and @commands
6
- */
7
-
8
- 'use strict';
9
-
10
- const axios = require('axios');
11
- const AGENT_URL = `http://127.0.0.1:${process.env.DELIMIT_AGENT_PORT || 7823}`;
12
-
13
- class DelimitGeminiForge {
14
- constructor() {
15
- this.id = 'delimit-forge';
16
- this.version = '1.0.0';
17
- }
18
-
19
- /**
20
- * Pre-generation: surface test failures and deploy locks to Gemini before it generates code.
21
- */
22
- async beforeCodeGeneration(request) {
23
- const [testState, deployState, releaseState] = await Promise.allSettled([
24
- axios.get(`${AGENT_URL}/test/status`, { timeout: 3000 }),
25
- axios.get(`${AGENT_URL}/deploy/status`, { timeout: 3000 }),
26
- axios.get(`${AGENT_URL}/release/status`, { timeout: 3000 }),
27
- ]);
28
-
29
- const warnings = [];
30
-
31
- if (testState.status === 'fulfilled') {
32
- const t = testState.value.data;
33
- if (t?.failing > 0) warnings.push(`[FORGE] ${t.failing} test(s) failing`);
34
- }
35
-
36
- if (deployState.status === 'fulfilled') {
37
- const d = deployState.value.data;
38
- if (d?.locked) warnings.push(`[FORGE] Deploy locked: ${d.reason || 'release in progress'}`);
39
- }
40
-
41
- if (releaseState.status === 'fulfilled') {
42
- const rel = releaseState.value.data;
43
- if (rel?.in_progress) warnings.push(`[FORGE] Release in progress: ${rel.version || 'unknown'}`);
44
- }
45
-
46
- if (warnings.length > 0) {
47
- console.warn(warnings.join('\n'));
48
- // Inject warnings into system prompt context
49
- request._forgeWarnings = warnings;
50
- }
51
-
52
- return request;
53
- }
54
-
55
- async afterResponse(response) {
56
- try {
57
- await axios.post(`${AGENT_URL}/audit`, {
58
- action: 'gemini_forge_response',
59
- response: {
60
- model: response.model,
61
- tokens: response.usage,
62
- timestamp: new Date().toISOString(),
63
- },
64
- }, { timeout: 2000 });
65
- } catch (_) { /* silent */ }
66
- return response;
67
- }
68
-
69
- async handleCommand(command, _args) {
70
- const { execSync } = require('child_process');
71
- const commands = {
72
- '@forge': 'delimit status --layer=forge',
73
- '@tests': 'delimit test --summary',
74
- '@deploy': 'delimit deploy --status',
75
- '@release': 'delimit release --status',
76
- };
77
- if (commands[command]) {
78
- try {
79
- return execSync(commands[command], { timeout: 10000 }).toString();
80
- } catch (e) {
81
- return `[FORGE] Command failed: ${e.message}`;
82
- }
83
- }
84
- }
85
-
86
- /**
87
- * Structured context for consensus — call this from hooks or consensus runners.
88
- */
89
- async getContext() {
90
- const [tests, deploy, release] = await Promise.allSettled([
91
- axios.get(`${AGENT_URL}/test/status`, { timeout: 3000 }),
92
- axios.get(`${AGENT_URL}/deploy/status`, { timeout: 3000 }),
93
- axios.get(`${AGENT_URL}/release/status`, { timeout: 3000 }),
94
- ]);
95
- return {
96
- layer: 'forge',
97
- tool: 'gemini',
98
- tests: tests.status === 'fulfilled' ? tests.value.data : null,
99
- deploy: deploy.status === 'fulfilled' ? deploy.value.data : null,
100
- release: release.status === 'fulfilled' ? release.value.data : null,
101
- };
102
- }
103
- }
104
-
105
- module.exports = new DelimitGeminiForge();
106
-
107
- if (typeof registerExtension === 'function') {
108
- registerExtension(new DelimitGeminiForge());
109
- }
110
-
111
- // CLI entrypoint for Gemini hook invocation
112
- if (require.main === module) {
113
- const instance = new DelimitGeminiForge();
114
- instance.getContext()
115
- .then(ctx => {
116
- process.stdout.write(JSON.stringify(ctx) + '\n');
117
- process.exit(0);
118
- })
119
- .catch(() => process.exit(0)); // fail open
120
- }
@@ -1,152 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Delimit™ Gemini CLI Jamsons Adapter
4
- * Layer: Jamsons OS (strategy + operational governance)
5
- * Injects portfolio context, logs decisions, surfaces venture/priority state.
6
- */
7
-
8
- 'use strict';
9
-
10
- const axios = require('axios');
11
- const AGENT_URL = `http://127.0.0.1:${process.env.DELIMIT_AGENT_PORT || 7823}`;
12
- const JAMSONS_URL = `http://localhost:${process.env.JAMSONS_PORT || 8091}`;
13
-
14
- const VENTURES = {
15
- delimit: { priority: 'P0', status: 'active' },
16
- domainvested: { priority: 'P2', status: 'maintenance' },
17
- 'wire.report': { priority: 'held', status: 'held' },
18
- 'livetube.ai': { priority: 'held', status: 'held' },
19
- };
20
-
21
- class DelimitGeminiJamsons {
22
- constructor() {
23
- this.id = 'delimit-jamsons';
24
- this.version = '1.0.0';
25
- }
26
-
27
- /**
28
- * Pre-generation: inject portfolio and decision context into request.
29
- */
30
- async beforeCodeGeneration(request) {
31
- try {
32
- const portfolioCtx = await this._getPortfolioContext(request);
33
- request._jamsons = portfolioCtx;
34
- } catch (_) { /* fail open */ }
35
- return request;
36
- }
37
-
38
- async afterResponse(response) {
39
- try {
40
- await axios.post(`${JAMSONS_URL}/api/chatops/decisions`, {
41
- type: 'task',
42
- title: `Gemini: session response logged`,
43
- detail: `Model: ${response.model || 'unknown'} | Tool: gemini`,
44
- user_id: 'gemini-adapter',
45
- tags: ['delimit', 'chatops'],
46
- }, {
47
- headers: { Authorization: `Bearer ${process.env.CHATOPS_AUTH_TOKEN}` },
48
- timeout: 2000,
49
- });
50
- } catch (_) { /* silent */ }
51
- return response;
52
- }
53
-
54
- async _getPortfolioContext(request) {
55
- const [memory, decisions] = await Promise.allSettled([
56
- this._searchMemory(request.prompt || 'delimit'),
57
- this._getPendingDecisions(),
58
- ]);
59
-
60
- return {
61
- ventures: VENTURES,
62
- activeVenture: this._detectVenture(request),
63
- memory: memory.status === 'fulfilled' ? memory.value : [],
64
- pendingDecisions: decisions.status === 'fulfilled' ? decisions.value : [],
65
- timestamp: new Date().toISOString(),
66
- };
67
- }
68
-
69
- _detectVenture(request) {
70
- const text = (request.prompt || request.context || '').toLowerCase();
71
- if (text.includes('delimit')) return 'delimit';
72
- if (text.includes('domainvested')) return 'domainvested';
73
- return 'delimit';
74
- }
75
-
76
- async _searchMemory(query) {
77
- const r = await axios.get(`${JAMSONS_URL}/api/memory/search`, {
78
- params: { q: query, limit: 5 },
79
- timeout: 2000,
80
- });
81
- return r.data?.results || [];
82
- }
83
-
84
- async _getPendingDecisions() {
85
- const r = await axios.get(`${JAMSONS_URL}/api/chatops/decisions`, {
86
- params: { status: 'pending', limit: 5 },
87
- headers: { Authorization: `Bearer ${process.env.CHATOPS_AUTH_TOKEN}` },
88
- timeout: 2000,
89
- });
90
- return r.data?.decisions || r.data || [];
91
- }
92
-
93
- async handleCommand(command, _args) {
94
- const { execSync } = require('child_process');
95
- const commands = {
96
- '@jamsons': 'delimit status --layer=jamsons',
97
- '@portfolio': 'delimit portfolio --summary',
98
- '@decisions': 'delimit decisions --pending',
99
- '@memory': 'delimit memory --recent',
100
- };
101
- if (commands[command]) {
102
- try {
103
- return execSync(commands[command], { timeout: 10000 }).toString();
104
- } catch (e) {
105
- return `[JAMSONS] Command failed: ${e.message}`;
106
- }
107
- }
108
- }
109
-
110
- /**
111
- * Structured context for consensus — call from hooks or consensus runners.
112
- */
113
- async getContext() {
114
- const [memory, decisions] = await Promise.allSettled([
115
- axios.get(`${JAMSONS_URL}/api/memory/search`, {
116
- params: { q: 'delimit strategy', limit: 5 },
117
- timeout: 3000,
118
- }),
119
- axios.get(`${JAMSONS_URL}/api/chatops/decisions`, {
120
- params: { status: 'pending' },
121
- headers: { Authorization: `Bearer ${process.env.CHATOPS_AUTH_TOKEN}` },
122
- timeout: 3000,
123
- }),
124
- ]);
125
-
126
- return {
127
- layer: 'jamsons',
128
- tool: 'gemini',
129
- ventures: VENTURES,
130
- memory: memory.status === 'fulfilled' ? (memory.value.data?.results || []) : null,
131
- pendingDecisions: decisions.status === 'fulfilled' ? (decisions.value.data || []) : null,
132
- };
133
- }
134
- }
135
-
136
- module.exports = new DelimitGeminiJamsons();
137
-
138
- if (typeof registerExtension === 'function') {
139
- registerExtension(new DelimitGeminiJamsons());
140
- }
141
-
142
- // CLI entrypoint for Gemini hook invocation
143
- if (require.main === module) {
144
- const instance = new DelimitGeminiJamsons();
145
- const event = process.argv[2] || 'before-agent';
146
- instance.getContext()
147
- .then(ctx => {
148
- process.stdout.write(JSON.stringify(ctx) + '\n');
149
- process.exit(0);
150
- })
151
- .catch(() => process.exit(0)); // fail open
152
- }
package/delimit.yml DELETED
@@ -1,19 +0,0 @@
1
- defaultMode: advisory
2
-
3
- rules:
4
- - name: "Production Protection"
5
- mode: enforce
6
- triggers:
7
- - gitBranch: [main, master, production]
8
-
9
- - name: "Payment Code Security"
10
- mode: enforce
11
- triggers:
12
- - path: "**/payment/**"
13
- - content: ["stripe", "payment", "billing"]
14
-
15
- - name: "Documentation Freedom"
16
- mode: advisory
17
- triggers:
18
- - path: "**/*.md"
19
- final: true