@hyperez/regna-code 0.1.7 → 0.1.8
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/postinstall.mjs +12 -0
- package/package.json +1 -1
package/dist/postinstall.mjs
CHANGED
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
* entry from the built-in slash-command menu and neutralize its handler so /quit no longer
|
|
16
16
|
* triggers shutdown (Ctrl+C/Ctrl+D still exit).
|
|
17
17
|
*
|
|
18
|
+
* 3) Resume hint. On exit the engine prints "To resume this session: <prog> --session <id>"
|
|
19
|
+
* where <prog> is APP_NAME ("pi"). We rewrite that one program token to "regna" so the
|
|
20
|
+
* printed command actually works as typed. The session dir is the isolated Regna one, so
|
|
21
|
+
* `regna --session <id>` resumes correctly with no extra flags.
|
|
22
|
+
*
|
|
18
23
|
* Best effort: every patch is wrapped so a failure (e.g. the engine changed its layout) just
|
|
19
24
|
* leaves that aspect at the engine default and never fails the install. All patches are
|
|
20
25
|
* idempotent and safe to run on every install.
|
|
@@ -76,3 +81,10 @@ patchEngineFile(
|
|
|
76
81
|
/if\s*\(\s*text\s*===\s*"\/quit"\s*\)/,
|
|
77
82
|
'if (text === "/__regna_quit_removed__")',
|
|
78
83
|
);
|
|
84
|
+
|
|
85
|
+
// 3) Resume hint program name: "<pi> --session <id>" -> "regna --session <id>".
|
|
86
|
+
patchEngineFile(
|
|
87
|
+
join("dist", "modes", "interactive", "interactive-mode.js"),
|
|
88
|
+
/const args = \[APP_NAME\];/,
|
|
89
|
+
'const args = ["regna"];',
|
|
90
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperez/regna-code",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Regna Code. A terminal coding agent on Regna. Install with `npm i -g @hyperez/regna-code` and run `regna`. Works with the Regna cloud API and on-premise deployments.",
|
|
5
5
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
6
6
|
"private": false,
|