ghost-dragon 4.2.1
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/.github/workflows/ci.yml +23 -0
- package/CHANGELOG.md +96 -0
- package/README.md +193 -0
- package/bootstrap.ps1 +83 -0
- package/bootstrap.sh +71 -0
- package/dist/agent/loop.d.ts +68 -0
- package/dist/agent/loop.d.ts.map +1 -0
- package/dist/agent/loop.js +135 -0
- package/dist/agent/mcp.d.ts +33 -0
- package/dist/agent/mcp.d.ts.map +1 -0
- package/dist/agent/mcp.js +107 -0
- package/dist/agent/session.d.ts +16 -0
- package/dist/agent/session.d.ts.map +1 -0
- package/dist/agent/session.js +55 -0
- package/dist/agent/skills.d.ts +36 -0
- package/dist/agent/skills.d.ts.map +1 -0
- package/dist/agent/skills.js +153 -0
- package/dist/agent/stack.d.ts +21 -0
- package/dist/agent/stack.d.ts.map +1 -0
- package/dist/agent/stack.js +158 -0
- package/dist/agent/task.d.ts +21 -0
- package/dist/agent/task.d.ts.map +1 -0
- package/dist/agent/task.js +45 -0
- package/dist/agent/tools.d.ts +44 -0
- package/dist/agent/tools.d.ts.map +1 -0
- package/dist/agent/tools.js +262 -0
- package/dist/agent/trace.d.ts +34 -0
- package/dist/agent/trace.d.ts.map +1 -0
- package/dist/agent/trace.js +72 -0
- package/dist/agent.d.ts +46 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +103 -0
- package/dist/auth.d.ts +74 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +116 -0
- package/dist/brain/anthropic.d.ts +19 -0
- package/dist/brain/anthropic.d.ts.map +1 -0
- package/dist/brain/anthropic.js +74 -0
- package/dist/brain/claude-cli.d.ts +20 -0
- package/dist/brain/claude-cli.d.ts.map +1 -0
- package/dist/brain/claude-cli.js +79 -0
- package/dist/brain/ghost-ember.d.ts +28 -0
- package/dist/brain/ghost-ember.d.ts.map +1 -0
- package/dist/brain/ghost-ember.js +97 -0
- package/dist/brain/index.d.ts +22 -0
- package/dist/brain/index.d.ts.map +1 -0
- package/dist/brain/index.js +95 -0
- package/dist/brain/openai-compat.d.ts +21 -0
- package/dist/brain/openai-compat.d.ts.map +1 -0
- package/dist/brain/openai-compat.js +119 -0
- package/dist/brain/router/classify.d.ts +23 -0
- package/dist/brain/router/classify.d.ts.map +1 -0
- package/dist/brain/router/classify.js +160 -0
- package/dist/brain/router/execute.d.ts +23 -0
- package/dist/brain/router/execute.d.ts.map +1 -0
- package/dist/brain/router/execute.js +84 -0
- package/dist/brain/router/index.d.ts +26 -0
- package/dist/brain/router/index.d.ts.map +1 -0
- package/dist/brain/router/index.js +118 -0
- package/dist/brain/router/routing-memory.d.ts +27 -0
- package/dist/brain/router/routing-memory.d.ts.map +1 -0
- package/dist/brain/router/routing-memory.js +77 -0
- package/dist/brain/router/select.d.ts +32 -0
- package/dist/brain/router/select.d.ts.map +1 -0
- package/dist/brain/router/select.js +146 -0
- package/dist/brain/router/two-hop.d.ts +23 -0
- package/dist/brain/router/two-hop.d.ts.map +1 -0
- package/dist/brain/router/two-hop.js +39 -0
- package/dist/brain/router/verify.d.ts +37 -0
- package/dist/brain/router/verify.d.ts.map +1 -0
- package/dist/brain/router/verify.js +111 -0
- package/dist/brain/types.d.ts +55 -0
- package/dist/brain/types.d.ts.map +1 -0
- package/dist/brain/types.js +16 -0
- package/dist/brain/worker.d.ts +27 -0
- package/dist/brain/worker.d.ts.map +1 -0
- package/dist/brain/worker.js +71 -0
- package/dist/commands/ai.d.ts +24 -0
- package/dist/commands/ai.d.ts.map +1 -0
- package/dist/commands/ai.js +137 -0
- package/dist/commands/alerts.d.ts +19 -0
- package/dist/commands/alerts.d.ts.map +1 -0
- package/dist/commands/alerts.js +114 -0
- package/dist/commands/billing.d.ts +13 -0
- package/dist/commands/billing.d.ts.map +1 -0
- package/dist/commands/billing.js +55 -0
- package/dist/commands/chat.d.ts +22 -0
- package/dist/commands/chat.d.ts.map +1 -0
- package/dist/commands/chat.js +422 -0
- package/dist/commands/config.d.ts +18 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +136 -0
- package/dist/commands/doctor.d.ts +11 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +73 -0
- package/dist/commands/global.d.ts +11 -0
- package/dist/commands/global.d.ts.map +1 -0
- package/dist/commands/global.js +253 -0
- package/dist/commands/keep.d.ts +12 -0
- package/dist/commands/keep.d.ts.map +1 -0
- package/dist/commands/keep.js +58 -0
- package/dist/commands/lifecycle.d.ts +17 -0
- package/dist/commands/lifecycle.d.ts.map +1 -0
- package/dist/commands/lifecycle.js +267 -0
- package/dist/commands/login.d.ts +16 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +234 -0
- package/dist/commands/maintenance.d.ts +12 -0
- package/dist/commands/maintenance.d.ts.map +1 -0
- package/dist/commands/maintenance.js +76 -0
- package/dist/commands/mcp.d.ts +16 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +56 -0
- package/dist/commands/memory.d.ts +13 -0
- package/dist/commands/memory.d.ts.map +1 -0
- package/dist/commands/memory.js +218 -0
- package/dist/commands/osint.d.ts +14 -0
- package/dist/commands/osint.d.ts.map +1 -0
- package/dist/commands/osint.js +161 -0
- package/dist/commands/pentest.d.ts +13 -0
- package/dist/commands/pentest.d.ts.map +1 -0
- package/dist/commands/pentest.js +131 -0
- package/dist/commands/scale.d.ts +14 -0
- package/dist/commands/scale.d.ts.map +1 -0
- package/dist/commands/scale.js +191 -0
- package/dist/commands/serve.d.ts +16 -0
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/commands/serve.js +167 -0
- package/dist/commands/tui.d.ts +17 -0
- package/dist/commands/tui.d.ts.map +1 -0
- package/dist/commands/tui.js +138 -0
- package/dist/commands/wyrm.d.ts +20 -0
- package/dist/commands/wyrm.d.ts.map +1 -0
- package/dist/commands/wyrm.js +274 -0
- package/dist/config.d.ts +67 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +54 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +85 -0
- package/dist/manifest.d.ts +31 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +83 -0
- package/dist/ui.d.ts +57 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +174 -0
- package/dist/utils.d.ts +33 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +155 -0
- package/dist/wyrm/mcp.d.ts +37 -0
- package/dist/wyrm/mcp.d.ts.map +1 -0
- package/dist/wyrm/mcp.js +137 -0
- package/docs/SYSTEM-PREMORTEM.md +397 -0
- package/dragon-manifest.toml +241 -0
- package/dragon.py +177 -0
- package/install/launchd/lk.ghosts.dragonkeep.plist +57 -0
- package/install/systemd/dragonkeep.service +40 -0
- package/media/dragon-silver-lockup.svg +931 -0
- package/media/dragon-silver-mark.svg +931 -0
- package/media/dragon-silver.png +0 -0
- package/package.json +45 -0
- package/specs/001-godmode/constitution.md +54 -0
- package/specs/001-godmode/plan.md +30 -0
- package/specs/001-godmode/spec.md +64 -0
- package/specs/001-godmode/tasks.md +35 -0
- package/specs/002-premortem-positioning/premortem.md +211 -0
- package/src/agent/loop.ts +165 -0
- package/src/agent/mcp.ts +92 -0
- package/src/agent/session.ts +48 -0
- package/src/agent/skills.ts +138 -0
- package/src/agent/stack.ts +154 -0
- package/src/agent/task.ts +55 -0
- package/src/agent/tools.ts +255 -0
- package/src/agent/trace.ts +76 -0
- package/src/agent.ts +114 -0
- package/src/auth.ts +133 -0
- package/src/brain/anthropic.ts +83 -0
- package/src/brain/claude-cli.ts +78 -0
- package/src/brain/ghost-ember.ts +94 -0
- package/src/brain/index.ts +99 -0
- package/src/brain/openai-compat.ts +115 -0
- package/src/brain/router/classify.ts +167 -0
- package/src/brain/router/execute.ts +80 -0
- package/src/brain/router/index.ts +125 -0
- package/src/brain/router/routing-memory.ts +71 -0
- package/src/brain/router/select.ts +156 -0
- package/src/brain/router/two-hop.ts +62 -0
- package/src/brain/router/verify.ts +123 -0
- package/src/brain/types.ts +61 -0
- package/src/brain/worker.ts +72 -0
- package/src/commands/ai.ts +144 -0
- package/src/commands/alerts.ts +131 -0
- package/src/commands/billing.ts +59 -0
- package/src/commands/chat.ts +318 -0
- package/src/commands/config.ts +137 -0
- package/src/commands/doctor.ts +71 -0
- package/src/commands/global.ts +256 -0
- package/src/commands/keep.ts +67 -0
- package/src/commands/lifecycle.ts +273 -0
- package/src/commands/login.ts +184 -0
- package/src/commands/maintenance.ts +54 -0
- package/src/commands/mcp.ts +57 -0
- package/src/commands/memory.ts +229 -0
- package/src/commands/osint.ts +171 -0
- package/src/commands/pentest.ts +140 -0
- package/src/commands/scale.ts +185 -0
- package/src/commands/serve.ts +171 -0
- package/src/commands/tui.ts +126 -0
- package/src/commands/wyrm.ts +269 -0
- package/src/config.ts +93 -0
- package/src/index.ts +92 -0
- package/src/manifest.ts +104 -0
- package/src/ui.ts +188 -0
- package/src/utils.ts +153 -0
- package/src/wyrm/mcp.ts +130 -0
- package/test/auth.test.ts +70 -0
- package/test/brain.test.ts +39 -0
- package/test/security.test.ts +104 -0
- package/test/skills.test.ts +38 -0
- package/test/ui.test.ts +46 -0
- package/tsconfig.json +19 -0
- package/worker/package-lock.json +1527 -0
- package/worker/package.json +17 -0
- package/worker/src/index.ts +76 -0
- package/worker/tsconfig.json +15 -0
- package/worker/wrangler.toml +26 -0
package/dragon.py
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Dragon CLI - Unified Command Line Interface for Ghost Protocol Products
|
|
4
|
+
|
|
5
|
+
Routes commands to:
|
|
6
|
+
- wyrm AI Memory System (MCP Server)
|
|
7
|
+
- pentest PhantomDragon Penetration Testing
|
|
8
|
+
- scale DragonScale Commerce Platform
|
|
9
|
+
- keep DragonKeep Infrastructure Security
|
|
10
|
+
|
|
11
|
+
By Ghost Protocol Security (https://ghosts.lk)
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import sys
|
|
15
|
+
import os
|
|
16
|
+
import subprocess
|
|
17
|
+
import argparse
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
VERSION = "1.0.0"
|
|
21
|
+
|
|
22
|
+
# Detect installation paths (adjust based on actual installation)
|
|
23
|
+
DRAGON_HOME = os.environ.get('DRAGON_HOME', str(Path.home() / '.dragon'))
|
|
24
|
+
WYRM_PATH = os.environ.get('WYRM_PATH', '')
|
|
25
|
+
PHANTOMDRAGON_PATH = os.environ.get('PHANTOMDRAGON_PATH', '')
|
|
26
|
+
DRAGONSCALE_PATH = os.environ.get('DRAGONSCALE_PATH', '')
|
|
27
|
+
DRAGONKEEP_PATH = os.environ.get('DRAGONKEEP_PATH', '')
|
|
28
|
+
|
|
29
|
+
DRAGON_ASCII = r"""
|
|
30
|
+
. ' ,
|
|
31
|
+
_________
|
|
32
|
+
_ /_|_____|_\ _
|
|
33
|
+
'. \ / .'
|
|
34
|
+
'.\ /.'
|
|
35
|
+
'.'
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
PRODUCTS = {
|
|
39
|
+
'wyrm': {
|
|
40
|
+
'name': 'Wyrm',
|
|
41
|
+
'description': 'AI Memory System - Context & knowledge persistence for AI assistants',
|
|
42
|
+
'path_env': 'WYRM_PATH',
|
|
43
|
+
'commands': ['serve', 'query', 'projects', 'sessions', 'quests'],
|
|
44
|
+
},
|
|
45
|
+
'pentest': {
|
|
46
|
+
'name': 'PhantomDragon',
|
|
47
|
+
'description': 'Penetration Testing - Web application security scanner',
|
|
48
|
+
'path_env': 'PHANTOMDRAGON_PATH',
|
|
49
|
+
'commands': ['scan', 'update', 'report'],
|
|
50
|
+
},
|
|
51
|
+
'scale': {
|
|
52
|
+
'name': 'DragonScale',
|
|
53
|
+
'description': 'Commerce Platform - Self-hosted ordering system',
|
|
54
|
+
'path_env': 'DRAGONSCALE_PATH',
|
|
55
|
+
'commands': ['setup', 'migrate', 'backup'],
|
|
56
|
+
},
|
|
57
|
+
'keep': {
|
|
58
|
+
'name': 'DragonKeep',
|
|
59
|
+
'description': 'Infrastructure Security - Cloud & container security scanning',
|
|
60
|
+
'path_env': 'DRAGONKEEP_PATH',
|
|
61
|
+
'commands': ['scan', 'audit', 'report'],
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def print_banner():
|
|
67
|
+
"""Print Dragon CLI banner."""
|
|
68
|
+
print(f"\033[32m{DRAGON_ASCII}\033[0m")
|
|
69
|
+
print(f" 🐉 Dragon CLI v{VERSION}")
|
|
70
|
+
print(" Ghost Protocol Security | ghosts.lk\n")
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def print_products():
|
|
74
|
+
"""Print available products."""
|
|
75
|
+
print("Available Products:\n")
|
|
76
|
+
for key, product in PRODUCTS.items():
|
|
77
|
+
status = "✓ installed" if os.environ.get(product['path_env']) else "○ not configured"
|
|
78
|
+
print(f" \033[36m{key:10}\033[0m {product['name']}")
|
|
79
|
+
print(f" {product['description']}")
|
|
80
|
+
print(f" Status: {status}")
|
|
81
|
+
print()
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def run_wyrm(args):
|
|
85
|
+
"""Run Wyrm commands."""
|
|
86
|
+
wyrm_path = os.environ.get('WYRM_PATH')
|
|
87
|
+
if not wyrm_path:
|
|
88
|
+
print("Error: WYRM_PATH not set. Please configure Wyrm location.")
|
|
89
|
+
print(" export WYRM_PATH=/path/to/Wyrm")
|
|
90
|
+
return 1
|
|
91
|
+
|
|
92
|
+
cmd = ['npx', 'wyrm'] + args
|
|
93
|
+
return subprocess.call(cmd, cwd=wyrm_path)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def run_pentest(args):
|
|
97
|
+
"""Run PhantomDragon commands."""
|
|
98
|
+
pd_path = os.environ.get('PHANTOMDRAGON_PATH')
|
|
99
|
+
if not pd_path:
|
|
100
|
+
print("Error: PHANTOMDRAGON_PATH not set. Please configure PhantomDragon location.")
|
|
101
|
+
print(" export PHANTOMDRAGON_PATH=/path/to/PhantomDragon")
|
|
102
|
+
return 1
|
|
103
|
+
|
|
104
|
+
script = Path(pd_path) / 'phantomdragon.py'
|
|
105
|
+
cmd = [sys.executable, str(script)] + args
|
|
106
|
+
return subprocess.call(cmd)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def run_scale(args):
|
|
110
|
+
"""Run DragonScale commands."""
|
|
111
|
+
scale_path = os.environ.get('DRAGONSCALE_PATH')
|
|
112
|
+
if not scale_path:
|
|
113
|
+
print("Error: DRAGONSCALE_PATH not set. Please configure DragonScale location.")
|
|
114
|
+
print(" export DRAGONSCALE_PATH=/path/to/DragonScale")
|
|
115
|
+
return 1
|
|
116
|
+
|
|
117
|
+
# DragonScale is PHP-based
|
|
118
|
+
cmd = ['php'] + args
|
|
119
|
+
return subprocess.call(cmd, cwd=scale_path)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def run_keep(args):
|
|
123
|
+
"""Run DragonKeep commands."""
|
|
124
|
+
keep_path = os.environ.get('DRAGONKEEP_PATH')
|
|
125
|
+
if not keep_path:
|
|
126
|
+
print("Error: DragonKeep not yet available.")
|
|
127
|
+
print(" Coming soon: Infrastructure security scanning")
|
|
128
|
+
return 1
|
|
129
|
+
|
|
130
|
+
script = Path(keep_path) / 'dragonkeep.py'
|
|
131
|
+
cmd = [sys.executable, str(script)] + args
|
|
132
|
+
return subprocess.call(cmd)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def main():
|
|
136
|
+
"""Main entry point."""
|
|
137
|
+
if len(sys.argv) < 2:
|
|
138
|
+
print_banner()
|
|
139
|
+
print("Usage: dragon <product> [command] [options]\n")
|
|
140
|
+
print_products()
|
|
141
|
+
print("Examples:")
|
|
142
|
+
print(" dragon wyrm serve --port 3333")
|
|
143
|
+
print(" dragon pentest -t https://example.com --profile quick")
|
|
144
|
+
print(" dragon scale setup")
|
|
145
|
+
print(" dragon keep scan --cloud aws")
|
|
146
|
+
print()
|
|
147
|
+
return 0
|
|
148
|
+
|
|
149
|
+
product = sys.argv[1].lower()
|
|
150
|
+
remaining_args = sys.argv[2:]
|
|
151
|
+
|
|
152
|
+
if product in ['--help', '-h']:
|
|
153
|
+
print_banner()
|
|
154
|
+
print("Usage: dragon <product> [command] [options]\n")
|
|
155
|
+
print_products()
|
|
156
|
+
return 0
|
|
157
|
+
|
|
158
|
+
if product in ['--version', '-v']:
|
|
159
|
+
print(f"Dragon CLI v{VERSION}")
|
|
160
|
+
return 0
|
|
161
|
+
|
|
162
|
+
if product == 'wyrm':
|
|
163
|
+
return run_wyrm(remaining_args)
|
|
164
|
+
elif product in ['pentest', 'phantom', 'pd']:
|
|
165
|
+
return run_pentest(remaining_args)
|
|
166
|
+
elif product == 'scale':
|
|
167
|
+
return run_scale(remaining_args)
|
|
168
|
+
elif product == 'keep':
|
|
169
|
+
return run_keep(remaining_args)
|
|
170
|
+
else:
|
|
171
|
+
print(f"Unknown product: {product}")
|
|
172
|
+
print("Available products: wyrm, pentest, scale, keep")
|
|
173
|
+
return 1
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
if __name__ == '__main__':
|
|
177
|
+
sys.exit(main())
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<!--
|
|
4
|
+
DragonKeep · macOS LaunchAgent
|
|
5
|
+
Spec: dragon-platform/specs/009-bootstrap-cross-os
|
|
6
|
+
|
|
7
|
+
Install:
|
|
8
|
+
cp lk.ghosts.dragonkeep.plist ~/Library/LaunchAgents/
|
|
9
|
+
launchctl load -w ~/Library/LaunchAgents/lk.ghosts.dragonkeep.plist
|
|
10
|
+
launchctl start lk.ghosts.dragonkeep
|
|
11
|
+
|
|
12
|
+
Uninstall:
|
|
13
|
+
launchctl unload -w ~/Library/LaunchAgents/lk.ghosts.dragonkeep.plist
|
|
14
|
+
rm ~/Library/LaunchAgents/lk.ghosts.dragonkeep.plist
|
|
15
|
+
-->
|
|
16
|
+
<plist version="1.0">
|
|
17
|
+
<dict>
|
|
18
|
+
<key>Label</key>
|
|
19
|
+
<string>lk.ghosts.dragonkeep</string>
|
|
20
|
+
|
|
21
|
+
<key>ProgramArguments</key>
|
|
22
|
+
<array>
|
|
23
|
+
<string>/usr/local/bin/dragonkeep</string>
|
|
24
|
+
<string>monitor</string>
|
|
25
|
+
</array>
|
|
26
|
+
|
|
27
|
+
<key>RunAtLoad</key>
|
|
28
|
+
<true/>
|
|
29
|
+
|
|
30
|
+
<key>KeepAlive</key>
|
|
31
|
+
<dict>
|
|
32
|
+
<key>SuccessfulExit</key>
|
|
33
|
+
<false/>
|
|
34
|
+
<key>NetworkState</key>
|
|
35
|
+
<true/>
|
|
36
|
+
</dict>
|
|
37
|
+
|
|
38
|
+
<key>StandardOutPath</key>
|
|
39
|
+
<string>/tmp/dragonkeep.out.log</string>
|
|
40
|
+
|
|
41
|
+
<key>StandardErrorPath</key>
|
|
42
|
+
<string>/tmp/dragonkeep.err.log</string>
|
|
43
|
+
|
|
44
|
+
<key>ProcessType</key>
|
|
45
|
+
<string>Background</string>
|
|
46
|
+
|
|
47
|
+
<!-- Reset working dir to operator's home so ~/.dragonkeep resolves -->
|
|
48
|
+
<key>WorkingDirectory</key>
|
|
49
|
+
<string>/Users/$USER</string>
|
|
50
|
+
|
|
51
|
+
<key>EnvironmentVariables</key>
|
|
52
|
+
<dict>
|
|
53
|
+
<key>DRAGONKEEP_AUTO_RESTART</key>
|
|
54
|
+
<string>1</string>
|
|
55
|
+
</dict>
|
|
56
|
+
</dict>
|
|
57
|
+
</plist>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# DragonKeep · Linux systemd unit
|
|
2
|
+
# Spec: dragon-platform/specs/009-bootstrap-cross-os
|
|
3
|
+
#
|
|
4
|
+
# Install (per-user · recommended):
|
|
5
|
+
# mkdir -p ~/.config/systemd/user
|
|
6
|
+
# cp dragonkeep.service ~/.config/systemd/user/
|
|
7
|
+
# systemctl --user daemon-reload
|
|
8
|
+
# systemctl --user enable --now dragonkeep.service
|
|
9
|
+
#
|
|
10
|
+
# Or system-wide (requires root):
|
|
11
|
+
# sudo cp dragonkeep.service /etc/systemd/system/
|
|
12
|
+
# sudo systemctl daemon-reload
|
|
13
|
+
# sudo systemctl enable --now dragonkeep.service
|
|
14
|
+
|
|
15
|
+
[Unit]
|
|
16
|
+
Description=DragonKeep · defensive security daemon
|
|
17
|
+
Documentation=https://github.com/Ghosts-Protocol-Pvt-Ltd/DragonKeep
|
|
18
|
+
After=network-online.target
|
|
19
|
+
Wants=network-online.target
|
|
20
|
+
|
|
21
|
+
[Service]
|
|
22
|
+
Type=simple
|
|
23
|
+
ExecStart=%h/.local/bin/dragonkeep monitor
|
|
24
|
+
Restart=on-failure
|
|
25
|
+
RestartSec=5s
|
|
26
|
+
|
|
27
|
+
# Hardening
|
|
28
|
+
NoNewPrivileges=true
|
|
29
|
+
ProtectSystem=strict
|
|
30
|
+
ProtectHome=false
|
|
31
|
+
ReadWritePaths=%h/.dragonkeep
|
|
32
|
+
|
|
33
|
+
# Capabilities (eBPF + raw sockets for behavioral_ebpf)
|
|
34
|
+
CapabilityBoundingSet=CAP_BPF CAP_NET_ADMIN CAP_NET_RAW CAP_SYS_PTRACE CAP_DAC_READ_SEARCH
|
|
35
|
+
|
|
36
|
+
# Environment
|
|
37
|
+
Environment=DRAGONKEEP_AUTO_RESTART=1
|
|
38
|
+
|
|
39
|
+
[Install]
|
|
40
|
+
WantedBy=default.target
|