@atlaswork/atlascode 0.0.0-stage → 0.1.124

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 (63) hide show
  1. package/README.md +124 -2
  2. package/dist/cli.js +506227 -0
  3. package/dist/web-contract/index.d.ts +727 -0
  4. package/dist/web-contract/index.js +260 -0
  5. package/dist/web-session-runtime/atlascode/web/contract.d.ts +10 -0
  6. package/dist/web-session-runtime/atlascode/web/cursorLedger.d.ts +63 -0
  7. package/dist/web-session-runtime/atlascode/web/entry.d.ts +19 -0
  8. package/dist/web-session-runtime/atlascode/web/errors.d.ts +16 -0
  9. package/dist/web-session-runtime/atlascode/web/follow.d.ts +82 -0
  10. package/dist/web-session-runtime/atlascode/web/limits.d.ts +58 -0
  11. package/dist/web-session-runtime/atlascode/web/projection.d.ts +69 -0
  12. package/dist/web-session-runtime/atlascode/web/readonlyRuntime.d.ts +156 -0
  13. package/dist/web-session-runtime/atlascode/web/runtimeDefault.d.ts +26 -0
  14. package/dist/web-session-runtime/atlascode/web/sessionStoreAdapter.d.ts +58 -0
  15. package/dist/web-session-runtime/engine/session/env.d.ts +32 -0
  16. package/dist/web-session-runtime/engine/session/firstPrompt.d.ts +21 -0
  17. package/dist/web-session-runtime/engine/session/json.d.ts +27 -0
  18. package/dist/web-session-runtime/engine/session/load.d.ts +88 -0
  19. package/dist/web-session-runtime/engine/session/paths.d.ts +25 -0
  20. package/dist/web-session-runtime/engine/session/predicates.d.ts +55 -0
  21. package/dist/web-session-runtime/engine/session/readonly.d.ts +29 -0
  22. package/dist/web-session-runtime/engine/session/scanner.d.ts +26 -0
  23. package/dist/web-session-runtime/engine/session/search.d.ts +44 -0
  24. package/dist/web-session-runtime/engine/session/types.d.ts +379 -0
  25. package/dist/web-session-runtime/index.d.ts +1 -0
  26. package/dist/web-session-runtime/index.js +2534 -0
  27. package/dist/web-session-runtime/kernel/protocol/webSessionV0.d.ts +727 -0
  28. package/dist/web-session-runtime/shared/ProductDefinition.d.ts +47 -0
  29. package/dist/web-session-runtime/shared/agentRoleTemplates.d.ts +44 -0
  30. package/dist/web-session-runtime/shared/agentSwarmsEnabled.d.ts +5 -0
  31. package/dist/web-session-runtime/shared/boundedImageRead.d.ts +31 -0
  32. package/dist/web-session-runtime/shared/circular-buffer.d.ts +42 -0
  33. package/dist/web-session-runtime/shared/configDir.d.ts +57 -0
  34. package/dist/web-session-runtime/shared/constants.d.ts +19 -0
  35. package/dist/web-session-runtime/shared/debug.d.ts +32 -0
  36. package/dist/web-session-runtime/shared/env.d.ts +38 -0
  37. package/dist/web-session-runtime/shared/errors.d.ts +56 -0
  38. package/dist/web-session-runtime/shared/feature.d.ts +25 -0
  39. package/dist/web-session-runtime/shared/format.d.ts +11 -0
  40. package/dist/web-session-runtime/shared/fs-operations.d.ts +116 -0
  41. package/dist/web-session-runtime/shared/hash.d.ts +13 -0
  42. package/dist/web-session-runtime/shared/identity.d.ts +23 -0
  43. package/dist/web-session-runtime/shared/index.d.ts +46 -0
  44. package/dist/web-session-runtime/shared/lazySchema.d.ts +12 -0
  45. package/dist/web-session-runtime/shared/log.d.ts +1 -0
  46. package/dist/web-session-runtime/shared/path.d.ts +22 -0
  47. package/dist/web-session-runtime/shared/pdfPageImages.d.ts +19 -0
  48. package/dist/web-session-runtime/shared/pdfReference.d.ts +70 -0
  49. package/dist/web-session-runtime/shared/permissionDeadline.d.ts +24 -0
  50. package/dist/web-session-runtime/shared/platform.d.ts +8 -0
  51. package/dist/web-session-runtime/shared/stringUtils.d.ts +110 -0
  52. package/dist/web-session-runtime/shared/swarmSchemaFilter.d.ts +23 -0
  53. package/dist/web-session-runtime/shared/teamFileSchema.d.ts +151 -0
  54. package/dist/web-session-runtime/shared/teamInboxSchema.d.ts +112 -0
  55. package/dist/web-session-runtime/shared/teammateContext.d.ts +89 -0
  56. package/dist/web-session-runtime/shared/tempDir.d.ts +1 -0
  57. package/dist/web-session-runtime/shared/textEncoding.d.ts +41 -0
  58. package/dist/web-session-runtime/shared/tokenEstimation.d.ts +36 -0
  59. package/dist/web-session-runtime/shared/types-session.d.ts +266 -0
  60. package/dist/web-session-runtime/shared/types.d.ts +190 -0
  61. package/dist/web-session-runtime/shared/unc.d.ts +5 -0
  62. package/dist/web-session-runtime/shared/windowsPaths.d.ts +24 -0
  63. package/package.json +116 -4
