@nuucognition/flint-cli 0.6.0-dev.12 → 0.6.0-dev.14
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/bin/flint.js +10 -0
- package/dist/_flint/prompts/flint-interactive.md +7 -5
- package/dist/_orbh/prompts/harness/codex.md +6 -0
- package/dist/_orbh/prompts/headless.md +9 -7
- package/dist/index.js +124419 -112577
- package/package.json +10 -7
- package/scripts/fix-node-pty-perms.mjs +51 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuucognition/flint-cli",
|
|
3
|
-
"version": "0.6.0-dev.
|
|
3
|
+
"version": "0.6.0-dev.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Flint cognitive workspace CLI",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -12,19 +12,20 @@
|
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"bin/",
|
|
15
|
-
"dist/"
|
|
15
|
+
"dist/",
|
|
16
|
+
"scripts/fix-node-pty-perms.mjs"
|
|
16
17
|
],
|
|
17
18
|
"dependencies": {
|
|
18
19
|
"@fastify/cors": "^11.2.0",
|
|
19
20
|
"@fastify/static": "^8.1.0",
|
|
20
|
-
"cfonts": "
|
|
21
|
+
"cfonts": "3.3.1",
|
|
21
22
|
"chokidar": "^3.6.0",
|
|
22
23
|
"fastify": "^5.0.0",
|
|
23
24
|
"glob": "^10.5.0",
|
|
24
25
|
"yaml": "^2.6.0"
|
|
25
26
|
},
|
|
26
27
|
"optionalDependencies": {
|
|
27
|
-
"node-pty": "
|
|
28
|
+
"node-pty": "1.1.0"
|
|
28
29
|
},
|
|
29
30
|
"engines": {
|
|
30
31
|
"node": ">=20"
|
|
@@ -36,14 +37,14 @@
|
|
|
36
37
|
"tsup": "^8.3.5",
|
|
37
38
|
"tsx": "^4.19.2",
|
|
38
39
|
"typescript": "^5.9.2",
|
|
39
|
-
"@nuucognition/flint": "0.1.0",
|
|
40
40
|
"@nuucognition/flint-migrations": "0.1.0",
|
|
41
41
|
"@nuucognition/flint-sdk": "0.0.1",
|
|
42
|
+
"@nuucognition/flint": "0.1.0",
|
|
42
43
|
"@nuucognition/flint-server": "0.0.1",
|
|
43
44
|
"@nuucognition/orbh": "0.0.1-dev.0",
|
|
44
45
|
"@nuucognition/orbh-cli": "0.1.0-dev.1",
|
|
45
|
-
"@nuucognition/
|
|
46
|
-
"@nuucognition/
|
|
46
|
+
"@nuucognition/typescript-config": "0.0.0",
|
|
47
|
+
"@nuucognition/eslint-config": "0.0.0"
|
|
47
48
|
},
|
|
48
49
|
"scripts": {
|
|
49
50
|
"predev": "turbo build --filter=@nuucognition/flint-cli^...",
|
|
@@ -53,6 +54,8 @@
|
|
|
53
54
|
"clean": "rm -rf dist",
|
|
54
55
|
"typecheck": "tsc --noEmit",
|
|
55
56
|
"lint": "eslint .",
|
|
57
|
+
"test": "tsx --test src/*.test.ts",
|
|
58
|
+
"postinstall": "node ./scripts/fix-node-pty-perms.mjs",
|
|
56
59
|
"test-pack": "../../scripts/test-pack.sh"
|
|
57
60
|
}
|
|
58
61
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Restore the execute bit on node-pty's darwin spawn-helper after install.
|
|
3
|
+
//
|
|
4
|
+
// node-pty 1.x ships its prebuilt darwin `spawn-helper` binary without the
|
|
5
|
+
// execute bit (microsoft/node-pty#850). node-pty posix_spawns that helper, so
|
|
6
|
+
// a mode-644 helper makes every PTY spawn fail with "posix_spawnp failed" —
|
|
7
|
+
// which silently disables Orbh's terminal-title rewriting (the launcher in
|
|
8
|
+
// packages/orbh/src/launch.ts catches the spawn error and falls back to a
|
|
9
|
+
// plain inherit spawn, so the tab shows the harness's native title instead of
|
|
10
|
+
// the orbh session title).
|
|
11
|
+
//
|
|
12
|
+
// Wired as flint-cli's `postinstall`, this runs in the same privilege context
|
|
13
|
+
// that wrote the files (so it can fix even root-owned global installs) and
|
|
14
|
+
// chmods the freshly-installed helper to 0755.
|
|
15
|
+
//
|
|
16
|
+
// The repo-root scripts/fix-node-pty-perms.mjs handles the monorepo pnpm-store
|
|
17
|
+
// layout for local dev; this package-local copy handles the flat node_modules
|
|
18
|
+
// layout a consumer install produces. Idempotent, darwin-only, and best-effort:
|
|
19
|
+
// any failure (node-pty absent — it's an optionalDependency — or chmod not
|
|
20
|
+
// permitted) is swallowed so it never breaks `npm install`.
|
|
21
|
+
|
|
22
|
+
import { chmodSync, statSync, existsSync } from 'node:fs';
|
|
23
|
+
import { join, dirname } from 'node:path';
|
|
24
|
+
import { createRequire } from 'node:module';
|
|
25
|
+
|
|
26
|
+
if (process.platform !== 'darwin') process.exit(0);
|
|
27
|
+
|
|
28
|
+
let prebuildsDir;
|
|
29
|
+
try {
|
|
30
|
+
// node-pty 1.x has no `exports` map, so resolving its package.json is safe.
|
|
31
|
+
// createRequire resolution finds node-pty whether it is nested under this
|
|
32
|
+
// package or hoisted to a parent node_modules.
|
|
33
|
+
const require = createRequire(import.meta.url);
|
|
34
|
+
prebuildsDir = join(dirname(require.resolve('node-pty/package.json')), 'prebuilds');
|
|
35
|
+
} catch {
|
|
36
|
+
// node-pty is an optionalDependency — nothing to fix if it isn't installed.
|
|
37
|
+
process.exit(0);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
for (const platform of ['darwin-arm64', 'darwin-x64']) {
|
|
41
|
+
const helper = join(prebuildsDir, platform, 'spawn-helper');
|
|
42
|
+
try {
|
|
43
|
+
if (!existsSync(helper)) continue;
|
|
44
|
+
const mode = statSync(helper).mode & 0o777;
|
|
45
|
+
if ((mode & 0o111) === 0o111) continue; // already executable
|
|
46
|
+
chmodSync(helper, 0o755);
|
|
47
|
+
console.log(`flint: restored exec bit on ${helper}`);
|
|
48
|
+
} catch {
|
|
49
|
+
// best-effort — never fail the install over a perms tweak
|
|
50
|
+
}
|
|
51
|
+
}
|