@standardagents/code 0.11.9 → 0.12.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 +30 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6491,7 +6491,7 @@ function readVersion() {
|
|
|
6491
6491
|
if (typeof pkg.version === "string" && pkg.version) return pkg.version;
|
|
6492
6492
|
} catch {
|
|
6493
6493
|
}
|
|
6494
|
-
return "0.
|
|
6494
|
+
return "0.12.1" ;
|
|
6495
6495
|
}
|
|
6496
6496
|
function isLocalHost(host) {
|
|
6497
6497
|
return host === "localhost" || host === "127.0.0.1" || host === "::1" || host.endsWith(".local") || host.endsWith(".localhost") || /^10\./.test(host) || /^192\.168\./.test(host) || /^172\.(1[6-9]|2\d|3[01])\./.test(host);
|
|
@@ -7349,7 +7349,7 @@ var REGISTRY_URL = `https://registry.npmjs.org/${encodeURIComponent(PKG_NAME)}`;
|
|
|
7349
7349
|
var CACHE_REL_DIR = ".config/standardagents-cli";
|
|
7350
7350
|
var CACHE_FILE = "update-check.json";
|
|
7351
7351
|
var STATE_FILE = "auto-update.json";
|
|
7352
|
-
var CACHE_TTL_MS = 1e3 * 60 * 60 *
|
|
7352
|
+
var CACHE_TTL_MS = 1e3 * 60 * 60 * 3;
|
|
7353
7353
|
var CHECK_TIMEOUT_MS = 4e3;
|
|
7354
7354
|
var IN_FLIGHT_TTL_MS = 15 * 60 * 1e3;
|
|
7355
7355
|
function cacheDir() {
|
|
@@ -8532,6 +8532,9 @@ function printUsage() {
|
|
|
8532
8532
|
"",
|
|
8533
8533
|
`${c5.bold}Usage${c5.reset}`,
|
|
8534
8534
|
" standardcode [options] [dir]",
|
|
8535
|
+
" With a directory argument (e.g. `standardcode ./`),",
|
|
8536
|
+
" the session starts right there on this machine \u2014",
|
|
8537
|
+
" no machine or project questions.",
|
|
8535
8538
|
" standardcode login [--endpoint <url>] [--token <key>]",
|
|
8536
8539
|
" Sign in (or switch accounts \u2014 always re-runs the flow).",
|
|
8537
8540
|
" standardcode logout [--endpoint <url>]",
|
|
@@ -8746,6 +8749,7 @@ async function main() {
|
|
|
8746
8749
|
const endpointArg = cliArgs.endpoint;
|
|
8747
8750
|
const endpointOverride = cliArgs.promptEndpoint || typeof endpointArg === "string" && endpointArg.trim() !== "";
|
|
8748
8751
|
const dirArg = cliArgs.dir;
|
|
8752
|
+
const dirArgProvided = Boolean(dirArg && dirArg.trim() !== "");
|
|
8749
8753
|
let projectDir = path4.resolve(dirArg || process.cwd());
|
|
8750
8754
|
const machine = os8.hostname();
|
|
8751
8755
|
const reader = { rl: null };
|
|
@@ -9010,15 +9014,23 @@ ${c5.bold}This machine has no always-on daemon${c5.reset} ${c5.dim}\u2014 sessio
|
|
|
9010
9014
|
let existing = [];
|
|
9011
9015
|
let hadResumeMenu = false;
|
|
9012
9016
|
let where = null;
|
|
9013
|
-
|
|
9017
|
+
const locationFlow = !dirArgProvided && remoteTargets.length > 0;
|
|
9018
|
+
let step = locationFlow ? "machine" : "thread";
|
|
9019
|
+
let pickedHere = false;
|
|
9014
9020
|
flow: for (; ; ) {
|
|
9015
9021
|
if (step === "machine") {
|
|
9022
|
+
pickedHere = false;
|
|
9016
9023
|
const picked = await tui.select(
|
|
9017
9024
|
`${c5.bold}Where should this session run?${c5.reset} ${c5.dim}\u2191\u2193 \xB7 enter \xB7 esc${c5.reset}`,
|
|
9018
9025
|
[
|
|
9026
|
+
{
|
|
9027
|
+
label: `In this directory, on this machine`,
|
|
9028
|
+
detail: `${shortenPath(launchDir)} \xB7 tools run locally`,
|
|
9029
|
+
value: "here"
|
|
9030
|
+
},
|
|
9019
9031
|
{
|
|
9020
9032
|
label: `This machine \u2014 ${self ? machineDisplayName(self) : machine}`,
|
|
9021
|
-
detail: "tools run locally",
|
|
9033
|
+
detail: "tools run locally \xB7 choose a project",
|
|
9022
9034
|
value: null
|
|
9023
9035
|
},
|
|
9024
9036
|
...remoteTargets.map((m) => ({
|
|
@@ -9030,6 +9042,16 @@ ${c5.bold}This machine has no always-on daemon${c5.reset} ${c5.dim}\u2014 sessio
|
|
|
9030
9042
|
{ spaced: true }
|
|
9031
9043
|
);
|
|
9032
9044
|
if (picked === void 0) process.exit(0);
|
|
9045
|
+
if (picked === "here") {
|
|
9046
|
+
session.mode = "local";
|
|
9047
|
+
session.runner = void 0;
|
|
9048
|
+
session.remotePath = void 0;
|
|
9049
|
+
projectDir = launchDir;
|
|
9050
|
+
where = null;
|
|
9051
|
+
pickedHere = true;
|
|
9052
|
+
step = "thread";
|
|
9053
|
+
continue;
|
|
9054
|
+
}
|
|
9033
9055
|
where = picked;
|
|
9034
9056
|
step = "project";
|
|
9035
9057
|
} else if (step === "project") {
|
|
@@ -9102,8 +9124,8 @@ ${c5.bold}This machine has no always-on daemon${c5.reset} ${c5.dim}\u2014 sessio
|
|
|
9102
9124
|
items
|
|
9103
9125
|
);
|
|
9104
9126
|
if (picked === void 0) {
|
|
9105
|
-
if (
|
|
9106
|
-
step = "project";
|
|
9127
|
+
if (locationFlow) {
|
|
9128
|
+
step = pickedHere ? "machine" : "project";
|
|
9107
9129
|
continue;
|
|
9108
9130
|
}
|
|
9109
9131
|
process.exit(0);
|
|
@@ -9137,8 +9159,8 @@ ${c5.bold}This machine has no always-on daemon${c5.reset} ${c5.dim}\u2014 sessio
|
|
|
9137
9159
|
step = "thread";
|
|
9138
9160
|
continue;
|
|
9139
9161
|
}
|
|
9140
|
-
if (
|
|
9141
|
-
step = "project";
|
|
9162
|
+
if (locationFlow) {
|
|
9163
|
+
step = pickedHere ? "machine" : "project";
|
|
9142
9164
|
continue;
|
|
9143
9165
|
}
|
|
9144
9166
|
process.exit(0);
|