@symbeon/orbit-devops 1.1.0 → 1.4.0
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/.agent/skills/orbit-devops/SKILL.md +3 -2
- package/README.md +3 -0
- package/THESIS.md +50 -0
- package/bin/orbit.js +40 -48
- package/package.json +1 -1
- package/providers/BaseProvider.js +33 -0
- package/providers/UnixProvider.js +18 -0
- package/providers/WindowsProvider.js +44 -0
- package/templates/adaptive-logic-sample.json +27 -0
- package/templates/agent-stack-dev.json +24 -0
|
@@ -28,10 +28,11 @@ To reclaim space safely:
|
|
|
28
28
|
2. Clean `npm-cache` using `npm cache clean --force` if large Node.js footprints are detected.
|
|
29
29
|
3. Use `scripts/wsl/CompactWSL.ps1` (requires admin) to "squeeze" WSL2 virtual disks.
|
|
30
30
|
|
|
31
|
-
### 3. Environment DNA Management
|
|
31
|
+
### 3. Environment DNA Management & Genome Integration
|
|
32
32
|
To ensure a portable and safe environment:
|
|
33
33
|
1. Use `scripts/stack/SnapshotEnv.ps1` to generate a local `dev-stack.json`.
|
|
34
|
-
2.
|
|
34
|
+
2. Access the **Genome Library** via the [agent-stack-dev](https://github.com/SH1W4/agent-stack-dev) skill to pull standardized Agent DNAs.
|
|
35
|
+
3. Apply adaptive provisioning rules from `logic/` to mutate the environment based on machine constraints.
|
|
35
36
|
|
|
36
37
|
## Capabilities Mapping
|
|
37
38
|
|
package/README.md
CHANGED
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
|
|
19
19
|
**Orbit-DevOps** is a professional-grade CLI toolkit designed to reclaim GBs of "ghost" storage from modern development stacks. It specializes in **WSL2 VHDX compaction**, **Docker pruning**, and **Dev-Stack synchronization**.
|
|
20
20
|
|
|
21
|
+
> [!IMPORTANT]
|
|
22
|
+
> **Read the [Orbit Thesis & Manifesto](./THESIS.md)** to understand the philosophy and strategic vision behind this project.
|
|
23
|
+
|
|
21
24
|
## 🚀 One-Minute Start
|
|
22
25
|
|
|
23
26
|
Run without installing:
|
package/THESIS.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# 🪐 Orbit-DevOps: Tese e Manifesto de Fundação
|
|
2
|
+
|
|
3
|
+
## 📖 A Gênese: Por que o Orbit existe?
|
|
4
|
+
|
|
5
|
+
Em uma era de desenvolvimento de software dominada por abstrações pesadas, ambientes de IA famintos por recursos e ferramentas que "sequestram" o controle do usuário, o workspace do desenvolvedor tornou-se um campo de batalha caótico.
|
|
6
|
+
|
|
7
|
+
O **Orbit-DevOps** nasceu de um problema fundamental enfrentado pela **Symbeon Labs**:
|
|
8
|
+
> "Como manter um ambiente de alta fidelidade e alta performance, sem sacrificar a privacidade e sem se afogar na poluição digital gerada pelas próprias ferramentas de desenvolvimento?"
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🏛️ Os Três Pilares da Tese
|
|
13
|
+
|
|
14
|
+
### 1. A Automação Cirúrgica (Eficiência)
|
|
15
|
+
A maioria dos utilitários de sistema são "marretas" que atingem tudo sem precisão. O Orbit é um "bisturi". Ele não apenas apaga arquivos; ele entende o ecossistema (Node.js, Docker, WSL, AppData) e remove cirurgicamente o que é lixo, preservando o que é DNA do projeto.
|
|
16
|
+
|
|
17
|
+
### 2. Infraestrutura Agente-Pronta (Agentic Backbone)
|
|
18
|
+
Este é o diferencial estratégico. Para que IAs e Agentes (como o Antigravity) operem com eficiência máxima, eles precisam de um ambiente limpo e previsível. O Orbit fornece a **"Linguagem de Controle"** que permite que humanos e IAs mantenham a infraestrutura em harmonia.
|
|
19
|
+
|
|
20
|
+
### 3. Fortificando a Privacidade (Sovereign Context)
|
|
21
|
+
O caos gera vazamento de dados. Ao organizar diagnósticos e remover rastros sensíveis de caminhos locais, o Orbit garante que o desenvolvedor possa compartilhar seu trabalho e suas métricas sem expor sua vida privada. É a ferramenta da **Soberania Digital**.
|
|
22
|
+
|
|
23
|
+
### 4. Pilhas de Agentes (Agent DNA & Hybrid Evolution)
|
|
24
|
+
Este é o ápice da tese Orbit. Não construímos apenas ferramentas para humanos; construímos o **DNA de infraestrutura para Agentes Autônomos**.
|
|
25
|
+
|
|
26
|
+
O diferencial do Orbit é a **Evolução Híbrida**:
|
|
27
|
+
- **Genomas Fixos**: Blueprints de referência que garantem estabilidade e padrões. (Veja: [agent-stack-dev](https://github.com/SH1W4/agent-stack-dev))
|
|
28
|
+
- **Adaptação Orgânica**: A capacidade do Orbit de observar o hardware e o contexto em tempo real (via `orbit doctor`) e "mutar" a stack para garantir performance máxima, agindo como um sistema imunológico e de provisionamento inteligente.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 🚀 A Visão: Do Local para o Hub
|
|
33
|
+
|
|
34
|
+
O Orbit não busca ser apenas um CLI. Ele é o primeiro passo para o **Symbeon Hub**:
|
|
35
|
+
|
|
36
|
+
1. **Fase Atual (Orbit OS)**: Controle total da máquina local.
|
|
37
|
+
2. **Fase Próxima (Orbit Sync)**: Sincronização de preferências e stacks entre máquinas.
|
|
38
|
+
3. **Fase Final (Enterprise Fleet)**: Gestão centralizada de frotas de desenvolvimento, garantindo que "Um ambiente perfeito para um, seja o padrão para todos".
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 💡 Conclusão
|
|
43
|
+
|
|
44
|
+
O Orbit-DevOps existe porque acreditamos que **a ordem precede a inteligência**. Antes de construirmos sistemas complexos, precisamos garantir que o solo (nosso workspace) é fértil, limpo e controlado.
|
|
45
|
+
|
|
46
|
+
**Orbit é o Centro de Comando para quem não aceita o caos.**
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
*Assinado,*
|
|
50
|
+
**Symbeon Labs**
|
package/bin/orbit.js
CHANGED
|
@@ -1,95 +1,87 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
1
|
import { Command } from 'commander';
|
|
4
2
|
import chalk from 'chalk';
|
|
5
|
-
import spawn from 'cross-spawn';
|
|
6
3
|
import path from 'path';
|
|
7
4
|
import { fileURLToPath } from 'url';
|
|
5
|
+
import os from 'os';
|
|
6
|
+
|
|
7
|
+
// Providers
|
|
8
|
+
import WindowsProvider from '../providers/WindowsProvider.js';
|
|
9
|
+
import UnixProvider from '../providers/UnixProvider.js';
|
|
8
10
|
|
|
9
11
|
const __filename = fileURLToPath(import.meta.url);
|
|
10
12
|
const __dirname = path.dirname(__filename);
|
|
11
13
|
const PROJECT_ROOT = path.join(__dirname, '..');
|
|
12
14
|
|
|
15
|
+
// Platform Detection & Provider Initialization
|
|
16
|
+
let provider;
|
|
17
|
+
const platform = os.platform();
|
|
18
|
+
|
|
19
|
+
if (platform === 'win32') {
|
|
20
|
+
provider = new WindowsProvider(PROJECT_ROOT);
|
|
21
|
+
} else if (platform === 'linux' || platform === 'darwin') {
|
|
22
|
+
provider = new UnixProvider(PROJECT_ROOT);
|
|
23
|
+
} else {
|
|
24
|
+
console.error(chalk.red(`\n❌ Error: Unsupported platform: ${platform}`));
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
|
|
13
28
|
const program = new Command();
|
|
14
29
|
|
|
15
30
|
program
|
|
16
31
|
.name('orbit')
|
|
17
32
|
.description('Orbit-DevOps: The Developer\'s Workspace Command Center')
|
|
18
|
-
.version('1.
|
|
19
|
-
|
|
20
|
-
import fs from 'fs';
|
|
21
|
-
|
|
22
|
-
// ... (previous imports)
|
|
23
|
-
|
|
24
|
-
// Helper to run PowerShell scripts
|
|
25
|
-
function runScript(scriptPath, args = []) {
|
|
26
|
-
// Safe path resolution for Windows
|
|
27
|
-
const fullPath = path.normalize(path.resolve(PROJECT_ROOT, scriptPath));
|
|
28
|
-
|
|
29
|
-
if (!fs.existsSync(fullPath)) {
|
|
30
|
-
console.error(chalk.red(`\n❌ Error: Script not found at: ${fullPath}`));
|
|
31
|
-
process.exit(1);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
console.log(chalk.blue(`\n🚀 Orbit Launching: ${path.basename(fullPath)}...`));
|
|
35
|
-
|
|
36
|
-
// Don't manually quote the path; spawn handles it if we don't use windowsVerbatimArgumentsor specific shell options
|
|
37
|
-
const child = spawn('powershell.exe', ['-ExecutionPolicy', 'Bypass', '-File', fullPath, ...args], {
|
|
38
|
-
stdio: 'inherit'
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
child.on('close', (code) => {
|
|
42
|
-
if (code === 0) {
|
|
43
|
-
console.log(chalk.green(`\n✅ Mission Complete (Exit Code: ${code})`));
|
|
44
|
-
} else {
|
|
45
|
-
console.log(chalk.red(`\n❌ Mission Failed (Exit Code: ${code})`));
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
33
|
+
.version('1.4.0');
|
|
49
34
|
|
|
50
35
|
// --- Commands ---
|
|
51
36
|
|
|
52
37
|
program
|
|
53
38
|
.command('doctor')
|
|
54
39
|
.description('Run a full system diagnostic health check')
|
|
55
|
-
.action(() => {
|
|
56
|
-
runScript('scripts/diagnostic/SystemDiagnosticUser_v2.ps1');
|
|
40
|
+
.action(async () => {
|
|
41
|
+
await provider.runScript('Diagnostic', 'scripts/diagnostic/SystemDiagnosticUser_v2.ps1');
|
|
57
42
|
});
|
|
58
43
|
|
|
59
44
|
program
|
|
60
45
|
.command('space')
|
|
61
46
|
.description('Analyze disk usage and find hotspots')
|
|
62
|
-
.action(() => {
|
|
63
|
-
runScript('scripts/diagnostic/ScanStorage.ps1');
|
|
47
|
+
.action(async () => {
|
|
48
|
+
await provider.runScript('Storage Analysis', 'scripts/diagnostic/ScanStorage.ps1');
|
|
64
49
|
});
|
|
65
50
|
|
|
66
51
|
program
|
|
67
52
|
.command('clean')
|
|
68
53
|
.description('Perform safe system and dev-tool cleanup')
|
|
69
|
-
.action(() => {
|
|
70
|
-
runScript('scripts/cleanup/AdditionalCleanup.ps1');
|
|
54
|
+
.action(async () => {
|
|
55
|
+
await provider.runScript('Cleanup', 'scripts/cleanup/AdditionalCleanup.ps1');
|
|
71
56
|
});
|
|
72
57
|
|
|
73
58
|
program
|
|
74
59
|
.command('compact')
|
|
75
60
|
.description('Compact WSL2 virtual disks manually (requires Admin)')
|
|
76
|
-
.action(() => {
|
|
77
|
-
|
|
78
|
-
|
|
61
|
+
.action(async () => {
|
|
62
|
+
if (platform !== 'win32') {
|
|
63
|
+
console.error(chalk.yellow('\n⚠️ Note: WSL2 compaction is only available on Windows.'));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
await provider.runScript('WSL Compaction', 'scripts/wsl/CompactWSL.ps1');
|
|
79
67
|
});
|
|
80
68
|
|
|
81
69
|
program
|
|
82
70
|
.command('sync')
|
|
83
|
-
.description('Sync environment stack to GitHub
|
|
84
|
-
.action(() => {
|
|
85
|
-
runScript('scripts/stack/Push-Stack.ps1');
|
|
71
|
+
.description('Sync environment stack to GitHub')
|
|
72
|
+
.action(async () => {
|
|
73
|
+
await provider.runScript('Stack Sync', 'scripts/stack/Push-Stack.ps1');
|
|
86
74
|
});
|
|
87
75
|
|
|
88
76
|
program
|
|
89
77
|
.command('menu')
|
|
90
78
|
.description('Launch the interactive PowerShell menu (Legacy)')
|
|
91
|
-
.action(() => {
|
|
92
|
-
|
|
79
|
+
.action(async () => {
|
|
80
|
+
if (platform !== 'win32') {
|
|
81
|
+
console.error(chalk.yellow('\n⚠️ Note: The interactive menu is currently Windows-only.'));
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
await provider.runScript('Legacy Menu', 'scripts/core/Orbit.ps1');
|
|
93
85
|
});
|
|
94
86
|
|
|
95
87
|
program.parse(process.argv);
|
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
|
|
3
|
+
export default class BaseProvider {
|
|
4
|
+
constructor(projectRoot) {
|
|
5
|
+
this.projectRoot = projectRoot;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Run a platform-specific command or script.
|
|
10
|
+
* @param {string} taskName Name of the task
|
|
11
|
+
* @param {string} scriptPath Relative path to the script
|
|
12
|
+
* @param {Array} args Arguments for the script
|
|
13
|
+
*/
|
|
14
|
+
async runScript(taskName, scriptPath, args = []) {
|
|
15
|
+
throw new Error('runScript() must be implemented by the provider');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
logInfo(message) {
|
|
19
|
+
console.log(chalk.blue(`\n🚀 Orbit [${this.getName()}]: ${message}`));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
logSuccess(message) {
|
|
23
|
+
console.log(chalk.green(`\n✅ ${message}`));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
logError(message) {
|
|
27
|
+
console.error(chalk.red(`\n❌ Error [${this.getName()}]: ${message}`));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
getName() {
|
|
31
|
+
return 'Base';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import BaseProvider from './BaseProvider.js';
|
|
2
|
+
|
|
3
|
+
export default class UnixProvider extends BaseProvider {
|
|
4
|
+
/**
|
|
5
|
+
* Run a Bash/Shell script.
|
|
6
|
+
*/
|
|
7
|
+
async runScript(taskName, scriptPath, args = []) {
|
|
8
|
+
this.logInfo(`(PREVIEW) Launching Unix command (Linux/macOS): ${scriptPath}...`);
|
|
9
|
+
|
|
10
|
+
// In the future, this will map to .sh scripts or python scripts
|
|
11
|
+
this.logError(`Unix implementation for ${scriptPath} is coming soon in Phase 2.`);
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getName() {
|
|
16
|
+
return 'Unix (Linux/macOS)';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import spawn from 'cross-spawn';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import BaseProvider from './BaseProvider.js';
|
|
5
|
+
|
|
6
|
+
export default class WindowsProvider extends BaseProvider {
|
|
7
|
+
/**
|
|
8
|
+
* Run a PowerShell script.
|
|
9
|
+
*/
|
|
10
|
+
async runScript(taskName, scriptPath, args = []) {
|
|
11
|
+
const fullPath = path.normalize(path.resolve(this.projectRoot, scriptPath));
|
|
12
|
+
|
|
13
|
+
if (!fs.existsSync(fullPath)) {
|
|
14
|
+
this.logError(`Script not found at: ${fullPath}`);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
this.logInfo(`Launching: ${path.basename(fullPath)}...`);
|
|
19
|
+
|
|
20
|
+
return new Promise((resolve) => {
|
|
21
|
+
const child = spawn('powershell.exe', [
|
|
22
|
+
'-ExecutionPolicy', 'Bypass',
|
|
23
|
+
'-File', fullPath,
|
|
24
|
+
...args
|
|
25
|
+
], {
|
|
26
|
+
stdio: 'inherit'
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
child.on('close', (code) => {
|
|
30
|
+
if (code === 0) {
|
|
31
|
+
this.logSuccess(`Mission Complete (Exit Code: ${code})`);
|
|
32
|
+
resolve(true);
|
|
33
|
+
} else {
|
|
34
|
+
this.logError(`Mission Failed (Exit Code: ${code})`);
|
|
35
|
+
resolve(false);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
getName() {
|
|
42
|
+
return 'Windows';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"profile": "Autonomous-Edge-Agent",
|
|
3
|
+
"base_dna": "v1.2.0-core",
|
|
4
|
+
"adaptation_rules": [
|
|
5
|
+
{
|
|
6
|
+
"trigger": "RAM < 8GB",
|
|
7
|
+
"action": "use_lite_runtimes",
|
|
8
|
+
"impact": "Disables local LLM inference, switches to API-based agents."
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"trigger": "Disk_Free < 20GB",
|
|
12
|
+
"action": "aggressive_cleanup",
|
|
13
|
+
"impact": "Runs `orbit clean` and `orbit compact` before any task."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"trigger": "OS == Windows_Server",
|
|
17
|
+
"action": "enable_fleet_telemetry",
|
|
18
|
+
"impact": "Activates enterprise monitoring hooks."
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"evolution_path": {
|
|
22
|
+
"step_1": "Analyze Context",
|
|
23
|
+
"step_2": "Mutate Requirements",
|
|
24
|
+
"step_3": "Provision Bio-Shell",
|
|
25
|
+
"step_4": "Verify Health"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"stack_name": "Autonomous-Dev-Shell",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"archetype": "Specialist-Developer",
|
|
5
|
+
"requirements": {
|
|
6
|
+
"os": "Windows 11 | WSL2",
|
|
7
|
+
"runtime": ["Node.js 20.x", "Python 3.12"],
|
|
8
|
+
"cli_tools": ["gh", "npm", "git", "orbit"],
|
|
9
|
+
"env_vars": {
|
|
10
|
+
"AGENT_MODE": "autonomous",
|
|
11
|
+
"ORBIT_ENV": "production"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"provisioning": {
|
|
15
|
+
"doctor_before_run": true,
|
|
16
|
+
"cleanup_on_exit": true,
|
|
17
|
+
"sync_stack_on_change": true
|
|
18
|
+
},
|
|
19
|
+
"permissions": {
|
|
20
|
+
"fs_read": ["PROJECT_ROOT"],
|
|
21
|
+
"fs_write": ["PROJECT_ROOT/temp", "PROJECT_ROOT/logs"],
|
|
22
|
+
"network": true
|
|
23
|
+
}
|
|
24
|
+
}
|