arbiter-ai 1.0.2 → 1.0.4

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 (2) hide show
  1. package/dist/index.js +46 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,10 +1,45 @@
1
1
  #!/usr/bin/env node
2
2
  // Main entry point for the Arbiter system
3
3
  // Ties together state, router, and TUI for the hierarchical AI orchestration system
4
+ import fs from 'node:fs';
4
5
  import { Router } from './router.js';
5
6
  import { loadSession } from './session-persistence.js';
6
7
  import { createInitialState } from './state.js';
7
8
  import { checkGitignore, createTUI, showCharacterSelect, showForestIntro, showTitleScreen, } from './tui/index.js';
9
+ /**
10
+ * Get package.json version
11
+ */
12
+ function getVersion() {
13
+ const pkgPath = new URL('../package.json', import.meta.url);
14
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
15
+ return pkg.version;
16
+ }
17
+ /**
18
+ * Print help message and exit
19
+ */
20
+ function printHelp() {
21
+ console.log(`
22
+ arbiter - Hierarchical AI orchestration system
23
+
24
+ Consult with the Arbiter, a wise overseer who commands a
25
+ council of Orchestrators to tackle complex tasks. Each layer
26
+ extends Claude's context, keeping the work on track. Bring
27
+ a detailed markdown description of your requirements.
28
+
29
+ USAGE
30
+ arbiter [options] [requirements-file]
31
+
32
+ OPTIONS
33
+ -h, --help Show this help message
34
+ -v, --version Show version number
35
+ --resume Resume from saved session (if <24h old)
36
+
37
+ EXAMPLES
38
+ arbiter Start fresh session
39
+ arbiter ./SPEC.md Start with requirements file (skip in-game prompt)
40
+ arbiter --resume Resume previous session
41
+ `);
42
+ }
8
43
  /**
9
44
  * Outputs session information to stderr for resume capability
10
45
  * Format per architecture doc:
@@ -64,6 +99,16 @@ async function main() {
64
99
  try {
65
100
  // Parse CLI arguments
66
101
  const args = process.argv.slice(2);
102
+ // Handle --help flag (early exit)
103
+ if (args.includes('--help') || args.includes('-h')) {
104
+ printHelp();
105
+ process.exit(0);
106
+ }
107
+ // Handle --version flag (early exit)
108
+ if (args.includes('--version') || args.includes('-v')) {
109
+ console.log(getVersion());
110
+ process.exit(0);
111
+ }
67
112
  const shouldResume = args.includes('--resume');
68
113
  // Handle --resume flag
69
114
  let savedSession = null;
@@ -74,7 +119,7 @@ async function main() {
74
119
  }
75
120
  }
76
121
  // Check for positional requirements file argument (first non-flag arg)
77
- const positionalArgs = args.filter((arg) => !arg.startsWith('--'));
122
+ const positionalArgs = args.filter((arg) => !arg.startsWith('--') && !arg.startsWith('-'));
78
123
  const cliRequirementsFile = positionalArgs[0] || null;
79
124
  let selectedCharacter;
80
125
  if (savedSession) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arbiter-ai",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Hierarchical AI orchestration system for extending Claude's effective context window while staying on task",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",