@nuucognition/flint-cli 0.6.0-dev.18 → 0.6.0-dev.19

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.
@@ -0,0 +1,51 @@
1
+ import { createRequire as __cliCoreRequire } from 'module'; const require = __cliCoreRequire(import.meta.url);
2
+
3
+ // ../orbh-cli/src/tui/renderer-selection.ts
4
+ var INK_RENDERER_REMOVED_MESSAGE = "Ink renderer has been removed; use --renderer=opentui (the default).";
5
+ function resolveTuiRenderer(requested, envValue = process.env.ORBH_TUI_RENDERER) {
6
+ if (requested === "ink" || requested === void 0 && envValue?.trim().toLowerCase() === "ink") {
7
+ throw new Error(INK_RENDERER_REMOVED_MESSAGE);
8
+ }
9
+ return "opentui";
10
+ }
11
+
12
+ // ../orbh-cli/src/open-tui-invocation.ts
13
+ function rendererArg(args) {
14
+ let requested;
15
+ for (let index = 0; index < args.length; index += 1) {
16
+ const arg = args[index]?.trim().toLowerCase();
17
+ const value = arg?.startsWith("--renderer=") ? arg.slice("--renderer=".length) : arg === "--renderer" ? args[index + 1]?.trim().toLowerCase() : void 0;
18
+ if (value === "ink" || value === "opentui") requested = value;
19
+ }
20
+ return requested;
21
+ }
22
+ var CHROME_SUBCOMMANDS = /* @__PURE__ */ new Set(["i", "interactive", "attach"]);
23
+ function isAttachChromeRoute(invocation) {
24
+ if (!invocation.stdinTty || !invocation.stdoutTty) return false;
25
+ if (invocation.envNoChrome?.trim() === "1") return false;
26
+ const args = invocation.cli === "orbh" ? invocation.args : invocation.args[0] === "orbh" ? invocation.args.slice(1) : null;
27
+ if (!args || args.length === 0) return false;
28
+ const subcommand = args[0];
29
+ if (subcommand === void 0 || !CHROME_SUBCOMMANDS.has(subcommand)) return false;
30
+ for (const arg of args) {
31
+ if (arg === "--") break;
32
+ if (arg === "--plain" || arg === "--no-detach" || arg === "--print" || arg === "--json" || arg === "--orbh-internal-manager") return false;
33
+ }
34
+ return true;
35
+ }
36
+ function shouldEnableOpenTuiFfi(invocation) {
37
+ if (isAttachChromeRoute(invocation)) return true;
38
+ const { cli, args } = invocation;
39
+ const rootCockpit = cli === "orbh" ? args.length === 0 : args.length === 1 && args[0] === "orbh";
40
+ const tuiOffset = cli === "orbh" ? args[0] === "tui" ? 0 : -1 : args[0] === "orbh" && args[1] === "tui" ? 1 : -1;
41
+ const explicitTui = tuiOffset >= 0;
42
+ if (!explicitTui && !(rootCockpit && invocation.stdinTty && invocation.stdoutTty)) return false;
43
+ const tuiArgs = explicitTui ? args.slice(tuiOffset + 1) : [];
44
+ const requested = rendererArg(tuiArgs);
45
+ if (requested === "ink") return false;
46
+ if (requested === void 0 && invocation.envRenderer?.trim().toLowerCase() === "ink") return false;
47
+ return resolveTuiRenderer(requested, invocation.envRenderer) === "opentui";
48
+ }
49
+ export {
50
+ shouldEnableOpenTuiFfi
51
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuucognition/flint-cli",
3
- "version": "0.6.0-dev.18",
3
+ "version": "0.6.0-dev.19",
4
4
  "type": "module",
5
5
  "description": "Flint cognitive workspace CLI",
6
6
  "license": "PROPRIETARY",
@@ -16,18 +16,21 @@
16
16
  "scripts/fix-node-pty-perms.mjs"
17
17
  ],
18
18
  "dependencies": {
19
+ "@opentui/core": "0.4.3",
20
+ "@opentui/react": "0.4.3",
19
21
  "@fastify/cors": "^11.2.0",
20
22
  "@fastify/static": "^8.1.0",
21
23
  "chokidar": "^3.6.0",
22
24
  "fastify": "^5.0.0",
23
25
  "glob": "^10.5.0",
26
+ "react": "^19.2.0",
24
27
  "yaml": "^2.6.0"
25
28
  },
26
29
  "optionalDependencies": {
27
30
  "node-pty": "1.1.0"
28
31
  },
29
32
  "engines": {
30
- "node": ">=24"
33
+ "node": ">=26.1"
31
34
  },
32
35
  "devDependencies": {
33
36
  "@nuucognition/cli-core": "link:../../../main/packages/cli-core",
@@ -37,16 +40,26 @@
37
40
  "tsup": "^8.3.5",
38
41
  "tsx": "^4.19.2",
39
42
  "typescript": "5.9.3",
43
+ "@nuucognition/address": "0.1.0",
40
44
  "@nuucognition/flint": "0.1.0",
41
- "@nuucognition/flint-server": "0.1.0",
42
- "@nuucognition/flint-migrations": "0.1.0",
43
- "@nuucognition/orbh": "0.0.1-dev.0",
44
45
  "@nuucognition/flint-mcp": "0.1.0",
46
+ "@nuucognition/flint-migrations": "0.1.0",
45
47
  "@nuucognition/flint-sdk": "0.1.0",
48
+ "@nuucognition/flint-server": "0.1.0",
49
+ "@nuucognition/orbh": "0.0.1-dev.0",
46
50
  "@nuucognition/orbh-cli": "0.1.0-dev.1",
47
51
  "@nuucognition/eslint-config": "0.0.0",
52
+ "@nuucognition/blacksmith-cli": "0.0.1",
48
53
  "@nuucognition/typescript-config": "0.0.0"
49
54
  },
55
+ "peerDependencies": {
56
+ "@nuucognition/blacksmith-cli": ">=0.0.1"
57
+ },
58
+ "peerDependenciesMeta": {
59
+ "@nuucognition/blacksmith-cli": {
60
+ "optional": true
61
+ }
62
+ },
50
63
  "scripts": {
51
64
  "predev": "turbo build --filter=@nuucognition/flint-cli^...",
52
65
  "dev": "tsx src/index.ts",