arkaos 4.3.6 → 4.5.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/VERSION +1 -1
- package/bin/arka-py +22 -7
- package/config/hooks/_lib/arka_python.ps1 +31 -0
- package/config/hooks/_lib/arka_python.sh +38 -0
- package/config/hooks/post-tool-use.ps1 +8 -0
- package/config/hooks/post-tool-use.sh +11 -5
- package/config/hooks/pre-tool-use.ps1 +11 -6
- package/config/hooks/pre-tool-use.sh +11 -6
- package/config/hooks/session-start.ps1 +10 -0
- package/config/hooks/session-start.sh +5 -0
- package/config/hooks/stop.ps1 +9 -1
- package/config/hooks/stop.sh +11 -5
- package/config/hooks/user-prompt-submit.ps1 +18 -0
- package/config/hooks/user-prompt-submit.sh +11 -5
- package/config/mcp-policy.yaml +8 -8
- package/core/agents/__pycache__/__init__.cpython-312.pyc +0 -0
- package/core/agents/__pycache__/loader.cpython-312.pyc +0 -0
- package/core/agents/__pycache__/registry_gen.cpython-313.pyc +0 -0
- package/core/agents/__pycache__/schema.cpython-312.pyc +0 -0
- package/core/agents/registry_gen.py +3 -2
- package/core/cognition/scheduler/__pycache__/daemon.cpython-313.pyc +0 -0
- package/core/cognition/scheduler/daemon.py +7 -3
- package/core/forge/__pycache__/orchestrator.cpython-313.pyc +0 -0
- package/core/forge/orchestrator.py +2 -1
- package/core/hooks/__pycache__/_shared.cpython-313.pyc +0 -0
- package/core/hooks/__pycache__/_shared.cpython-314.pyc +0 -0
- package/core/hooks/__pycache__/stop.cpython-313.pyc +0 -0
- package/core/hooks/__pycache__/stop.cpython-314.pyc +0 -0
- package/core/hooks/__pycache__/user_prompt_submit.cpython-313.pyc +0 -0
- package/core/hooks/_shared.py +29 -9
- package/core/hooks/stop.py +4 -3
- package/core/hooks/user_prompt_submit.py +5 -4
- package/core/knowledge/__pycache__/indexer.cpython-313.pyc +0 -0
- package/core/knowledge/__pycache__/vector_store.cpython-313.pyc +0 -0
- package/core/knowledge/indexer.py +1 -1
- package/core/knowledge/vector_store.py +10 -3
- package/core/runtime/__pycache__/model_routing_check.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/model_routing_context.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/native_usage.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/native_usage.cpython-314.pyc +0 -0
- package/core/runtime/gateway/__pycache__/__init__.cpython-313.pyc +0 -0
- package/core/runtime/gateway/__pycache__/__main__.cpython-313.pyc +0 -0
- package/core/runtime/gateway/__pycache__/litellm_config.cpython-313.pyc +0 -0
- package/core/runtime/native_usage.py +2 -1
- package/core/shared/__pycache__/temp_paths.cpython-313.pyc +0 -0
- package/core/shared/__pycache__/temp_paths.cpython-314.pyc +0 -0
- package/core/shared/temp_paths.py +40 -0
- package/core/synapse/__pycache__/kb_cache.cpython-313.pyc +0 -0
- package/core/synapse/__pycache__/kb_cache.cpython-314.pyc +0 -0
- package/core/synapse/kb_cache.py +3 -2
- package/core/sync/__pycache__/agent_provisioner.cpython-313.pyc +0 -0
- package/core/sync/__pycache__/ai_mcp_decider.cpython-313.pyc +0 -0
- package/core/sync/__pycache__/content_syncer.cpython-313.pyc +0 -0
- package/core/sync/__pycache__/descriptor_syncer.cpython-313.pyc +0 -0
- package/core/sync/__pycache__/discovery.cpython-313.pyc +0 -0
- package/core/sync/__pycache__/engine.cpython-313.pyc +0 -0
- package/core/sync/__pycache__/manifest.cpython-313.pyc +0 -0
- package/core/sync/__pycache__/mcp_optimizer.cpython-313.pyc +0 -0
- package/core/sync/__pycache__/mcp_syncer.cpython-313.pyc +0 -0
- package/core/sync/__pycache__/policy_loader.cpython-313.pyc +0 -0
- package/core/sync/__pycache__/reporter.cpython-313.pyc +0 -0
- package/core/sync/__pycache__/settings_syncer.cpython-313.pyc +0 -0
- package/core/sync/agent_provisioner.py +5 -5
- package/core/sync/ai_mcp_decider.py +2 -2
- package/core/sync/content_syncer.py +14 -14
- package/core/sync/descriptor_syncer.py +2 -2
- package/core/sync/discovery.py +4 -4
- package/core/sync/engine.py +4 -4
- package/core/sync/manifest.py +1 -1
- package/core/sync/mcp_optimizer.py +5 -5
- package/core/sync/mcp_syncer.py +7 -3
- package/core/sync/policy_loader.py +1 -1
- package/core/sync/reporter.py +1 -1
- package/core/sync/settings_syncer.py +2 -2
- package/core/terminal/__pycache__/session.cpython-313.pyc +0 -0
- package/core/terminal/__pycache__/session_windows.cpython-313.pyc +0 -0
- package/core/terminal/session.py +66 -11
- package/core/terminal/session_windows.py +211 -0
- package/core/workflow/__pycache__/flow_authorization.cpython-313.pyc +0 -0
- package/core/workflow/__pycache__/flow_authorization.cpython-314.pyc +0 -0
- package/core/workflow/__pycache__/flow_enforcer.cpython-313.pyc +0 -0
- package/core/workflow/__pycache__/flow_enforcer.cpython-314.pyc +0 -0
- package/core/workflow/__pycache__/marker_cache.cpython-313.pyc +0 -0
- package/core/workflow/__pycache__/marker_cache.cpython-314.pyc +0 -0
- package/core/workflow/__pycache__/research_gate.cpython-313.pyc +0 -0
- package/core/workflow/__pycache__/research_gate.cpython-314.pyc +0 -0
- package/core/workflow/flow_authorization.py +2 -1
- package/core/workflow/flow_enforcer.py +2 -1
- package/core/workflow/marker_cache.py +2 -1
- package/core/workflow/research_gate.py +2 -1
- package/dashboard/app/pages/index.vue +6 -1
- package/departments/dev/skills/mcp/SKILL.md +3 -1
- package/departments/ops/skills/update/references/sync-engine.md +2 -1
- package/departments/quality/agents/copy-director.yaml +2 -0
- package/departments/quality/agents/tech-director.yaml +2 -0
- package/installer/cli.js +5 -4
- package/installer/core-snapshot.js +53 -0
- package/installer/doctor.js +8 -3
- package/installer/index.js +29 -6
- package/installer/migrate.js +7 -4
- package/installer/update.js +13 -0
- package/knowledge/agents-registry-v2.json +487 -120
- package/package.json +1 -1
- package/pyproject.toml +2 -1
- package/scripts/__pycache__/dashboard-api.cpython-313.pyc +0 -0
- package/scripts/__pycache__/synapse-bridge.cpython-313.pyc +0 -0
- package/scripts/dashboard-api.py +69 -33
- package/scripts/knowledge-index.py +35 -2
- package/scripts/start-dashboard.ps1 +34 -14
- package/scripts/synapse-bridge.py +3 -1
package/installer/migrate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, readFileSync, renameSync, mkdirSync, writeFileSync } from "node:fs";
|
|
1
|
+
import { existsSync, readFileSync, renameSync, mkdirSync, writeFileSync, cpSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { execSync } from "node:child_process";
|
|
@@ -75,7 +75,7 @@ export async function migrate() {
|
|
|
75
75
|
const v2Digests = join(V2_PATH, "session-digests");
|
|
76
76
|
if (existsSync(v1Digests) && !existsSync(v2Digests)) {
|
|
77
77
|
try {
|
|
78
|
-
|
|
78
|
+
cpSync(v1Digests, v2Digests, { recursive: true });
|
|
79
79
|
console.log(" Preserved session digests.");
|
|
80
80
|
} catch {
|
|
81
81
|
console.log(" Could not copy session digests.");
|
|
@@ -87,7 +87,7 @@ export async function migrate() {
|
|
|
87
87
|
const v2Media = join(V2_PATH, "media");
|
|
88
88
|
if (existsSync(v1Media) && !existsSync(v2Media)) {
|
|
89
89
|
try {
|
|
90
|
-
|
|
90
|
+
cpSync(v1Media, v2Media, { recursive: true });
|
|
91
91
|
console.log(" Preserved media files.");
|
|
92
92
|
} catch {
|
|
93
93
|
console.log(" Could not copy media files.");
|
|
@@ -101,7 +101,10 @@ export async function migrate() {
|
|
|
101
101
|
} catch (err) {
|
|
102
102
|
console.error(`\n Migration failed during install: ${err.message}`);
|
|
103
103
|
console.error(` Your v1 backup is at: ${backupDir}`);
|
|
104
|
-
|
|
104
|
+
const restoreHint = process.platform === "win32"
|
|
105
|
+
? `Move-Item "${backupDir}" "${v1Dir}"`
|
|
106
|
+
: `mv "${backupDir}" "${v1Dir}"`;
|
|
107
|
+
console.error(` To restore: ${restoreHint}\n`);
|
|
105
108
|
process.exit(1);
|
|
106
109
|
}
|
|
107
110
|
|
package/installer/update.js
CHANGED
|
@@ -4,6 +4,7 @@ import { homedir } from "node:os";
|
|
|
4
4
|
import { execSync } from "node:child_process";
|
|
5
5
|
import { ensureVenv, ensureVenvHealthy, getArkaosPython, pipInstall } from "./python-resolver.js";
|
|
6
6
|
import { copyHookLib } from "./hook-lib.js";
|
|
7
|
+
import { deployCoreSnapshot } from "./core-snapshot.js";
|
|
7
8
|
import { getRuntimeConfig } from "./detect-runtime.js";
|
|
8
9
|
import { loadAdapter } from "./index.js";
|
|
9
10
|
import { migrateUserData, printMigrationReport } from "./migrate-user-data.js";
|
|
@@ -455,6 +456,18 @@ export async function update() {
|
|
|
455
456
|
// different clone than the original install.
|
|
456
457
|
console.log(" [7/8] Updating references...");
|
|
457
458
|
writeFileSync(join(installDir, ".repo-path"), ARKAOS_ROOT);
|
|
459
|
+
// .repo-path points at the npx cache, which `npm cache clean` can purge;
|
|
460
|
+
// refresh the ~/.arkaos/lib snapshot so arka-py and the Python hooks
|
|
461
|
+
// always keep a validated fallback (see installer/core-snapshot.js).
|
|
462
|
+
// A failed snapshot must never fail the update — resolvers degrade to
|
|
463
|
+
// .repo-path (and any previous snapshot is preserved by the safe swap).
|
|
464
|
+
try {
|
|
465
|
+
if (deployCoreSnapshot(ARKAOS_ROOT, installDir)) {
|
|
466
|
+
console.log(" ✓ Core snapshot refreshed in ~/.arkaos/lib");
|
|
467
|
+
}
|
|
468
|
+
} catch (err) {
|
|
469
|
+
console.log(` ⚠ Core snapshot skipped (${err.message}) — arka-py falls back to .repo-path`);
|
|
470
|
+
}
|
|
458
471
|
const skillsArkaosDir = join(homedir(), ".claude", "skills", "arkaos");
|
|
459
472
|
if (existsSync(skillsArkaosDir)) {
|
|
460
473
|
writeFileSync(join(skillsArkaosDir, ".arkaos-root"), ARKAOS_ROOT);
|