@caseyharalson/orrery 0.7.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 (40) hide show
  1. package/.devcontainer.example/Dockerfile +149 -0
  2. package/.devcontainer.example/devcontainer.json +61 -0
  3. package/.devcontainer.example/init-firewall.sh +175 -0
  4. package/LICENSE +21 -0
  5. package/README.md +139 -0
  6. package/agent/skills/discovery/SKILL.md +428 -0
  7. package/agent/skills/discovery/schemas/plan-schema.yaml +138 -0
  8. package/agent/skills/orrery-execute/SKILL.md +107 -0
  9. package/agent/skills/orrery-report/SKILL.md +119 -0
  10. package/agent/skills/orrery-review/SKILL.md +105 -0
  11. package/agent/skills/orrery-verify/SKILL.md +105 -0
  12. package/agent/skills/refine-plan/SKILL.md +291 -0
  13. package/agent/skills/simulate-plan/SKILL.md +244 -0
  14. package/bin/orrery.js +5 -0
  15. package/lib/cli/commands/help.js +21 -0
  16. package/lib/cli/commands/ingest-plan.js +56 -0
  17. package/lib/cli/commands/init.js +21 -0
  18. package/lib/cli/commands/install-devcontainer.js +97 -0
  19. package/lib/cli/commands/install-skills.js +182 -0
  20. package/lib/cli/commands/orchestrate.js +27 -0
  21. package/lib/cli/commands/resume.js +146 -0
  22. package/lib/cli/commands/status.js +137 -0
  23. package/lib/cli/commands/validate-plan.js +288 -0
  24. package/lib/cli/index.js +57 -0
  25. package/lib/orchestration/agent-invoker.js +595 -0
  26. package/lib/orchestration/condensed-plan.js +128 -0
  27. package/lib/orchestration/config.js +213 -0
  28. package/lib/orchestration/dependency-resolver.js +149 -0
  29. package/lib/orchestration/edit-invoker.js +115 -0
  30. package/lib/orchestration/index.js +1065 -0
  31. package/lib/orchestration/plan-loader.js +212 -0
  32. package/lib/orchestration/progress-tracker.js +208 -0
  33. package/lib/orchestration/report-format.js +80 -0
  34. package/lib/orchestration/review-invoker.js +305 -0
  35. package/lib/utils/agent-detector.js +47 -0
  36. package/lib/utils/git.js +297 -0
  37. package/lib/utils/paths.js +43 -0
  38. package/lib/utils/plan-detect.js +24 -0
  39. package/lib/utils/skill-copier.js +79 -0
  40. package/package.json +58 -0
@@ -0,0 +1,79 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+
4
+ function ensureDir(dirPath, mode, dryRun) {
5
+ if (dryRun) {
6
+ return;
7
+ }
8
+ if (!fs.existsSync(dirPath)) {
9
+ fs.mkdirSync(dirPath, { recursive: true, mode });
10
+ }
11
+ if (mode) {
12
+ fs.chmodSync(dirPath, mode);
13
+ }
14
+ }
15
+
16
+ function copyFile(sourcePath, targetPath, mode, options) {
17
+ const { dryRun, force } = options;
18
+
19
+ if (fs.existsSync(targetPath) && !force) {
20
+ console.warn(`Skipping existing file: ${targetPath}`);
21
+ return false;
22
+ }
23
+
24
+ if (dryRun) {
25
+ console.log(`[dry-run] copy ${sourcePath} -> ${targetPath}`);
26
+ return true;
27
+ }
28
+
29
+ ensureDir(path.dirname(targetPath), null, dryRun);
30
+ fs.copyFileSync(sourcePath, targetPath);
31
+ if (mode) {
32
+ fs.chmodSync(targetPath, mode);
33
+ }
34
+ return true;
35
+ }
36
+
37
+ function copyDirectory(sourceDir, targetDir, options, copiedFiles) {
38
+ const entries = fs.readdirSync(sourceDir, { withFileTypes: true });
39
+ const sourceStat = fs.statSync(sourceDir);
40
+ ensureDir(targetDir, sourceStat.mode, options.dryRun);
41
+
42
+ for (const entry of entries) {
43
+ const sourcePath = path.join(sourceDir, entry.name);
44
+ const targetPath = path.join(targetDir, entry.name);
45
+ const entryStat = fs.statSync(sourcePath);
46
+
47
+ if (entry.isDirectory()) {
48
+ copyDirectory(sourcePath, targetPath, options, copiedFiles);
49
+ continue;
50
+ }
51
+
52
+ if (copyFile(sourcePath, targetPath, entryStat.mode, options)) {
53
+ copiedFiles.push(targetPath);
54
+ }
55
+ }
56
+ }
57
+
58
+ function copySkills(sourceDir, targetDir, options = {}) {
59
+ const normalizedOptions = {
60
+ force: Boolean(options.force),
61
+ dryRun: Boolean(options.dryRun)
62
+ };
63
+
64
+ if (!sourceDir || !targetDir) {
65
+ throw new Error("copySkills requires sourceDir and targetDir.");
66
+ }
67
+
68
+ if (!fs.existsSync(sourceDir) || !fs.statSync(sourceDir).isDirectory()) {
69
+ throw new Error(`Source directory not found: ${sourceDir}`);
70
+ }
71
+
72
+ const copiedFiles = [];
73
+ copyDirectory(sourceDir, targetDir, normalizedOptions, copiedFiles);
74
+ return copiedFiles;
75
+ }
76
+
77
+ module.exports = {
78
+ copySkills
79
+ };
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@caseyharalson/orrery",
3
+ "version": "0.7.1",
4
+ "description": "Workflow planning and orchestration CLI for AI agents",
5
+ "license": "MIT",
6
+ "author": "Casey Haralson",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/CaseyHaralson/orrery.git"
10
+ },
11
+ "homepage": "https://github.com/CaseyHaralson/orrery#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/CaseyHaralson/orrery/issues"
14
+ },
15
+ "keywords": [
16
+ "ai",
17
+ "agent",
18
+ "workflow",
19
+ "orchestration",
20
+ "cli",
21
+ "automation",
22
+ "llm"
23
+ ],
24
+ "engines": {
25
+ "node": ">=18"
26
+ },
27
+ "bin": {
28
+ "orrery": "bin/orrery.js"
29
+ },
30
+ "scripts": {
31
+ "fix": "npm run format && npm run lint -- --fix",
32
+ "format": "prettier --write .",
33
+ "format:check": "prettier --check .",
34
+ "lint": "eslint .",
35
+ "prepublishOnly": "npm run lint && npm run format:check && npm test",
36
+ "release:prepare": "node scripts/prepare-release.js",
37
+ "test": "node --test",
38
+ "validate": "npm run format:check && npm run lint && npm test"
39
+ },
40
+ "files": [
41
+ ".devcontainer.example",
42
+ "agent",
43
+ "bin",
44
+ "lib",
45
+ "LICENSE",
46
+ "README.md",
47
+ "package.json"
48
+ ],
49
+ "dependencies": {
50
+ "commander": "^11.1.0",
51
+ "yaml": "^2.8.2"
52
+ },
53
+ "devDependencies": {
54
+ "eslint": "^9.39.2",
55
+ "eslint-config-prettier": "^10.1.8",
56
+ "prettier": "^3.8.1"
57
+ }
58
+ }