@atlasharness/atlascode 0.1.0 → 0.1.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/cli.js +30 -7
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -70195,8 +70195,32 @@ var init_autoMode2 = __esm(() => {
|
|
|
70195
70195
|
});
|
|
70196
70196
|
|
|
70197
70197
|
// src/cli/parse.ts
|
|
70198
|
-
import { readFileSync as readFileSync10 } from "fs";
|
|
70199
|
-
import { resolve as resolve12 } from "path";
|
|
70198
|
+
import { existsSync as existsSync5, readFileSync as readFileSync10, realpathSync as realpathSync4 } from "fs";
|
|
70199
|
+
import { dirname as dirname16, join as join32, resolve as resolve12 } from "path";
|
|
70200
|
+
function resolveCliVersion(startDir) {
|
|
70201
|
+
let dir;
|
|
70202
|
+
try {
|
|
70203
|
+
dir = startDir ?? dirname16(realpathSync4(process.argv[1] ?? ""));
|
|
70204
|
+
} catch {
|
|
70205
|
+
return "0.0.0";
|
|
70206
|
+
}
|
|
70207
|
+
if (!existsSync5(dir))
|
|
70208
|
+
return "0.0.0";
|
|
70209
|
+
for (let d = dir;; d = dirname16(d)) {
|
|
70210
|
+
const pkgPath = join32(d, "package.json");
|
|
70211
|
+
if (existsSync5(pkgPath)) {
|
|
70212
|
+
try {
|
|
70213
|
+
const pkg = JSON.parse(readFileSync10(pkgPath, "utf8"));
|
|
70214
|
+
if (typeof pkg.version === "string" && pkg.version.length > 0) {
|
|
70215
|
+
return pkg.version;
|
|
70216
|
+
}
|
|
70217
|
+
} catch {}
|
|
70218
|
+
}
|
|
70219
|
+
if (d === dirname16(d))
|
|
70220
|
+
break;
|
|
70221
|
+
}
|
|
70222
|
+
return "0.0.0";
|
|
70223
|
+
}
|
|
70200
70224
|
function createSortedHelpConfig() {
|
|
70201
70225
|
const getOptionSortKey = (opt) => opt.long?.replace(/^--/, "") ?? opt.short?.replace(/^-/, "") ?? "";
|
|
70202
70226
|
return Object.assign({
|
|
@@ -70368,7 +70392,7 @@ function buildProgram() {
|
|
|
70368
70392
|
throw new InvalidArgumentError(`It must be one of: ${allowed.join(", ")}`);
|
|
70369
70393
|
}
|
|
70370
70394
|
return value;
|
|
70371
|
-
})).option("--agent <agent>", "Agent for the current session. Overrides the 'agent' setting.").option("--betas <betas...>", "Beta headers to include in API requests (API key users only)").option("--fallback-model <model>", "Enable automatic fallback to specified model when default model is overloaded (only works with --print)").addOption(new Option("--workload <tag>", "Workload tag for billing-header attribution (cc_workload). Process-scoped; set by SDK daemon callers that spawn subprocesses for cron work. (only works with --print)").hideHelp()).option("--settings <file-or-json>", "Path to a settings JSON file or a JSON string to load additional settings from").option("--add-dir <directories...>", "Additional directories to allow tool access to").option("--ide", "Automatically connect to IDE on startup if exactly one valid IDE is available", () => true).option("--strict-mcp-config", "Only use MCP servers from --mcp-config, ignoring all other MCP configurations", () => true).option("--session-id <uuid>", "Use a specific session ID for the conversation (must be a valid UUID)").option("-n, --name <name>", "Set a display name for this session (shown in /resume and terminal title)").option("--agents <json>", `JSON object defining custom agents (e.g. '{"reviewer": {"description": "Reviews code", "prompt": "You are a code reviewer"}}')`).option("--setting-sources <sources>", "Comma-separated list of setting sources to load (user, project, local).").option("--plugin-dir <path>", "Load plugins from a directory for this session only (repeatable: --plugin-dir A --plugin-dir B)", (val, prev) => [...prev, val], []).option("--disable-slash-commands", "Disable all skills", () => true).option("--chrome", "Enable AtlasCode in Chrome integration").option("--no-chrome", "Disable AtlasCode in Chrome integration").option("--file <specs...>", "File resources to download at startup. Format: file_id:relative_path (e.g., --file file_abc:doc.txt file_def:img.png)").action(mainActionSeam).version(`${
|
|
70395
|
+
})).option("--agent <agent>", "Agent for the current session. Overrides the 'agent' setting.").option("--betas <betas...>", "Beta headers to include in API requests (API key users only)").option("--fallback-model <model>", "Enable automatic fallback to specified model when default model is overloaded (only works with --print)").addOption(new Option("--workload <tag>", "Workload tag for billing-header attribution (cc_workload). Process-scoped; set by SDK daemon callers that spawn subprocesses for cron work. (only works with --print)").hideHelp()).option("--settings <file-or-json>", "Path to a settings JSON file or a JSON string to load additional settings from").option("--add-dir <directories...>", "Additional directories to allow tool access to").option("--ide", "Automatically connect to IDE on startup if exactly one valid IDE is available", () => true).option("--strict-mcp-config", "Only use MCP servers from --mcp-config, ignoring all other MCP configurations", () => true).option("--session-id <uuid>", "Use a specific session ID for the conversation (must be a valid UUID)").option("-n, --name <name>", "Set a display name for this session (shown in /resume and terminal title)").option("--agents <json>", `JSON object defining custom agents (e.g. '{"reviewer": {"description": "Reviews code", "prompt": "You are a code reviewer"}}')`).option("--setting-sources <sources>", "Comma-separated list of setting sources to load (user, project, local).").option("--plugin-dir <path>", "Load plugins from a directory for this session only (repeatable: --plugin-dir A --plugin-dir B)", (val, prev) => [...prev, val], []).option("--disable-slash-commands", "Disable all skills", () => true).option("--chrome", "Enable AtlasCode in Chrome integration").option("--no-chrome", "Disable AtlasCode in Chrome integration").option("--file <specs...>", "File resources to download at startup. Format: file_id:relative_path (e.g., --file file_abc:doc.txt file_def:img.png)").action(mainActionSeam).version(`${resolveCliVersion()} (AtlasCode)`, "-v, --version", "Output the version number");
|
|
70372
70396
|
program.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
70373
70397
|
program.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
70374
70398
|
if (feature("TRANSCRIPT_CLASSIFIER")) {
|
|
@@ -70462,7 +70486,6 @@ async function runCli() {
|
|
|
70462
70486
|
await program.parseAsync(process.argv);
|
|
70463
70487
|
return program;
|
|
70464
70488
|
}
|
|
70465
|
-
var CLI_VERSION = "0.0.0";
|
|
70466
70489
|
var init_parse4 = __esm(() => {
|
|
70467
70490
|
init_extra_typings();
|
|
70468
70491
|
init_bootstrap();
|
|
@@ -70742,10 +70765,10 @@ function createInMemorySandboxDeps() {
|
|
|
70742
70765
|
init_engine();
|
|
70743
70766
|
init_shared();
|
|
70744
70767
|
import { mkdir as mkdir9, readFile as readFile11, writeFile as writeFile6 } from "fs/promises";
|
|
70745
|
-
import { dirname as
|
|
70768
|
+
import { dirname as dirname17, join as join33 } from "path";
|
|
70746
70769
|
function sessionMemoryPath() {
|
|
70747
70770
|
const env = getSessionEnv();
|
|
70748
|
-
return
|
|
70771
|
+
return join33(getProjectDir(env.getOriginalCwd()), env.getSessionId(), "session-memory", "summary.md");
|
|
70749
70772
|
}
|
|
70750
70773
|
function createSessionMemoryPort() {
|
|
70751
70774
|
return {
|
|
@@ -70759,7 +70782,7 @@ function createSessionMemoryPort() {
|
|
|
70759
70782
|
}
|
|
70760
70783
|
},
|
|
70761
70784
|
async save(content) {
|
|
70762
|
-
const dir =
|
|
70785
|
+
const dir = dirname17(sessionMemoryPath());
|
|
70763
70786
|
await mkdir9(dir, { mode: 448, recursive: true });
|
|
70764
70787
|
await writeFile6(sessionMemoryPath(), content, {
|
|
70765
70788
|
encoding: "utf-8",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlasharness/atlascode",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "AtlasCode
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "AtlasCode \u2014 Coding Agent for the domestic computing ecosystem (Ascend NPU + domestic LLM backends)",
|
|
5
5
|
"bin": {
|
|
6
6
|
"atlas": "dist/cli.js"
|
|
7
7
|
},
|