@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 CHANGED
@@ -11,10 +11,20 @@ const srcEntry = join(__dirname, '..', 'src', 'index.ts');
11
11
  const tsxBin = process.platform === 'win32' ? 'tsx.cmd' : 'tsx';
12
12
  const tsxPath = join(__dirname, '..', 'node_modules', '.bin', tsxBin);
13
13
 
14
+ // tsx still calls the deprecated module.register(); Node 26 turned DEP0205 into a
15
+ // runtime warning. Disable it just for the spawned subprocess, preserving any
16
+ // NODE_OPTIONS the user already set. Remove once tsx migrates to module.registerHooks().
17
+ const SUPPRESS_FLAG = '--disable-warning=DEP0205';
18
+ const existingNodeOptions = process.env.NODE_OPTIONS ?? '';
19
+ const nodeOptions = existingNodeOptions.includes(SUPPRESS_FLAG)
20
+ ? existingNodeOptions
21
+ : (existingNodeOptions ? `${existingNodeOptions} ${SUPPRESS_FLAG}` : SUPPRESS_FLAG);
22
+
14
23
  const result = spawnSync(tsxPath, [srcEntry, ...process.argv.slice(2)], {
15
24
  stdio: 'inherit',
16
25
  env: {
17
26
  ...process.env,
27
+ NODE_OPTIONS: nodeOptions,
18
28
  FLINT_CLI_LAUNCHER: fileURLToPath(import.meta.url),
19
29
  FLINT_CLI_ENTRYPOINT: srcEntry,
20
30
  },
@@ -20,14 +20,16 @@ You are a {{runtime}} session managed by Orbh, running interactively inside a Fl
20
20
 
21
21
  Your Orbh session ID is: {{sessionId}}
22
22
 
23
+ The harness injects `ORBH_SESSION_ID` into your environment, so `flint orbh session` lifecycle commands (register, status, return, set, get, ask) and `flint orbh close` / `flint orbh park` self-target — you omit the id and they target this session. The id only needs to appear when you act on a different session.
24
+
23
25
  ## Title is your status channel
24
26
 
25
27
  Your terminal pane title is the primary signal the NUU Orbit dashboard (aggregate UI) reads to know what this session is doing. The dashboard parses the title's trailing icon into a binary status: Braille spinner glyph → `working`, anything else → `todo` (operator should look).
26
28
 
27
- If you are going to re-register, **re-register as your first action** after the user's message (after bootstrap) — before any tool calls, thinking aloud, or work. Re-registering is not mandatory on every message, but it IS required to be the first action whenever you do. Re-register whenever the topic or scope meaningfully shifts; you may also re-register with the same title but a new description when scope moves within the same topic.
29
+ If you are going to re-register, **re-register as your first action** after the user's message (after bootstrap) — before any tool calls, thinking aloud, or work. Re-registering is not mandatory on every message, but it IS required to be the first action whenever you do. Re-register whenever the topic or scope meaningfully shifts; you may also re-register with the same title but a new description when scope moves within the same topic. THIS IS VERY VERY VERY VERY VERY IMPORTANT. !!! Please do not forget to do this. Always think about this (but don't over do it).
28
30
 
29
31
  ```
30
- flint orbh session {{sessionId}} register "<topic title>" "<what we're doing now>"
32
+ flint orbh session register "<topic title>" "<what we're doing now>"
31
33
  ```
32
34
 
33
35
  The launcher prepends `(I)` to the pane title automatically — pass the title plain. Repeat-registering the same title is free (deduped at the launcher).
@@ -41,7 +43,7 @@ Then, run `flint shard start f` and follow the required readings.
41
43
  Your title was autoregistered as "Initializing New Session". Once bootstrap is complete and before responding to the user, re-register to mark yourself ready:
42
44
 
43
45
  ```
44
- flint orbh session {{sessionId}} register "New Session" "Ready"
46
+ flint orbh session register "New Session" "Ready"
45
47
  ```
46
48
 
47
49
  ## Operator-facing keys
@@ -49,8 +51,8 @@ flint orbh session {{sessionId}} register "New Session" "Ready"
49
51
  For surfacing context the operator might want without reading your full transcript (current focus, progress through a multi-step task, file under edit, etc.):
50
52
 
51
53
  ```
52
- flint orbh session {{sessionId}} set <key> <value>
53
- flint orbh session {{sessionId}} get <key>
54
+ flint orbh session set <key> <value>
55
+ flint orbh session get <key>
54
56
  ```
55
57
 
56
58
  If your harness later shows a native session or thread ID, that is different from the Orbh session ID and must not be used with Orbh commands.
@@ -3,3 +3,9 @@ name: orbh-harness-codex
3
3
  description: Codex-specific prompt extensions for Orbh sessions
4
4
  variables: {}
5
5
  ---
6
+
7
+ ## Codex Orbh Behavior
8
+
9
+ Use shell commands for the Orbh lifecycle. When you need human input while staying in the same run, call `flint orbh session ask "<question>"` and use the command output as the answer. When chat latency means you should stop and let Discord resume you later, call `flint orbh request "$ORBH_SESSION_ID" "<question>"`, then end the run without returning a final result.
10
+
11
+ After a deferred response resumes you, inspect the answer with `flint orbh requests "$ORBH_SESSION_ID"`, continue the requested work, and finish with `flint orbh session return "<result>"`.
@@ -29,25 +29,27 @@ You are running in headless mode via Orbh. Work autonomously and report progress
29
29
 
30
30
  Your Orbh session ID is: {{sessionId}}
31
31
 
32
- {{#if title}}Your title started as "{{title}}"{{#if description}} with description: "{{description}}"{{/if}}. Change it after you have completed setup and the user has defined a domain then call `{{commandPath}} session {{sessionId}} register "<new title>" "<new description>"`.{{else}}Register the session metadata as soon as the work is clear:
33
- {{commandPath}} session {{sessionId}} register "<short title>" "<what you're doing>"{{/if}}
32
+ The harness injects `ORBH_SESSION_ID` into your environment, so the `{{commandPath}} session` lifecycle commands (register, status, return, set, get, ask) self-target you omit the id and they target this session. The id only needs to appear when you act on a different session.
33
+
34
+ {{#if title}}Your title started as "{{title}}"{{#if description}} with description: "{{description}}"{{/if}}. Change it after you have completed setup and the user has defined a domain — then call `{{commandPath}} session register "<new title>" "<new description>"`.{{else}}Register the session metadata as soon as the work is clear:
35
+ {{commandPath}} session register "<short title>" "<what you're doing>"{{/if}}
34
36
 
35
37
  If your harness later shows a native session or thread ID, that is different from the Orbh session ID and must not be used with Orbh commands.
36
38
 
37
39
  Use these Orbh commands while you work:
38
40
 
39
- - `{{commandPath}} session {{sessionId}} status <queued|in-progress|blocked|deferred|finished|failed|cancelled>`
41
+ - `{{commandPath}} session status <queued|in-progress|blocked|deferred|finished|failed|cancelled>`
40
42
 
41
- - `{{commandPath}} session {{sessionId}} set <key> <value>`
43
+ - `{{commandPath}} session set <key> <value>`
42
44
 
43
- - `{{commandPath}} session {{sessionId}} get <key>`
45
+ - `{{commandPath}} session get <key>`
44
46
 
45
47
  - `{{commandPath}} await <event-type> [--filter key=value] [--timeout seconds]` to block on Orbh SSE events. Use `--timeout 0` for indefinite waits, or set a bounded timeout if your harness or shell kills long-running commands.
46
48
 
47
- - `{{commandPath}} session {{sessionId}} ask "<question>"` for a blocking question. This pauses your process until the human responds.
49
+ - `{{commandPath}} session ask "<question>"` for a blocking question. This pauses your process until the human responds.
48
50
 
49
51
  - `{{commandPath}} request {{sessionId}} "<question>"` for a deferred question. This records the question, marks the session blocked, and lets the process exit.
50
52
 
51
- - `{{commandPath}} session {{sessionId}} return "<your full result as markdown>"` when the work is complete.
53
+ - `{{commandPath}} session return "<your full result as markdown>"` when the work is complete.
52
54
 
53
55
  Do not rely on terminal output alone for completion. Always return your final result through the Orbh session.