archondev 2.19.12 → 2.19.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.
Files changed (2) hide show
  1. package/dist/index.js +52 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -116,6 +116,43 @@ import { Command as Command3 } from "commander";
116
116
  import chalk18 from "chalk";
117
117
  import "dotenv/config";
118
118
 
119
+ // src/cli/terminal-compat.ts
120
+ var SAFE_MODE_FLAG = "__ARCHON_TERMINAL_SAFE_MODE_ENABLED__";
121
+ function shouldEnableSafeMode() {
122
+ if (process.env["ARCHON_DISABLE_TERMINAL_SAFE_MODE"] === "1") {
123
+ return false;
124
+ }
125
+ return process.env["TERM_PROGRAM"] === "Apple_Terminal";
126
+ }
127
+ function toAsciiSafe(value) {
128
+ return value.replace(/[^\x09\x0A\x0D\x20-\x7E]/g, "");
129
+ }
130
+ function enableTerminalCompatibilityMode() {
131
+ if (!shouldEnableSafeMode()) {
132
+ return;
133
+ }
134
+ const globalObj = globalThis;
135
+ if (globalObj[SAFE_MODE_FLAG]) {
136
+ return;
137
+ }
138
+ globalObj[SAFE_MODE_FLAG] = true;
139
+ process.env["NO_COLOR"] = "1";
140
+ process.env["FORCE_COLOR"] = "0";
141
+ const methods = ["log", "info", "warn", "error"];
142
+ for (const method of methods) {
143
+ const original = console[method].bind(console);
144
+ console[method] = (...args) => {
145
+ const patched = args.map((arg) => {
146
+ if (typeof arg === "string") {
147
+ return toAsciiSafe(arg);
148
+ }
149
+ return arg;
150
+ });
151
+ original(...patched);
152
+ };
153
+ }
154
+ }
155
+
119
156
  // src/cli/promote.ts
120
157
  import chalk from "chalk";
121
158
  import { existsSync } from "fs";
@@ -3947,12 +3984,25 @@ async function handleContinueSession(cwd, state) {
3947
3984
  if (response.trim()) {
3948
3985
  const handled = await handleFreeformJourneyInput(cwd, response);
3949
3986
  if (handled) {
3950
- await showMainMenu();
3987
+ await continueConversationLoop(cwd);
3951
3988
  return;
3952
3989
  }
3953
3990
  }
3954
3991
  await showMainMenu();
3955
3992
  }
3993
+ async function continueConversationLoop(cwd) {
3994
+ while (true) {
3995
+ const response = await promptWithCommands("Anything else? (press Enter for options)", { allowMultiline: true });
3996
+ if (!response.trim()) {
3997
+ await showMainMenu();
3998
+ return;
3999
+ }
4000
+ const handled = await handleFreeformJourneyInput(cwd, response);
4001
+ if (!handled) {
4002
+ console.log(chalk6.yellow("I did not catch that. Try describing your goal in one sentence."));
4003
+ }
4004
+ }
4005
+ }
3956
4006
  function checkForHandoff(cwd) {
3957
4007
  try {
3958
4008
  const currentContextPath = join6(cwd, ".archon", "current_context.md");
@@ -8642,6 +8692,7 @@ function createGovernanceCommand() {
8642
8692
 
8643
8693
  // src/cli/index.ts
8644
8694
  var program = new Command3();
8695
+ enableTerminalCompatibilityMode();
8645
8696
  program.name("archon").description("Local-first AI-powered development governance").version(getCurrentVersion()).action(async () => {
8646
8697
  const cwd = process.cwd();
8647
8698
  const wasInitialized = isInitialized(cwd);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archondev",
3
- "version": "2.19.12",
3
+ "version": "2.19.14",
4
4
  "description": "Local-first AI-powered development governance system",
5
5
  "main": "dist/index.js",
6
6
  "bin": {