Sprint 6: JSON file persistence + real SSH terminal + V1 crypto/knownhosts integration

- go.mod replace directive for git.tukangketik.id/swanadiva/hostkeeper → ../../v1
- store/ package: JSON file persistence for hosts, snippets, keys, settings
  (~/Library/Application Support/hostkeeper/v2/)
- model SSH fields: Hostname, Port, Username, AuthType, Password, KeyID
- sshconn/ package: real SSH client via golang.org/x/crypto/ssh
- Terminal WS: real SSH connection with fallback to mock shell
- Dynamic host list in terminal (server-rendered JSON script tag)
- All mock data defaults removed from model packages
- Settings persist via store/settings.go
This commit is contained in:
swanadiva
2026-07-07 13:53:50 +07:00
parent 04d9cfb096
commit fd7361aa14
21 changed files with 746 additions and 306 deletions
+4 -6
View File
@@ -1,10 +1,8 @@
document.addEventListener('alpine:init', () => {
const hostOptions = [
{ id: 'h1', name: 'api-prod-01', ip: '10.0.1.15' },
{ id: 'h2', name: 'db-primary-01', ip: '10.0.2.5' },
{ id: 'h6', name: 'monitor-01', ip: '10.0.0.5' },
{ id: 'h7', name: 'worker-pool-01', ip: '10.0.4.50' },
];
const el = document.getElementById('hosts-data');
const hostsData = el ? JSON.parse(el.textContent) : [];
const hostOptions = hostsData.length > 0 ? hostsData :
[{ id: 'h1', name: 'api-prod-01', ip: '10.0.1.15' }];
Alpine.data('terminalManager', () => ({
tabs: [],