arkaos 2.0.0 → 2.0.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.
Files changed (86) hide show
  1. package/README.md +100 -74
  2. package/VERSION +1 -1
  3. package/bin/arkaos +1 -1
  4. package/core/__pycache__/__init__.cpython-313.pyc +0 -0
  5. package/core/agents/__pycache__/__init__.cpython-313.pyc +0 -0
  6. package/core/agents/__pycache__/loader.cpython-313.pyc +0 -0
  7. package/core/agents/__pycache__/schema.cpython-313.pyc +0 -0
  8. package/core/agents/__pycache__/validator.cpython-313.pyc +0 -0
  9. package/core/conclave/__pycache__/__init__.cpython-313.pyc +0 -0
  10. package/core/conclave/__pycache__/advisor_db.cpython-313.pyc +0 -0
  11. package/core/conclave/__pycache__/display.cpython-313.pyc +0 -0
  12. package/core/conclave/__pycache__/matcher.cpython-313.pyc +0 -0
  13. package/core/conclave/__pycache__/persistence.cpython-313.pyc +0 -0
  14. package/core/conclave/__pycache__/profiler.cpython-313.pyc +0 -0
  15. package/core/conclave/__pycache__/prompts.cpython-313.pyc +0 -0
  16. package/core/conclave/__pycache__/schema.cpython-313.pyc +0 -0
  17. package/core/governance/__pycache__/__init__.cpython-313.pyc +0 -0
  18. package/core/governance/__pycache__/constitution.cpython-313.pyc +0 -0
  19. package/core/registry/__pycache__/__init__.cpython-313.pyc +0 -0
  20. package/core/registry/__pycache__/generator.cpython-313.pyc +0 -0
  21. package/core/runtime/__pycache__/__init__.cpython-313.pyc +0 -0
  22. package/core/runtime/__pycache__/base.cpython-313.pyc +0 -0
  23. package/core/runtime/__pycache__/claude_code.cpython-313.pyc +0 -0
  24. package/core/runtime/__pycache__/codex_cli.cpython-313.pyc +0 -0
  25. package/core/runtime/__pycache__/cursor.cpython-313.pyc +0 -0
  26. package/core/runtime/__pycache__/gemini_cli.cpython-313.pyc +0 -0
  27. package/core/runtime/__pycache__/registry.cpython-313.pyc +0 -0
  28. package/core/runtime/__pycache__/subagent.cpython-313.pyc +0 -0
  29. package/core/specs/__pycache__/__init__.cpython-313.pyc +0 -0
  30. package/core/specs/__pycache__/manager.cpython-313.pyc +0 -0
  31. package/core/specs/__pycache__/schema.cpython-313.pyc +0 -0
  32. package/core/squads/__pycache__/__init__.cpython-313.pyc +0 -0
  33. package/core/squads/__pycache__/loader.cpython-313.pyc +0 -0
  34. package/core/squads/__pycache__/registry.cpython-313.pyc +0 -0
  35. package/core/squads/__pycache__/schema.cpython-313.pyc +0 -0
  36. package/core/synapse/__pycache__/__init__.cpython-313.pyc +0 -0
  37. package/core/synapse/__pycache__/cache.cpython-313.pyc +0 -0
  38. package/core/synapse/__pycache__/engine.cpython-313.pyc +0 -0
  39. package/core/synapse/__pycache__/layers.cpython-313.pyc +0 -0
  40. package/core/tasks/__pycache__/__init__.cpython-313.pyc +0 -0
  41. package/core/tasks/__pycache__/manager.cpython-313.pyc +0 -0
  42. package/core/tasks/__pycache__/schema.cpython-313.pyc +0 -0
  43. package/core/workflow/__pycache__/__init__.cpython-313.pyc +0 -0
  44. package/core/workflow/__pycache__/engine.cpython-313.pyc +0 -0
  45. package/core/workflow/__pycache__/loader.cpython-313.pyc +0 -0
  46. package/core/workflow/__pycache__/schema.cpython-313.pyc +0 -0
  47. package/departments/dev/skills/agent-design/SKILL.md +4 -0
  48. package/departments/dev/skills/agent-design/references/architecture-patterns.md +223 -0
  49. package/departments/dev/skills/ai-security/SKILL.md +4 -0
  50. package/departments/dev/skills/ai-security/references/prompt-injection-catalog.md +230 -0
  51. package/departments/dev/skills/ci-cd-pipeline/SKILL.md +4 -0
  52. package/departments/dev/skills/ci-cd-pipeline/references/github-actions-patterns.md +202 -0
  53. package/departments/dev/skills/db-schema/SKILL.md +4 -0
  54. package/departments/dev/skills/db-schema/references/indexing-strategy.md +197 -0
  55. package/departments/dev/skills/dependency-audit/SKILL.md +4 -0
  56. package/departments/dev/skills/dependency-audit/references/license-matrix.md +191 -0
  57. package/departments/dev/skills/incident/SKILL.md +4 -0
  58. package/departments/dev/skills/incident/references/severity-playbook.md +221 -0
  59. package/departments/dev/skills/observability/SKILL.md +4 -0
  60. package/departments/dev/skills/observability/references/slo-design.md +200 -0
  61. package/departments/dev/skills/rag-architect/SKILL.md +5 -0
  62. package/departments/dev/skills/rag-architect/references/chunking-strategies.md +129 -0
  63. package/departments/dev/skills/rag-architect/references/evaluation-guide.md +158 -0
  64. package/departments/dev/skills/red-team/SKILL.md +4 -0
  65. package/departments/dev/skills/red-team/references/mitre-attack-web.md +165 -0
  66. package/departments/dev/skills/security-audit/SKILL.md +4 -0
  67. package/departments/dev/skills/security-audit/references/owasp-2025-deep.md +409 -0
  68. package/departments/dev/skills/security-compliance/SKILL.md +117 -0
  69. package/departments/finance/skills/ciso-advisor/SKILL.md +4 -0
  70. package/departments/finance/skills/ciso-advisor/references/compliance-roadmap.md +172 -0
  71. package/departments/marketing/skills/programmatic-seo/SKILL.md +4 -0
  72. package/departments/marketing/skills/programmatic-seo/references/template-playbooks.md +289 -0
  73. package/departments/ops/skills/gdpr-compliance/SKILL.md +104 -0
  74. package/departments/ops/skills/iso27001/SKILL.md +113 -0
  75. package/departments/ops/skills/quality-management/SKILL.md +118 -0
  76. package/departments/ops/skills/risk-management/SKILL.md +120 -0
  77. package/departments/ops/skills/soc2-compliance/SKILL.md +120 -0
  78. package/departments/strategy/skills/cto-advisor/SKILL.md +4 -0
  79. package/departments/strategy/skills/cto-advisor/references/build-vs-buy-framework.md +190 -0
  80. package/installer/cli.js +13 -2
  81. package/installer/index.js +1 -2
  82. package/installer/migrate.js +123 -0
  83. package/installer/update.js +28 -15
  84. package/package.json +1 -1
  85. package/pyproject.toml +1 -1
  86. package/core/agents/__pycache__/registry_gen.cpython-313.pyc +0 -0
