@voidlabs.gg/voidshift 0.0.0-stage → 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.
- package/LICENSE +202 -0
- package/README.md +134 -2
- package/dist/checks.d.ts +9 -0
- package/dist/checks.js +51 -0
- package/dist/commands/args.d.ts +13 -0
- package/dist/commands/args.js +22 -0
- package/dist/commands/config.d.ts +1 -0
- package/dist/commands/config.js +181 -0
- package/dist/commands/doctor.d.ts +3 -0
- package/dist/commands/doctor.js +52 -0
- package/dist/commands/help.d.ts +3 -0
- package/dist/commands/help.js +59 -0
- package/dist/commands/setup.d.ts +2 -0
- package/dist/commands/setup.js +135 -0
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/status.js +60 -0
- package/dist/commands/tools.d.ts +9 -0
- package/dist/commands/tools.js +111 -0
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.js +79 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.js +29 -0
- package/dist/dotted.d.ts +9 -0
- package/dist/dotted.js +86 -0
- package/dist/loader.d.ts +6 -0
- package/dist/loader.js +51 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +93 -0
- package/dist/registry.d.ts +8 -0
- package/dist/registry.js +26 -0
- package/dist/tool.d.ts +51 -0
- package/dist/tool.js +4 -0
- package/dist/tui/actions.d.ts +17 -0
- package/dist/tui/actions.js +99 -0
- package/dist/tui/app.d.ts +6 -0
- package/dist/tui/app.js +246 -0
- package/dist/tui/context.d.ts +62 -0
- package/dist/tui/context.js +48 -0
- package/dist/tui/data.d.ts +196 -0
- package/dist/tui/data.js +302 -0
- package/dist/tui/format.d.ts +11 -0
- package/dist/tui/format.js +54 -0
- package/dist/tui/home.d.ts +51 -0
- package/dist/tui/home.js +336 -0
- package/dist/tui/keys.d.ts +2 -0
- package/dist/tui/keys.js +107 -0
- package/dist/tui/nav.d.ts +24 -0
- package/dist/tui/nav.js +32 -0
- package/dist/tui/palette.d.ts +32 -0
- package/dist/tui/palette.js +269 -0
- package/dist/tui/run.d.ts +1 -0
- package/dist/tui/run.js +20 -0
- package/dist/tui/screens/agents.d.ts +6 -0
- package/dist/tui/screens/agents.js +44 -0
- package/dist/tui/screens/awake.d.ts +23 -0
- package/dist/tui/screens/awake.js +209 -0
- package/dist/tui/screens/checks.d.ts +11 -0
- package/dist/tui/screens/checks.js +106 -0
- package/dist/tui/screens/homes.d.ts +14 -0
- package/dist/tui/screens/homes.js +99 -0
- package/dist/tui/screens/list-window.d.ts +6 -0
- package/dist/tui/screens/list-window.js +18 -0
- package/dist/tui/screens/log.d.ts +26 -0
- package/dist/tui/screens/log.js +266 -0
- package/dist/tui/screens/memory.d.ts +24 -0
- package/dist/tui/screens/memory.js +174 -0
- package/dist/tui/screens/project-form.d.ts +14 -0
- package/dist/tui/screens/project-form.js +137 -0
- package/dist/tui/screens/projects.d.ts +17 -0
- package/dist/tui/screens/projects.js +109 -0
- package/dist/tui/screens/runs.d.ts +43 -0
- package/dist/tui/screens/runs.js +420 -0
- package/dist/tui/screens/settings.d.ts +17 -0
- package/dist/tui/screens/settings.js +153 -0
- package/dist/tui/screens/workflow-form.d.ts +58 -0
- package/dist/tui/screens/workflow-form.js +375 -0
- package/dist/tui/screens/workflows.d.ts +41 -0
- package/dist/tui/screens/workflows.js +174 -0
- package/dist/tui/screens.d.ts +30 -0
- package/dist/tui/screens.js +172 -0
- package/dist/tui/theme.d.ts +14 -0
- package/dist/tui/theme.js +18 -0
- package/dist/tui/widgets.d.ts +122 -0
- package/dist/tui/widgets.js +264 -0
- package/dist/ui.d.ts +5 -0
- package/dist/ui.js +82 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.js +17 -0
- package/package.json +59 -4
package/dist/ui.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as p from '@clack/prompts';
|
|
2
|
+
export class Cancelled extends Error {
|
|
3
|
+
}
|
|
4
|
+
function unwrap(value) {
|
|
5
|
+
if (p.isCancel(value)) {
|
|
6
|
+
p.cancel('Setup cancelled. Nothing after this point was changed.');
|
|
7
|
+
throw new Cancelled();
|
|
8
|
+
}
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
export const ui = {
|
|
12
|
+
info: (line) => p.log.info(line),
|
|
13
|
+
warn: (line) => p.log.warn(line),
|
|
14
|
+
async text(message, o = {}) {
|
|
15
|
+
return unwrap(await p.text({ message, initialValue: o.initial, placeholder: o.placeholder, validate: o.validate ? (v) => o.validate(v ?? '') : undefined }));
|
|
16
|
+
},
|
|
17
|
+
async secret(message, validate) {
|
|
18
|
+
return unwrap(await p.password({ message, validate: validate ? (v) => validate(v ?? '') : undefined }));
|
|
19
|
+
},
|
|
20
|
+
async confirm(message, initial = true) {
|
|
21
|
+
return unwrap(await p.confirm({ message, initialValue: initial }));
|
|
22
|
+
},
|
|
23
|
+
async select(message, choices, initial) {
|
|
24
|
+
return unwrap(await p.select({ message, options: choices, initialValue: initial }));
|
|
25
|
+
},
|
|
26
|
+
async multiselect(message, choices, initial = []) {
|
|
27
|
+
return unwrap(await p.multiselect({ message, options: choices, initialValues: initial, required: false }));
|
|
28
|
+
},
|
|
29
|
+
async search(message, choices, placeholder, initial) {
|
|
30
|
+
return unwrap(await p.autocomplete({
|
|
31
|
+
message,
|
|
32
|
+
options: choices,
|
|
33
|
+
placeholder,
|
|
34
|
+
initialValue: initial,
|
|
35
|
+
maxItems: 8,
|
|
36
|
+
filter: (q, o) => `${o.label ?? ''} ${o.hint ?? ''}`.toLowerCase().includes(q.toLowerCase()),
|
|
37
|
+
}));
|
|
38
|
+
},
|
|
39
|
+
async path(message, o = {}) {
|
|
40
|
+
return unwrap(await p.path({ message, directory: true, initialValue: o.initial, validate: o.validate ? (v) => o.validate(v ?? '') : undefined }));
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
const shown = (v, choices) => {
|
|
44
|
+
const label = (x) => choices?.find((c) => c.value === x)?.label ?? x;
|
|
45
|
+
if (typeof v === 'boolean')
|
|
46
|
+
return v ? 'Yes' : 'No';
|
|
47
|
+
return Array.isArray(v) ? v.map(label).join(', ') || 'none' : label(v);
|
|
48
|
+
};
|
|
49
|
+
// `vsf setup --defaults`: every prompt with a default takes it and says so.
|
|
50
|
+
// Prompts with no sensible default (a secret, a path) still ask.
|
|
51
|
+
export const defaultsUi = {
|
|
52
|
+
info: ui.info,
|
|
53
|
+
warn: ui.warn,
|
|
54
|
+
async text(message, o = {}) {
|
|
55
|
+
if (o.initial === undefined || o.validate?.(o.initial))
|
|
56
|
+
return ui.text(message, o);
|
|
57
|
+
p.log.info(`${message} ${o.initial}`);
|
|
58
|
+
return o.initial;
|
|
59
|
+
},
|
|
60
|
+
secret: ui.secret,
|
|
61
|
+
async confirm(message, initial = true) {
|
|
62
|
+
p.log.info(`${message} ${shown(initial)}`);
|
|
63
|
+
return initial;
|
|
64
|
+
},
|
|
65
|
+
async select(message, choices, initial) {
|
|
66
|
+
if (initial === undefined || !choices.some((c) => c.value === initial))
|
|
67
|
+
return ui.select(message, choices, initial);
|
|
68
|
+
p.log.info(`${message} ${shown(initial, choices)}`);
|
|
69
|
+
return initial;
|
|
70
|
+
},
|
|
71
|
+
async multiselect(message, choices, initial = []) {
|
|
72
|
+
p.log.info(`${message} ${shown(initial, choices)}`);
|
|
73
|
+
return initial;
|
|
74
|
+
},
|
|
75
|
+
async search(message, choices, placeholder, initial) {
|
|
76
|
+
if (initial === undefined || !choices.some((c) => c.value === initial))
|
|
77
|
+
return ui.search(message, choices, placeholder, initial);
|
|
78
|
+
p.log.info(`${message} ${shown(initial, choices)}`);
|
|
79
|
+
return initial;
|
|
80
|
+
},
|
|
81
|
+
path: ui.path,
|
|
82
|
+
};
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
export const CLI_PKG = '@voidlabs.gg/voidshift';
|
|
3
|
+
export function cliVersion() {
|
|
4
|
+
return JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;
|
|
5
|
+
}
|
|
6
|
+
// True when version a is newer than b (plain x.y.z).
|
|
7
|
+
export function isNewer(a, b) {
|
|
8
|
+
const pa = a.split('.').map(Number);
|
|
9
|
+
const pb = b.split('.').map(Number);
|
|
10
|
+
for (let i = 0; i < 3; i++) {
|
|
11
|
+
const x = pa[i] ?? 0;
|
|
12
|
+
const y = pb[i] ?? 0;
|
|
13
|
+
if (x !== y)
|
|
14
|
+
return x > y;
|
|
15
|
+
}
|
|
16
|
+
return false;
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voidlabs.gg/voidshift",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "One CLI for the Void dev tools: keep your Mac awake, run agents in the background, shared skills and memory for Claude Code and Codex.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/EratosVoid/voidshift.git",
|
|
9
|
+
"directory": "packages/cli"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://voidlabs.gg",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/EratosVoid/voidshift/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"claude-code",
|
|
17
|
+
"codex",
|
|
18
|
+
"agents",
|
|
19
|
+
"linear",
|
|
20
|
+
"cli",
|
|
21
|
+
"macos"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"bin": {
|
|
25
|
+
"voidshift": "dist/main.js",
|
|
26
|
+
"vsf": "dist/main.js"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"README.md"
|
|
32
|
+
],
|
|
33
|
+
"os": [
|
|
34
|
+
"darwin"
|
|
35
|
+
],
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=22.18"
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public",
|
|
41
|
+
"provenance": true
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
45
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
46
|
+
"test": "node --test test/*.test.ts",
|
|
47
|
+
"dev": "node src/main.ts",
|
|
48
|
+
"prepublishOnly": "rm -rf dist && tsc -p tsconfig.json"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@clack/prompts": "^1.8.1",
|
|
52
|
+
"ink": "^8.0.0",
|
|
53
|
+
"react": "^19.3.1"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/node": "^22.18.0",
|
|
57
|
+
"@types/react": "^19.3.0",
|
|
58
|
+
"ink-testing-library": "^4.0.0",
|
|
59
|
+
"typescript": "^5.9.0"
|
|
60
|
+
}
|
|
61
|
+
}
|