@nuucognition/flint-cli 0.6.0-dev.10 → 0.6.0-dev.12

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-prod.js CHANGED
@@ -4,4 +4,7 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
4
4
  import { dirname, join } from 'node:path';
5
5
 
6
6
  const __dirname = dirname(fileURLToPath(import.meta.url));
7
- await import(pathToFileURL(join(__dirname, '..', 'dist', 'index.js')).href);
7
+ const entrypoint = join(__dirname, '..', 'dist', 'index.js');
8
+ process.env.FLINT_CLI_LAUNCHER ??= fileURLToPath(import.meta.url);
9
+ process.env.FLINT_CLI_ENTRYPOINT ??= entrypoint;
10
+ await import(pathToFileURL(entrypoint).href);
package/bin/flint.js CHANGED
@@ -8,11 +8,17 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
8
8
  const srcEntry = join(__dirname, '..', 'src', 'index.ts');
9
9
 
10
10
  // Find tsx in node_modules (works in monorepo)
11
- const tsxPath = join(__dirname, '..', 'node_modules', '.bin', 'tsx');
11
+ const tsxBin = process.platform === 'win32' ? 'tsx.cmd' : 'tsx';
12
+ const tsxPath = join(__dirname, '..', 'node_modules', '.bin', tsxBin);
12
13
 
13
14
  const result = spawnSync(tsxPath, [srcEntry, ...process.argv.slice(2)], {
14
15
  stdio: 'inherit',
15
- shell: true,
16
+ env: {
17
+ ...process.env,
18
+ FLINT_CLI_LAUNCHER: fileURLToPath(import.meta.url),
19
+ FLINT_CLI_ENTRYPOINT: srcEntry,
20
+ },
21
+ shell: process.platform === 'win32',
16
22
  windowsHide: true,
17
23
  });
18
24
 
@@ -1,6 +1,6 @@
1
1
  ---
2
- name: flint-application
3
- description: Flint workspace application prompt injected into orbh-managed sessions running inside a Flint
2
+ name: flint-headless
3
+ description: Flint application prompt for headless orbh sessions running inside a Flint workspace
4
4
  variables:
5
5
  person:
6
6
  type: string
@@ -11,4 +11,4 @@ variables:
11
11
  You are inside a Flint workspace.
12
12
  {{#if person}}You're acting on behalf of @"Mesh/People/{{person}}.md".{{/if}}
13
13
  Read these files @"Mesh/(System) Flint Init.md" % @"Shards/Flint/init-f.md" % @"Shards/Orbh/init-foh.md"
14
- Then, run `flint shard start f` and follow the required readings.
14
+ Then, run `flint shard start f` and follow the required readings.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: flint-interactive
3
+ description: Full interactive Flint launch prompt — owned by Flint; the orbh package contributes nothing for interactive sessions
4
+ variables:
5
+ sessionId:
6
+ type: string
7
+ required: true
8
+ description: The Orbh session ID
9
+ runtime:
10
+ type: string
11
+ required: true
12
+ description: The harness runtime name
13
+ person:
14
+ type: string
15
+ required: false
16
+ description: Identity person name from .flint/identity.json (e.g. "Nathan Luo")
17
+ ---
18
+
19
+ You are a {{runtime}} session managed by Orbh, running interactively inside a Flint workspace. A human is present in the terminal.
20
+
21
+ Your Orbh session ID is: {{sessionId}}
22
+
23
+ ## Title is your status channel
24
+
25
+ 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
+
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.
28
+
29
+ ```
30
+ flint orbh session {{sessionId}} register "<topic title>" "<what we're doing now>"
31
+ ```
32
+
33
+ The launcher prepends `(I)` to the pane title automatically — pass the title plain. Repeat-registering the same title is free (deduped at the launcher).
34
+
35
+ ## Bootstrap
36
+
37
+ {{#if person}}You're acting on behalf of @"Mesh/People/{{person}}.md".{{/if}}
38
+ Read these files @"Mesh/(System) Flint Init.md" % @"Shards/Flint/init-f.md" % @"Shards/Orbh/init-foh.md"
39
+ Then, run `flint shard start f` and follow the required readings.
40
+
41
+ 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
+
43
+ ```
44
+ flint orbh session {{sessionId}} register "New Session" "Ready"
45
+ ```
46
+
47
+ ## Operator-facing keys
48
+
49
+ 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
+
51
+ ```
52
+ flint orbh session {{sessionId}} set <key> <value>
53
+ flint orbh session {{sessionId}} get <key>
54
+ ```
55
+
56
+ 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.
@@ -1,6 +1,6 @@
1
1
  ---
2
- name: orbh-base
3
- description: Base Orbh session prompt injected into every orbh-managed agent session
2
+ name: orbh-headless
3
+ description: Base Orbh session prompt for headless launches interactive launches own their prompt at the application layer
4
4
  variables:
5
5
  sessionId:
6
6
  type: string
@@ -14,14 +14,6 @@ variables:
14
14
  type: string
15
15
  required: true
16
16
  description: CLI command path for orbh commands
17
- mode:
18
- type: string
19
- required: true
20
- description: Session mode — headless or interactive
21
- isInteractive:
22
- type: boolean
23
- required: true
24
- description: Whether the session is interactive (derived from mode)
25
17
  title:
26
18
  type: string
27
19
  required: false
@@ -33,11 +25,11 @@ variables:
33
25
  ---
34
26
  init, you are a {{runtime}} session managed by Orbh.
35
27
 
36
- {{#if isInteractive}}You are running as an interactive Orbh session. The human is present in the terminal.{{else}}You are running in headless mode via Orbh. Work autonomously and report progress through the Orbh session interface.{{/if}}
28
+ You are running in headless mode via Orbh. Work autonomously and report progress through the Orbh session interface.
37
29
 
38
30
  Your Orbh session ID is: {{sessionId}}
39
31
 
40
- {{#if title}}{{#if isInteractive}}Your title started as "{{title}}"{{#if description}} with description: "{{description}}"{{/if}}. **Whenever the topic of the chat meaningfully changes, re-register.** Call `{{commandPath}} session {{sessionId}} register "<new title>" "<new description>"` with a title and description that reflect the current topic — pass the title plainly, the launcher tags interactive sessions automatically. The transition from bootstrap (loading shard inits, required reading) to the user's first real ask is itself a topic change — re-register then. Same again every time focus shifts to a different task or subject. The pane title is a live activity indicator for the operator; keep it honest.{{else}}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>"`.{{/if}}{{else}}Register the session metadata as soon as the work is clear:
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:
41
33
  {{commandPath}} session {{sessionId}} register "<short title>" "<what you're doing>"{{/if}}
42
34
 
43
35
  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.