@@ -0,0 +1,123 @@
1
+ import { existsSync, readFileSync, renameSync, mkdirSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { homedir } from "node:os";
4
+ import { execSync } from "node:child_process";
5
+
6
+ const V1_PATHS = {
7
+ skills: join(homedir(), ".claude", "skills", "arka-os"),
8
+ hooks: join(homedir(), ".claude", "settings.json"),
9
+ config: join(homedir(), ".claude", "skills", "arka-os", "config"),
10
+ };
11
+
12
+ const V2_PATH = join(homedir(), ".arkaos");
13
+
14
+ export async function migrate() {
15
+ console.log(`\n ArkaOS Migration — v1 → v2\n`);
16
+
17
+ // Step 1: Detect v1 installation
18
+ console.log(" [1/5] Detecting v1 installation...");
19
+ const v1Exists = existsSync(V1_PATHS.skills) ||
20
+ existsSync(join(homedir(), ".claude", "skills", "arkaos"));
21
+
22
+ if (!v1Exists) {
23
+ // Check alternative v1 paths
24
+ const altPaths = [
25
+ join(homedir(), ".claude", "skills", "arka-os"),
26
+ join(homedir(), ".claude", "skills", "arkaos"),
27
+ join(homedir(), "AIProjects", "arka-os"),
28
+ ];
29
+ const found = altPaths.find(p => existsSync(p));
30
+ if (!found) {
31
+ console.log(" No v1 installation found. Running fresh v2 install...\n");
32
+ execSync("npx arkaos@latest install", { stdio: "inherit" });
33
+ return;
34
+ }
35
+ console.log(` Found v1 at: ${found}`);
36
+ } else {
37
+ console.log(` Found v1 at: ${V1_PATHS.skills}`);
38
+ }
39
+
40
+ // Step 2: Check for existing v2
41
+ console.log(" [2/5] Checking for existing v2...");
42
+ if (existsSync(V2_PATH)) {
43
+ const manifest = join(V2_PATH, "install-manifest.json");
44
+ if (existsSync(manifest)) {
45
+ const data = JSON.parse(readFileSync(manifest, "utf-8"));
46
+ console.log(` v2 already installed (v${data.version}). Use 'npx arkaos update' instead.`);
47
+ return;
48
+ }
49
+ }
50
+
51
+ // Step 3: Backup v1
52
+ console.log(" [3/5] Backing up v1...");
53
+ const backupDir = join(homedir(), ".arkaos-v1-backup");
54
+ const v1Dir = existsSync(V1_PATHS.skills)
55
+ ? V1_PATHS.skills
56
+ : join(homedir(), ".claude", "skills", "arkaos");
57
+
58
+ if (existsSync(v1Dir) && !existsSync(backupDir)) {
59
+ try {
60
+ renameSync(v1Dir, backupDir);
61
+ console.log(` Backed up to: ${backupDir}`);
62
+ } catch {
63
+ console.log(" Could not backup v1 (may need manual move).");
64
+ }
65
+ } else {
66
+ console.log(" Backup already exists or not needed.");
67
+ }
68
+
69
+ // Step 4: Preserve user data
70
+ console.log(" [4/5] Preserving user data...");
71
+ mkdirSync(V2_PATH, { recursive: true });
72
+
73
+ // Preserve session digests if they exist
74
+ const v1Digests = join(backupDir, "session-digests");
75
+ const v2Digests = join(V2_PATH, "session-digests");
76
+ if (existsSync(v1Digests) && !existsSync(v2Digests)) {
77
+ try {
78
+ execSync(`cp -r "${v1Digests}" "${v2Digests}"`, { stdio: "pipe" });
79
+ console.log(" Preserved session digests.");
80
+ } catch {
81
+ console.log(" Could not copy session digests.");
82
+ }
83
+ }
84
+
85
+ // Preserve any Obsidian/knowledge data
86
+ const v1Media = join(backupDir, "media");
87
+ const v2Media = join(V2_PATH, "media");
88
+ if (existsSync(v1Media) && !existsSync(v2Media)) {
89
+ try {
90
+ execSync(`cp -r "${v1Media}" "${v2Media}"`, { stdio: "pipe" });
91
+ console.log(" Preserved media files.");
92
+ } catch {
93
+ console.log(" Could not copy media files.");
94
+ }
95
+ }
96
+
97
+ // Step 5: Install v2
98
+ console.log(" [5/5] Installing v2...\n");
99
+ try {
100
+ execSync("npx arkaos@latest install --force", { stdio: "inherit" });
101
+ } catch (err) {
102
+ console.error(`\n Migration failed during install: ${err.message}`);
103
+ console.error(` Your v1 backup is at: ${backupDir}`);
104
+ console.error(` To restore: mv "${backupDir}" "${v1Dir}"\n`);
105
+ process.exit(1);
106
+ }
107
+
108
+ console.log(`
109
+ Migration complete!
110
+
111
+ What changed in v2:
112
+ - Install dir: ~/.arkaos (was ~/.claude/skills/arka-os)
113
+ - 62 agents (was 22) across 17 departments (was 9)
114
+ - 238 skills with enterprise frameworks
115
+ - Multi-runtime: Claude Code, Codex, Gemini, Cursor
116
+ - Python core engine (was Bash-only)
117
+
118
+ Your v1 backup: ${backupDir}
119
+ You can safely delete it after verifying v2 works.
120
+
121
+ Run: npx arkaos doctor to verify installation.
122
+ `);
123
+ }
@@ -1,7 +1,11 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
- import { join } from "node:path";
2
+ import { join, dirname } from "node:path";
3
3
  import { homedir } from "node:os";
4
4
  import { execSync } from "node:child_process";
5
+ import { fileURLToPath } from "node:url";
6
+
7
+ const __dirname = dirname(fileURLToPath(import.meta.url));
8
+ const CURRENT_VERSION = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf-8")).version;
5
9
 
6
10
  export async function update() {
7
11
  const installDir = join(homedir(), ".arkaos");
@@ -13,27 +17,36 @@ export async function update() {
13
17
  }
14
18
 
15
19
  const manifest = JSON.parse(readFileSync(manifestPath, "utf-8"));
16
- console.log(`\n ArkaOS Update — Current: v${manifest.version}\n`);
20
+ console.log(`\n ArkaOS Update`);
21
+ console.log(` Installed: v${manifest.version}`);
22
+ console.log(` Current: v${CURRENT_VERSION}\n`);
23
+
24
+ // Check for latest version on npm
25
+ let latestVersion;
26
+ try {
27
+ latestVersion = execSync("npm view arkaos version 2>/dev/null", { stdio: "pipe" }).toString().trim();
28
+ console.log(` Latest: v${latestVersion}`);
29
+ } catch {
30
+ console.log(" Could not check npm for latest version.");
31
+ latestVersion = null;
32
+ }
17
33
 
18
- const repoRoot = manifest.repoRoot;
19
- if (!repoRoot || !existsSync(repoRoot)) {
20
- console.log(" Updating via npm...");
21
- try {
22
- execSync("npm update -g arkaos", { stdio: "inherit" });
23
- } catch {
24
- console.log(" Reinstalling...");
25
- execSync("npx arkaos install --force", { stdio: "inherit" });
26
- }
34
+ if (latestVersion && latestVersion === manifest.version) {
35
+ console.log("\n Already up to date.");
27
36
  return;
28
37
  }
29
38
 
30
- console.log(` Updating from: ${repoRoot}`);
39
+ console.log("\n Updating...");
31
40
  try {
32
- execSync("git pull", { cwd: repoRoot, stdio: "inherit" });
33
- execSync("npx arkaos install --force", { stdio: "inherit" });
41
+ // Clear npx cache and reinstall with latest version
42
+ execSync("npx --yes arkaos@latest install --force", {
43
+ stdio: "inherit",
44
+ env: { ...process.env, npm_config_yes: "true" },
45
+ });
34
46
  console.log("\n Update complete.");
35
47
  } catch (err) {
36
- console.error(` Update failed: ${err.message}`);
48
+ console.error(`\n Auto-update failed. Run manually:`);
49
+ console.error(` npx arkaos@latest install --force\n`);
37
50
  process.exit(1);
38
51
  }
39
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkaos",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "The Operating System for AI Agent Teams",
5
5
  "type": "module",
6
6
  "bin": {
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "arkaos-core"
3
- version = "2.0.0"
3
+ version = "2.0.1"
4
4
  description = "Core engine for ArkaOS — The Operating System for AI Agent Teams"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}