package/README.md CHANGED
@@ -1,3 +1,125 @@
1
- # Temporary Holding Version
1
+ # AtlasCode
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 面向国产计算生态的通用 Coding Agent(CLI + TUI)。基座 = 完整 AI 辅助编程能力
4
+ (代码生成 / 重构 / 调试 / 测试 / 多智能体编排),差异化 = 国产 LLM 后端深度支持
5
+ (OpenAI-protocol 静态键车道,任意 OpenAI-compatible 端点)与国产平台工具链预留
6
+ (Ascend NPU 域包为可插拔叠加层,W6 起接入)。
7
+
8
+ > 项目主页:<https://www.atlaswork.cn/>(Atlas 全栈 AI 工作站)
9
+
10
+ > 版本现状:v0.1.x 持续发布(npm `@atlasharness/atlascode` live,P-1 远端仓已解除,
11
+ > 见 `docs/roadmap-domestic-and-residuals.md`)。
12
+
13
+ ## 安装
14
+
15
+ 两种通道,装好后得双命令:`atlascode`(正名,与包名 / 品牌全名一致)/ `atlas`
16
+ (别名,更短)——二者同起 TUI,行为等价(O-3,0.1.34):
17
+
18
+ **① npm 一行(推荐,仅需 [node](https://nodejs.org) ≥ 20,无需 bun/源码构建)**
19
+
20
+ ```bash
21
+ npm install -g @atlasharness/atlascode
22
+ atlascode --help # 别名 `atlas` 同效
23
+ ```
24
+
25
+ **Windows(PowerShell / cmd)**
26
+
27
+ ```powershell
28
+ # npm 通道(与 Unix 同款,仅需 Node ≥ 20)
29
+ npm install -g @atlasharness/atlascode
30
+ atlascode --help # 别名 `atlas` 同效
31
+ ```
32
+
33
+ > - 装完 `atlascode`/`atlas` 不识别 → 重开终端(或把 npm 全局 bin 目录加入 `PATH`)。
34
+ > - git 源码通道 `./install.sh` 为 Unix shell 脚本,Windows 不可直接用;Windows 走 npm 通道,
35
+ > 或手动 `git clone <repo-url>` + [bun](https://bun.sh)(`bun install && bun run build`)。
36
+ > - 镜像 registry(如 npmmirror)超时/403 时切官方源:
37
+ > `npm install -g @atlasharness/atlascode --registry https://registry.npmjs.org`
38
+ > (Windows 多 OS 波 0.1.43 已验 npm 通道安装 + 启动链)。
39
+
40
+ **② git 源码**(Unix;前置:`git` + [bun](https://bun.sh)(构建)+ `node`(运行))
41
+
42
+ ```bash
43
+ ./install.sh [repo-url]
44
+ # 或 ATLAS_REPO=<url> ./install.sh
45
+ ```
46
+
47
+ 流程:`git clone → bun install → bun run build → 链接 ~/.atlas/bin/atlas`。
48
+ 可覆盖 env:`ATLAS_INSTALL_ROOT`(默认 `~/.atlas/atlascode`)/ `ATLAS_BIN_DIR`
49
+ (默认 `~/.atlas/bin`)/ `ATLAS_BIN_NAME`(默认 `atlas`)。
50
+
51
+ > git 通道缺省 REPO = 公开发布仓 `vincentlau2046/AtlasCode`(P-1 已解除);
52
+ > 本地开发可显式传参(本地仓路径或 `ATLAS_REPO`);npm 通道不依赖 git 远端,
53
+ > 发布后即可用。
54
+ > 装好后远端升级:git 通道跑 `atlas update`(= `git pull --ff-only` + `bun install`
55
+ > + build,原地重建符号链接即刻生效);npm 通道跑 `npm install -g
56
+ > @atlasharness/atlascode@latest`。本地 dev loop 见 `docs/dev-loop.md`。
57
+
58
+ ## 配置
59
+
60
+ 配置目录 `~/.atlas/`,主配置 `~/.atlas/settings.json`:
61
+
62
+ - **三角色模型池**(`premium` / `fast` / `small`):`modelRoles.<role>` =
63
+ `{ provider, model?, models?(池,水平回退序), baseURL?, apiKey? }`;
64
+ `defaultRole` 选主循环默认角色(缺省 `small`)。
65
+ - **Provider 表**:`providers.<name>` =
66
+ `{ baseURL, apiKey, api, models: [{ id, name?, contextWindow?, maxTokens? }],
67
+ defaultContextWindow?, defaultMaxTokens? }`;模型引用 `"<provider>/<modelId>"`。
68
+ > ℹ️ 池内裸 id(如 `"Qwen38-27B-TXT"` 不带 `provider/` 前缀)会按 providers 表
69
+ > 归一化:命中某 provider 表项的 model id → 自动加 `provider/` 前缀;未知裸 id
70
+ > 原样透传、解析失败(issue #3-1,0.1.123 修形)。仍推荐写**全 ref 形**,语义
71
+ > 显式且不受表项变动影响。
72
+ > ⚠️ `baseURL` 按**原样**使用:OpenAI 兼容网关通常要求 `/v1` 后缀——裸 host
73
+ > `http://host:8999` 会 404,须写 `http://host:8999/v1`(issue #3-2)。
74
+ - **鉴权**(OpenAI-protocol 静态键,优先级 env > settings 角色级 > settings 全局):
75
+ 全局 `OPENAI_AUTH_TOKEN` / `OPENAI_API_KEY`;per-role
76
+ `ATLAS_<ROLE>_MODEL` / `_PROVIDER` / `_BASE_URL` / `_API_KEY`
77
+ (`<ROLE>` ∈ `PREMIUM` / `FAST` / `SMALL`)。
78
+ > ⚠️ settings **先经链**(issue #3-3):settings.json 一旦命中任何 provider 条目,
79
+ > `OPENAI_BASE_URL` 等 env 即被忽略(即使该条目未覆盖当前角色);env 仅在
80
+ > 字段缺省时生效。headless 排障时 env 不生效先查 settings.json 是否命中。
81
+
82
+ 示例(IFF 网关,本机 IFF 侧配置):
83
+
84
+ ```json
85
+ {
86
+ "defaultRole": "small",
87
+ "providers": {
88
+ "iff": {
89
+ "baseURL": "http://127.0.0.1:8999/v1",
90
+ "apiKey": "<your-key>",
91
+ "api": "openai-completions",
92
+ "models": [{ "id": "Qwen38-27B-TXT" }]
93
+ }
94
+ },
95
+ "modelRoles": {
96
+ "small": { "provider": "iff", "models": ["iff/Qwen38-27B-TXT"] },
97
+ "fast": { "provider": "iff", "models": ["iff/Qwen38-27B-TXT"] },
98
+ "premium": { "provider": "iff", "models": ["iff/Qwen38-27B-TXT"] }
99
+ }
100
+ }
101
+ ```
102
+
103
+ ## 使用
104
+
105
+ ```bash
106
+ atlas # 交互式 TUI(Ink)
107
+ atlas --help # 全量选项
108
+ echo "hi" | atlas -p --output-format stream-json --allowedTools "Read"
109
+ atlas update # 远端升级(装好车道后)
110
+ ```
111
+
112
+ headless 提示词经 stdin(或置于可变选项之前);`--allowedTools` / `--tools` /
113
+ `--disallowedTools` / `--mcp-config` 为可变选项,会吞掉尾随位置参数——
114
+ prompt 放前面。G-α 冒烟清单见 `docs/smoke-checklist.md`。
115
+
116
+ ## 仓库布局
117
+
118
+ - `src/` 八域 + `engine` + 壳:`shared`(叶子)/ `sandbox` / `memory` /
119
+ `executor` / `modelprovider` / `task` / `bootstrap` / `permissions` /
120
+ `hooks` 八域(port 解耦,只依赖 shared)+ `engine`(agent loop + 工具本体)
121
+ + `cli`(公共域)/ `tui`(React+Ink 壳)/ `atlascode`(组合根壳)+
122
+ `swarm` / `lsp` / `remote` / `mcp` / `ascend`(域包,未挂载)。
123
+ - `docs/execution-strategy.md` = 实施裁定记录(§8.x,临场裁回设计记录);
124
+ `docs/roadmap-domestic-and-residuals.md` = 发布路线(W1–W5 + W-opt,
125
+ G-α/G-β 门禁)。