@lsctech/polaris 0.3.28 → 0.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.
@@ -10,11 +10,9 @@
10
10
  * node tools.js polaris_loop_status
11
11
  */
12
12
 
13
- 'use strict';
14
-
15
- const { spawnSync } = require('child_process');
16
- const fs = require('fs');
17
- const path = require('path');
13
+ let spawnSync;
14
+ let fs;
15
+ let path;
18
16
 
19
17
  // ── binary resolution ──────────────────────────────────────────────────────
20
18
 
@@ -171,21 +169,32 @@ function unknownTool(tool) {
171
169
 
172
170
  // ── dispatch ───────────────────────────────────────────────────────────────
173
171
 
174
- const [, , tool, ...rest] = process.argv;
175
-
176
- switch (tool) {
177
- case 'polaris_run':
178
- operatorOnly('polaris_run', 'polaris run <issue_id>');
179
- break;
180
- case 'polaris_loop_continue':
181
- operatorOnly('polaris_loop_continue', 'polaris loop continue');
182
- break;
183
- case 'polaris_status':
184
- polarisStatus('polaris_status', ['status', '--json']);
185
- break;
186
- case 'polaris_loop_status':
187
- polarisStatus('polaris_loop_status', ['loop', 'status', '--json']);
188
- break;
189
- default:
190
- unknownTool(tool);
172
+ async function main() {
173
+ ({ spawnSync } = await import('node:child_process'));
174
+ fs = await import('node:fs');
175
+ path = await import('node:path');
176
+
177
+ const [, , tool] = process.argv;
178
+
179
+ switch (tool) {
180
+ case 'polaris_run':
181
+ operatorOnly('polaris_run', 'polaris run <issue_id>');
182
+ break;
183
+ case 'polaris_loop_continue':
184
+ operatorOnly('polaris_loop_continue', 'polaris loop continue');
185
+ break;
186
+ case 'polaris_status':
187
+ polarisStatus('polaris_status', ['status', '--json']);
188
+ break;
189
+ case 'polaris_loop_status':
190
+ polarisStatus('polaris_loop_status', ['loop', 'status', '--json']);
191
+ break;
192
+ default:
193
+ unknownTool(tool);
194
+ }
191
195
  }
196
+
197
+ main().catch((error) => {
198
+ console.log(JSON.stringify({ error: error instanceof Error ? error.message : String(error) }));
199
+ process.exit(1);
200
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsctech/polaris",
3
- "version": "0.3.28",
3
+ "version": "0.4.0",
4
4
  "description": "Polaris — standalone taskchain orchestration framework for governed AI agent workflows",
5
5
  "bin": {
6
6
  "polaris": "dist/cli/index.js",
@@ -22,7 +22,7 @@
22
22
  "node": ">=22.0.0"
23
23
  },
24
24
  "scripts": {
25
- "build": "tsc && rm -rf dist/workspace && cp -r src/workspace dist/workspace",
25
+ "build": "tsc && rm -rf dist/workspace && cp -r src/workspace dist/workspace && cp .codex/plugins/polaris/skills/polaris-tools/tools.js dist/workspace/.polaris/skills/polaris-tools/tools.js",
26
26
  "lint": "tsc --noEmit",
27
27
  "typecheck": "tsc --noEmit --project tsconfig.typecheck.json",
28
28
  "test": "vitest run",