@rness/cli 0.20.0 → 0.20.1
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/dist/index.js
CHANGED
package/mod/hooks/register.tsx
CHANGED
|
@@ -79,7 +79,7 @@ const openNow = async ($: EngineInterface) =>
|
|
|
79
79
|
(await $.state.get(OPEN)).value ?? null
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* Reads the snapshot from the pinned CLI and keeps it; the
|
|
82
|
+
* Reads the snapshot from the pinned CLI and keeps it; the footer's label
|
|
83
83
|
* follows, and so does the document open in the pane, read again. No
|
|
84
84
|
* pinned copy, or a run that fails: no snapshot, nothing drawn.
|
|
85
85
|
*/
|
|
@@ -89,9 +89,13 @@ async function refresh($: EngineInterface): Promise<RnessSnapshot | null> {
|
|
|
89
89
|
const project = projectOf($.plugin.root)
|
|
90
90
|
const bin = `${project}/${RNESS}/${BIN}`
|
|
91
91
|
if (await $.fs.exists(bin)) {
|
|
92
|
+
// `RNESS_NO_DELEGATE`: a pin that drifts is reported (a note, in the
|
|
93
|
+
// band), never installed from inside the session, as the settings
|
|
94
|
+
// hooks have it (spec 0015 §3). `status` is not among the commands
|
|
95
|
+
// catch-up spares, and its install would replace a local copy.
|
|
92
96
|
const ran = await $.process.run(
|
|
93
97
|
['node', bin, 'status', '--json', '--cwd', project],
|
|
94
|
-
{ cwd: project, timeoutMs: 20_000 }
|
|
98
|
+
{ cwd: project, timeoutMs: 20_000, env: { RNESS_NO_DELEGATE: '1' } }
|
|
95
99
|
)
|
|
96
100
|
if (ran.exitCode === 0) next = JSON.parse(ran.stdout) as RnessSnapshot
|
|
97
101
|
}
|
|
@@ -99,7 +103,6 @@ async function refresh($: EngineInterface): Promise<RnessSnapshot | null> {
|
|
|
99
103
|
next = null
|
|
100
104
|
}
|
|
101
105
|
await update($, snapshot, () => next)
|
|
102
|
-
$.ui.status(next?.statusLine)
|
|
103
106
|
const opened = await openNow($)
|
|
104
107
|
if (opened !== null) await show($, opened.path)
|
|
105
108
|
return next
|
|
@@ -252,6 +255,20 @@ export const register: Register = (on) => {
|
|
|
252
255
|
)
|
|
253
256
|
})
|
|
254
257
|
|
|
258
|
+
// The workspace's label among the session modes at the right of the
|
|
259
|
+
// prompt footer (plan 0044): `rness · <scope> · <n> in progress`, worded
|
|
260
|
+
// by the CLI, after the engine's own (`focus`). A mode is dim and carries
|
|
261
|
+
// no sign; `$.ui.status` would draw it as a warning. No snapshot: the
|
|
262
|
+
// footer as the engine has it.
|
|
263
|
+
on('ui.render', { component: 'SessionMode' }, async ($, e, next) => {
|
|
264
|
+
const shown = await read($, snapshot)
|
|
265
|
+
if (shown === null) return next(e)
|
|
266
|
+
return next({
|
|
267
|
+
...e,
|
|
268
|
+
props: { modes: [...e.props.modes, shown.statusLine] },
|
|
269
|
+
})
|
|
270
|
+
})
|
|
271
|
+
|
|
255
272
|
// `/rness:status` is the skill's name: answered here with the pane, it
|
|
256
273
|
// runs no model turn; with no snapshot, or no one to see a pane, the
|
|
257
274
|
// skill's tables answer it.
|
package/package.json
CHANGED