agentlas 1.0.28 → 1.0.35

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 (70) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/README.md +5 -2
  3. package/bin/agentlas.cjs +15 -0
  4. package/engine/agentlas-cloud-runtime.cjs +54 -4
  5. package/engine/agentlas-i18n.cjs +4 -4
  6. package/engine/agentlas-input.cjs +10 -3
  7. package/engine/agentlas-judgment.cjs +0 -0
  8. package/engine/agentlas-native-host.cjs +69 -4
  9. package/engine/agentlas-onboard.cjs +20 -0
  10. package/engine/agentlas-ui.cjs +2 -0
  11. package/engine/agentlas-workforce.cjs +69 -13
  12. package/engine/agentlas.cjs +71 -3
  13. package/engine/agents/builder.cjs +84 -0
  14. package/engine/agents/router.cjs +8 -2
  15. package/engine/automation/launchd.cjs +131 -0
  16. package/engine/bootstrap-schema.sql +6 -44
  17. package/engine/browser/cdp.cjs +188 -0
  18. package/engine/browser/vault.cjs +124 -0
  19. package/engine/cli-output.cjs +262 -0
  20. package/engine/cloud-assets/package.cjs +5 -1
  21. package/engine/commands/automation.cjs +37 -1
  22. package/engine/commands/billing.cjs +3 -0
  23. package/engine/commands/browser.cjs +166 -8
  24. package/engine/commands/build.cjs +101 -20
  25. package/engine/commands/connect.cjs +162 -9
  26. package/engine/commands/creds.cjs +65 -3
  27. package/engine/commands/doctor.cjs +66 -4
  28. package/engine/commands/document.cjs +79 -0
  29. package/engine/commands/graph.cjs +1190 -0
  30. package/engine/commands/help.cjs +87 -9
  31. package/engine/commands/hep-cloud.cjs +9 -23
  32. package/engine/commands/hep-hub.cjs +9 -22
  33. package/engine/commands/hep-local.cjs +9 -24
  34. package/engine/commands/hep-network.cjs +9 -35
  35. package/engine/commands/index.cjs +50 -25
  36. package/engine/commands/list.cjs +10 -1
  37. package/engine/commands/mcp.cjs +6 -2
  38. package/engine/commands/native.cjs +18 -2
  39. package/engine/commands/plugin.cjs +22 -0
  40. package/engine/commands/project.cjs +79 -16
  41. package/engine/commands/roles.cjs +210 -0
  42. package/engine/commands/telegram.cjs +23 -16
  43. package/engine/commands/workforce.cjs +63 -12
  44. package/engine/core/desktop-core-fetch.cjs +98 -0
  45. package/engine/core/desktop-core.cjs +170 -0
  46. package/engine/graph/ask-model.cjs +159 -0
  47. package/engine/graph/interview.cjs +960 -0
  48. package/engine/graph/layout.cjs +139 -0
  49. package/engine/graph/package.cjs +223 -0
  50. package/engine/graph/vocabulary.generated.cjs +30 -0
  51. package/engine/hephaestus/local-core.cjs +159 -0
  52. package/engine/hephaestus/runtime.cjs +14 -10
  53. package/engine/project/controller.cjs +8 -8
  54. package/engine/project/team.cjs +99 -0
  55. package/engine/runtime-refusal.cjs +71 -0
  56. package/engine/runtimes/auth-evidence.cjs +78 -0
  57. package/engine/runtimes/detect.cjs +3 -0
  58. package/engine/runtimes/resolve.cjs +1 -1
  59. package/engine/sessions/prompt.cjs +16 -0
  60. package/engine/sessions/session.cjs +24 -2
  61. package/engine/telegram/connect.cjs +202 -0
  62. package/engine/tools/access-notice.cjs +86 -0
  63. package/engine/ui/palette.cjs +7 -3
  64. package/engine/ui/repl.cjs +120 -3
  65. package/engine/vendor/desktop-core.manifest.json +7 -0
  66. package/engine/workforce/capture.cjs +51 -1
  67. package/engine/workforce/deps.cjs +13 -0
  68. package/engine/workforce/local-core-transport.cjs +298 -0
  69. package/package.json +4 -2
  70. package/engine/commands/legacy-network.cjs +0 -29
@@ -5,6 +5,7 @@ const HELP = `agentlas — the operating system for agents, in your terminal
5
5
 
6
6
  agentlas open the terminal (REPL)
7
7
  agentlas "<task>" run once with this project's controller
8
+ graph new "<what you want run for you>" build an automation by talking it through
8
9
 
9
10
  PROJECT WORK
10
11
  run [agent] [prompt] project-first one-shot; exact agent is an explicit advanced override
@@ -14,31 +15,35 @@ AGENTS & HUB
14
15
  search "<what you need>" discover agents in the Hub
15
16
  install <slug> install an agent from the Hub
16
17
  plugin add <slug> · plugin list Hub plugins (MCP servers)
17
- build "<request>" build/repair/package an agent or team
18
+ build "<request>" build an installable agent locally (auto-installs)
18
19
  upload <path> save owner-private in Agent Cloud (--visibility marketplace to publish)
19
20
  import <path> · cd · native prepare local folder agents
20
21
  list installed agents/companies + orchestrator/worker runtimes
22
+ roles [set <role> <rt>] show or set orchestrator/worker model roles
21
23
  experience <sub> portable Experience: list|inspect|validate|save|publish|status|export|unpublish
22
24
  variant resolve --base-release <id> local variant selection (variant help)
23
25
 
24
26
  EXECUTE
25
27
  storm <goal> Goal+UltraCode harness: plan → allocate → execute → verify [--research]
26
28
  swarm <goal> emergent agent swarm [--parallel N]
27
- workforce | network <request> Agent Workforce Ontology route
29
+ workforce | network <request> Agent Workforce Ontology route (public Hub menu)
30
+ hep-network "<request>" staff across Local + owner Cloud + public Hub (local Core federation)
28
31
  hep-local | hep-cloud | hep-hub "<request>" same, restricted to one source scope
29
- call "a,b" "<ctx>" · browser · route "<req>" [--json] · research <sub>
32
+ call "a,b" "<ctx>" · browser <url|status|sites|login> · route "<req>" [--json] · research <sub>
30
33
 
31
34
  KNOWLEDGE
32
35
  memory import · evolve memory & prompt-evolution proposals
33
36
  ontology · career-graph project knowledge & source routing
34
37
  journal <sub> Stormbreaker run journal
35
- project [status|init] private .agentlas project state (init is explicit)
38
+ project <sub> connect this folder + set an ordered team, standalone
39
+ (status · init · use <agent> · team <agent>…)
36
40
  context <sub> dependency map: refresh|locate|refs|slice|impact|verify
37
41
 
38
42
  ACCOUNT & OPS
39
43
  login | logout | whoami Agentlas Cloud sign-in (browser flow)
40
44
  cloud <sub> cloud assets: save|publish|package|list|restore|field-test
41
45
  automation <sub> list|add|on|off|remove|run <id>|runs|daemon
46
+ graph <sub> new "<what you want>"|list|show|run <name>|export|inspect|install
42
47
  creds <sub> · env credentials and shared env keys
43
48
  usage · telegram · mcp local usage · telegram bindings · MCP servers (mcp probe <id>)
44
49
  multimodal image/video/audio provider settings
@@ -48,8 +53,9 @@ ACCOUNT & OPS
48
53
  version · help
49
54
 
50
55
  IN-REPL (agentlas → interactive, Orca multi-session)
51
- /spawn <agent> [task] · /sessions · /tree · /s <n> · /steer <n> <msg> ·
52
- /kill <n> · /rm <n> · /broadcast <msg> · /runtime · /model · /effort · /permission
56
+ /sessions · /tree · /s <n> | /switch <n> · /kill <n> · /rm <n>
57
+ /runtime <kind> · /model <id> · /effort <level> · /permission <level> (applies to new sessions)
58
+ every command above also works as a slash command (/graph, /search, /automation, …) — /help lists them all
53
59
  typing during a running turn queues steering; ctrl-c interrupts the turn
54
60
 
55
61
  Options: -p|--print · --runtime claude-code|codex|gemini · --model <exact-id> ·
@@ -58,14 +64,86 @@ Options: -p|--print · --runtime claude-code|codex|gemini · --model <exact-id>
58
64
  --permission read|write|full
59
65
  `;
60
66
 
67
+ /*
68
+ * 한국어판 — 2026-08-05 감사 결함 F: ko 세션에서 /help 본문이 전부 영어였다.
69
+ * 명령 이름·플래그는 원문(입력 어휘) 유지, 설명만 국문. HELP(영문)와 줄 구조를
70
+ * 맞춰 둔다 — runForCommand는 두 판 모두에서 같은 규칙으로 행을 찾는다.
71
+ */
72
+ const HELP_KO = `agentlas — 터미널 속 에이전트 운영체제
73
+
74
+ agentlas 터미널(REPL) 열기
75
+ agentlas "<작업>" 이 프로젝트의 컨트롤러로 1회 실행
76
+ graph new "<대신 시킬 일>" 대화로 설명하면 자동화를 만들어 줍니다
77
+
78
+ PROJECT WORK
79
+ run [agent] [prompt] 프로젝트 우선 1회 실행; 특정 에이전트 지정은 명시적 고급 경로
80
+ firm <firm> [task] 회사 CEO에게 위임 (--runtime · --model · --effort)
81
+
82
+ AGENTS & HUB
83
+ search "<필요한 것>" Hub에서 에이전트 찾기
84
+ install <slug> Hub 에이전트 설치
85
+ plugin add <slug> · plugin list Hub 플러그인 (MCP 서버)
86
+ build "<요청>" 에이전트를 로컬에서 만들고 바로 설치
87
+ upload <path> Agent Cloud에 소유자 비공개 저장 (--visibility marketplace 로 발행)
88
+ import <path> · cd · native prepare 로컬 폴더 에이전트
89
+ list 설치 에이전트/회사 + 오케스트레이터·워커 런타임
90
+ roles [set <role> <rt>] 오케스트레이터·워커 모델 역할 조회/설정
91
+ experience <sub> 이동식 Experience: list|inspect|validate|save|publish|status|export|unpublish
92
+ variant resolve --base-release <id> 로컬 변형 선택 (variant help)
93
+
94
+ EXECUTE
95
+ storm <goal> Goal+UltraCode 하니스: 계획 → 배정 → 실행 → 검증 [--research]
96
+ swarm <goal> 창발형 에이전트 스웜 [--parallel N]
97
+ workforce | network <request> Agent Workforce Ontology 편성 (공개 Hub 메뉴)
98
+ hep-network "<request>" 로컬+오너 클라우드+공개 Hub 연합 편성 (로컬 Core 연합)
99
+ hep-local | hep-cloud | hep-hub "<request>" 같은 편성, 한 소스 스코프로 제한
100
+ call "a,b" "<ctx>" · browser <url|status|sites|login> · route "<req>" [--json] · research <sub>
101
+
102
+ KNOWLEDGE
103
+ memory import · evolve 메모리·프롬프트 진화 제안
104
+ ontology · career-graph 프로젝트 지식·소스 라우팅
105
+ journal <sub> Stormbreaker 런 저널
106
+ project <sub> 이 폴더를 프로젝트로 연결 + 순서 팀 편성 (독립)
107
+ (status · init · use <에이전트> · team <에이전트>…)
108
+ context <sub> 의존성 지도: refresh|locate|refs|slice|impact|verify
109
+
110
+ ACCOUNT & OPS
111
+ login | logout | whoami Agentlas Cloud 로그인 (브라우저 플로)
112
+ cloud <sub> 클라우드 자산: save|publish|package|list|restore|field-test
113
+ automation <sub> list|add|on|off|remove|run <id>|runs|daemon
114
+ graph <sub> new "<시킬 일>"|list|show|run <이름>|export|inspect|install
115
+ creds <sub> · env 자격증명·공유 env 키 (creds list 로 확인)
116
+ usage · telegram · mcp 로컬 사용량 · 텔레그램 연결 · MCP 서버 (mcp probe <id>)
117
+ multimodal 이미지/영상/음성 제공자 설정
118
+ doctor · setup · update 건강 점검 · 첫 실행 마법사 · npm 업데이트 확인
119
+ oberon | film <sub> AI 필름 렌더 (scaffold|render|list|open)
120
+ hep <sub…> · netadmin Hephaestus 패스스루 · 로컬 에이전트 네트워크
121
+ version · help
122
+
123
+ IN-REPL (agentlas → 대화형, Orca 다중 세션)
124
+ /sessions · /tree · /s <n> | /switch <n> · /kill <n> · /rm <n>
125
+ /runtime <kind> · /model <id> · /effort <level> · /permission <level> (새 세션부터 적용)
126
+ 위의 모든 명령은 슬래시 명령(/graph, /search, /automation, …)으로도 됩니다 — 전체 목록은 /help
127
+ 실행 중 입력하면 조종 큐에 쌓이고, ctrl-c 로 턴을 중단합니다
128
+
129
+ Options: -p|--print · --runtime claude-code|codex|gemini · --model <exact-id> ·
130
+ --effort none|minimal|low|medium|high|xhigh|max ·
131
+ --tier economy|balanced|frontier (--model 필요) ·
132
+ --permission read|write|full
133
+ `;
134
+
135
+ function helpText(ctx) {
136
+ return ctx && ctx.lang === "ko" ? HELP_KO : HELP;
137
+ }
138
+
61
139
  function run(ctx) {
62
- ctx.out(HELP.trimEnd());
140
+ ctx.out(helpText(ctx).trimEnd());
63
141
  return 0;
64
142
  }
65
143
 
66
144
  function runForCommand(ctx, command) {
67
145
  const name = String(command || "").trim();
68
- const rows = HELP.split("\n")
146
+ const rows = helpText(ctx).split("\n")
69
147
  .map((line) => line.trim())
70
148
  .filter((line) => line && !line.endsWith(":"))
71
149
  .filter((line) => {
@@ -83,4 +161,4 @@ function runForCommand(ctx, command) {
83
161
  return 0;
84
162
  }
85
163
 
86
- module.exports = { run, runForCommand, HELP };
164
+ module.exports = { run, runForCommand, HELP, HELP_KO };
@@ -1,31 +1,17 @@
1
1
  "use strict";
2
2
  /*
3
- * hep-cloud — 로그인한 오너의 Agent Cloud 에이전트만으로 임시 태스크포스 편성.
3
+ * hep-cloud — 소스 스코프(cloud) 편성, 터미널 네이티브 (2026-08-05 배선).
4
4
  *
5
- * WHY 파일이 따로 있는가 (2026-07-28 수리):
6
- * COMMAND_ALIASES `hep-cloud cloud` 접혀 있었다. `cloud` 이름만 같은
7
- * 전혀 다른 명령 클라우드 자산 보관함(save|publish|package|list|restore|
8
- * install|delete|field-test)이다. 그래서 `agentlas hep-cloud "<과제>"`
9
- * 과제를 서브커맨드로 읽고 `usage: agentlas cloud <save|…>` 뱉으며 exit 1 —
10
- * hep-cloud 를 한 글자도 언급하지 않는 에러라 사용자에게 다음 수가 없었다.
11
- * 스코프(오너 Cloud 한정)를 실제로 지키는 표면은 Hephaestus 네이티브 런타임
12
- * (`hephaestus hep-cloud`)뿐이므로 build/call/legacy-network 와 동일한
13
- * 패스스루 계약으로 그쪽에 넘긴다. 자산 보관함은 계속 `agentlas cloud …` 다.
14
- *
15
- * v1 인자 가드 그대로: help 토큰 → usage 0, 무인자 → usage 실패 exit 1.
5
+ * 이 이름은 번의 결함을 지나 여기 도착했다:
6
+ * 7/28 별칭이 스코프를 버려 엉뚱한 명령으로 접힘 외부 CLI 1급 승격
7
+ * 8/5 그 외부 CLI가 exit 3 스텁임이 드러남 → 삭제 → 자기 엔진에 재배선
8
+ * 실행 주체는 터미널의 편성 루프(리더 LLM이 WorkOrder 작성·정확 릴리스 선택),
9
+ * 메뉴 연합은 로컬 Agentlas-OS Core. 배선 상세는 commands/workforce.cjs 참조.
16
10
  */
17
- const { create, usageFor, isHelpToken } = require("../hephaestus/runtime.cjs");
11
+ const { dispatch } = require("./workforce.cjs");
18
12
 
19
- async function run(ctx, args) {
20
- if (args.some(isHelpToken)) {
21
- ctx.out(usageFor("hep-cloud", ctx.lang));
22
- return 0;
23
- }
24
- if (!args.length) {
25
- ctx.err("✖ " + usageFor("hep-cloud", ctx.lang));
26
- return 1;
27
- }
28
- return create(ctx).cmdHep(["hep-cloud", ...args]);
13
+ function run(ctx, args) {
14
+ return dispatch(ctx, "hep-cloud", args);
29
15
  }
30
16
 
31
17
  module.exports = { run };
@@ -1,30 +1,17 @@
1
1
  "use strict";
2
2
  /*
3
- * hep-hub — 공개 Agentlas Hub 에이전트만으로 임시 태스크포스 편성.
3
+ * hep-hub — 소스 스코프(hub) 편성, 터미널 네이티브 (2026-08-05 배선).
4
4
  *
5
- * WHY 파일이 따로 있는가 (2026-07-28 수리):
6
- * COMMAND_ALIASES `hep-hub search` 접혀 있었다. search 스태핑이 아니라
7
- * 마켓플레이스 디렉터리 나열이고(그마저 Cloud+Hub 혼합 표면이다), 실행은 하지
8
- * 않는다. 그래서 `agentlas hep-hub "<과제>"` 과제를 검색어로 읽고 슬러그
9
- * 목록만 찍은 exit 0 아무것도 실행하지 않고 성공한 척했다(가짜 성공 금지).
10
- * 공개 Hub 한정 스태핑을 실제로 수행하는 표면은 Hephaestus 네이티브 런타임
11
- * (`hephaestus hep-hub`)이므로 그쪽에 그대로 넘긴다. 후보만 보고 싶으면
12
- * 기존 `agentlas search`(=hep-search)가 그대로 남아 있다.
13
- *
14
- * v1 인자 가드 그대로: help 토큰 → usage 0, 무인자 → usage 실패 exit 1.
5
+ * 이 이름은 번의 결함을 지나 여기 도착했다:
6
+ * 7/28 별칭이 스코프를 버려 엉뚱한 명령으로 접힘 외부 CLI 1급 승격
7
+ * 8/5 그 외부 CLI가 exit 3 스텁임이 드러남 → 삭제 → 자기 엔진에 재배선
8
+ * 실행 주체는 터미널의 편성 루프(리더 LLM이 WorkOrder 작성·정확 릴리스 선택),
9
+ * 메뉴 연합은 로컬 Agentlas-OS Core. 배선 상세는 commands/workforce.cjs 참조.
15
10
  */
16
- const { create, usageFor, isHelpToken } = require("../hephaestus/runtime.cjs");
11
+ const { dispatch } = require("./workforce.cjs");
17
12
 
18
- async function run(ctx, args) {
19
- if (args.some(isHelpToken)) {
20
- ctx.out(usageFor("hep-hub", ctx.lang));
21
- return 0;
22
- }
23
- if (!args.length) {
24
- ctx.err("✖ " + usageFor("hep-hub", ctx.lang));
25
- return 1;
26
- }
27
- return create(ctx).cmdHep(["hep-hub", ...args]);
13
+ function run(ctx, args) {
14
+ return dispatch(ctx, "hep-hub", args);
28
15
  }
29
16
 
30
17
  module.exports = { run };
@@ -1,32 +1,17 @@
1
1
  "use strict";
2
2
  /*
3
- * hep-local — 머신에 등록된 Local 에이전트만으로 임시 태스크포스 편성.
3
+ * hep-local — 소스 스코프(local) 편성, 터미널 네이티브 (2026-08-05 배선).
4
4
  *
5
- * WHY 파일이 따로 있는가 (2026-07-28 수리):
6
- * COMMAND_ALIASES `hep-local workforce` 접혀 있었다. 터미널 workforce
7
- * 공개 Hub 메뉴로 스태핑하는 Agent Workforce Ontology 경로이고(엔드포인트:
8
- * AGENTLAS_MCP_BASE_URL, search_candidates 스키마에 sourceScope 자체가 없음),
9
- * cmdWorkforce 스코프 플래그를 받지 않는다. "등록된 로컬만" 이라고
10
- * 문서화된 명령이 조용히 Local+Cloud+공개 Hub 전체로 넓혀 실행됐다 —
11
- * 사용자가 의도하지 않은 Hub 크레딧 소모까지 포함해서. 스코프는 이름의 전부다.
12
- * 스코프를 지킬 수 있는 표면은 Hephaestus 네이티브 런타임(`hephaestus hep-local`)
13
- * 뿐이므로, build/call/legacy-network 와 동일한 패스스루 계약으로 그쪽에 넘긴다.
14
- *
15
- * v1 인자 가드 그대로: help 토큰 → usage 0, 무인자 → usage 실패 exit 1
16
- * (요청 문자열 없는 호출이 자연어 라우팅으로 새는 것 방지).
5
+ * 이 이름은 번의 결함을 지나 여기 도착했다:
6
+ * 7/28 별칭이 스코프를 버려 엉뚱한 명령으로 접힘 외부 CLI 1급 승격
7
+ * 8/5 그 외부 CLI가 exit 3 스텁임이 드러남 → 삭제 → 자기 엔진에 재배선
8
+ * 실행 주체는 터미널의 편성 루프(리더 LLM이 WorkOrder 작성·정확 릴리스 선택),
9
+ * 메뉴 연합은 로컬 Agentlas-OS Core. 배선 상세는 commands/workforce.cjs 참조.
17
10
  */
18
- const { create, usageFor, isHelpToken } = require("../hephaestus/runtime.cjs");
11
+ const { dispatch } = require("./workforce.cjs");
19
12
 
20
- async function run(ctx, args) {
21
- if (args.some(isHelpToken)) {
22
- ctx.out(usageFor("hep-local", ctx.lang));
23
- return 0;
24
- }
25
- if (!args.length) {
26
- ctx.err("✖ " + usageFor("hep-local", ctx.lang));
27
- return 1;
28
- }
29
- return create(ctx).cmdHep(["hep-local", ...args]);
13
+ function run(ctx, args) {
14
+ return dispatch(ctx, "hep-local", args);
30
15
  }
31
16
 
32
17
  module.exports = { run };
@@ -1,43 +1,17 @@
1
1
  "use strict";
2
2
  /*
3
- * hep-network — 등록된 Local + 오너 Cloud + 공개 Hub 를 연합해 임시 태스크포스 편성.
3
+ * hep-network — 소스 스코프(network) 편성, 터미널 네이티브 (2026-08-05 배선).
4
4
  *
5
- * WHY 파일이 따로 있는가 (2026-07-28 수리):
6
- * COMMAND_ALIASES `hep-networkworkforce` 접혀 있었다. hep-local/hep-cloud/
7
- * hep-hub 정확히 같은 결함이다 별칭은 이름만 바꿔주고 스코프는 어디에도
8
- * 전달하지 않는다. 터미널 workforce(cmdWorkforce)는 callHubTool
9
- * AGENTLAS_MCP_BASE_URL(기본 https://agentlas.cloud/api/mcp/v1)을 직접 치고
10
- * `{workOrder}` 만 보낸다(engine/agentlas-workforce.cjs:3043). 그 서버는
11
- * sourceScope 가 없으면 "hub" 로 기본값을 잡는다
12
- * (agentlas/AgentsAtlas/app/src/lib/mcp/workforce.ts:228). 결과:
13
- *
14
- * - 로컬 에이전트와 오너 Cloud 에이전트는 후보 집합에 들어간 적이 없다.
15
- * - 그런데 영수증의 로스터 핀은 전부 source:"hub" 로 기록된다
16
- * (engine/workforce/deps.cjs). "네트워크 전량을 봤다" 로 읽힌다.
17
- *
18
- * 연합(federation)은 Core 가 소유한다: 세 소스 메뉴를 각각 받아 출처·계보를
19
- * 증명하고 하나의 CandidateSet 으로 합친 뒤, 선택은 호스트 LLM 이 한다. 터미널이
20
- * Hub 를 직접 치는 경로에는 그 계층이 통째로 없다. 그래서 build/call/hep-local
21
- * 과 동일한 패스스루 계약으로 Hephaestus 네이티브 표면에 넘긴다.
22
- *
23
- * `agentlas workforce` 자체는 남겨둔다 — 공개 Hub 스태핑을 그 이름으로 명시해
24
- * 부르는 것은 정직한 사용이다. 이름이 소스 스코프를 약속하는 hep-* 만 옮긴다.
25
- *
26
- * v1 인자 가드 그대로: help 토큰 → usage 0, 무인자 → usage 실패 exit 1
27
- * (요청 문자열 없는 호출이 자연어 라우팅으로 새는 것 방지).
5
+ * 이 이름은 번의 결함을 지나 여기 도착했다:
6
+ * 7/28 별칭이 스코프를 버려 엉뚱한 명령으로 접힘 외부 CLI 1급 승격
7
+ * 8/5 그 외부 CLI가 exit 3 스텁임이 드러남 삭제 자기 엔진에 재배선
8
+ * 실행 주체는 이 터미널의 편성 루프(리더 LLM이 WorkOrder 작성·정확 릴리스 선택),
9
+ * 메뉴 연합은 로컬 Agentlas-OS Core. 배선 상세는 commands/workforce.cjs 참조.
28
10
  */
29
- const { create, usageFor, isHelpToken } = require("../hephaestus/runtime.cjs");
11
+ const { dispatch } = require("./workforce.cjs");
30
12
 
31
- async function run(ctx, args) {
32
- if (args.some(isHelpToken)) {
33
- ctx.out(usageFor("hep-network", ctx.lang));
34
- return 0;
35
- }
36
- if (!args.length) {
37
- ctx.err("✖ " + usageFor("hep-network", ctx.lang));
38
- return 1;
39
- }
40
- return create(ctx).cmdHep(["hep-network", ...args]);
13
+ function run(ctx, args) {
14
+ return dispatch(ctx, "hep-network", args);
41
15
  }
42
16
 
43
17
  module.exports = { run };
@@ -12,6 +12,7 @@ const path = require("node:path");
12
12
  const COMMANDS = {
13
13
  version: () => require("./version.cjs"),
14
14
  list: () => require("./list.cjs"),
15
+ graph: () => require("./graph.cjs"),
15
16
  doctor: () => require("./doctor.cjs"),
16
17
  mcp: () => require("./mcp.cjs"),
17
18
  help: () => require("./help.cjs"),
@@ -34,22 +35,24 @@ const COMMANDS = {
34
35
  automation: () => require("./automation.cjs"),
35
36
  native: () => require("./native.cjs"),
36
37
  multimodal: () => require("./multimodal.cjs"),
38
+ document: () => require("./document.cjs"),
37
39
  workforce: () => require("./workforce.cjs"),
38
40
  network: () => require("./workforce.cjs"),
39
41
  taskforce: () => require("./workforce.cjs"),
42
+ // 소스 스코프 편성 4종 — 2026-08-05 네이티브 배선(경위는 workforce.cjs 참조).
43
+ // 별칭이 아니라 1급인 이유는 여전하다: 별칭은 스코프를 전달하지 못한다.
44
+ "hep-network": () => require("./hep-network.cjs"),
45
+ "hep-local": () => require("./hep-local.cjs"),
46
+ "hep-cloud": () => require("./hep-cloud.cjs"),
47
+ "hep-hub": () => require("./hep-hub.cjs"),
40
48
  oberon: () => require("./oberon.cjs"),
41
49
  film: () => require("./film.cjs"),
42
50
  experience: () => require("./experience.cjs"),
43
51
  memory: () => require("./memory.cjs"),
44
52
  evolve: () => require("./evolve.cjs"),
45
53
  variant: () => require("./variant.cjs"),
54
+ roles: () => require("./roles.cjs"),
46
55
  hep: () => require("./hep.cjs"),
47
- // 소스 스코프 스태핑 3종은 1급 명령이다 — 별칭으로 접으면 스코프가 사라진다.
48
- // (아래 COMMAND_ALIASES 주석의 2026-07-28 수리 참조.)
49
- "hep-network": () => require("./hep-network.cjs"),
50
- "hep-local": () => require("./hep-local.cjs"),
51
- "hep-cloud": () => require("./hep-cloud.cjs"),
52
- "hep-hub": () => require("./hep-hub.cjs"),
53
56
  build: () => require("./build.cjs"),
54
57
  connect: () => require("./connect.cjs"),
55
58
  call: () => require("./call.cjs"),
@@ -58,7 +61,6 @@ const COMMANDS = {
58
61
  research: () => require("./research.cjs"),
59
62
  netadmin: () => require("./netadmin.cjs"),
60
63
  journal: () => require("./journal.cjs"),
61
- "legacy-network": () => require("./legacy-network.cjs"),
62
64
  cloud: () => require("./cloud.cjs"),
63
65
  upload: () => require("./upload.cjs"),
64
66
  storm: () => require("./storm.cjs"),
@@ -101,6 +103,18 @@ const DESKTOP_ONLY_SURFACES = {
101
103
  one: "Agentlas One is a separate Desktop/Mobile product surface.",
102
104
  };
103
105
 
106
+ /*
107
+ * (2026-08-05 이력) hep-* 편성 이름들은 하루 동안 세 상태를 지났다:
108
+ * ① 외부 CLI 스텁에 배선돼 exit 3 JSON만 뱉는 죽은 메뉴 → 삭제
109
+ * ② 삭제 직후 "알 수 없는 토큰"이 되어 프롬프트로 낙하, 에이전트가 실제 기동
110
+ * (상위 오타 가드는 한 단어 전용) → HOST_LLM_ONLY_SURFACES fail-closed 가드
111
+ * ③ 같은 날 재조사에서 편성 세 조각(4,578줄 루프·로컬 Core MCP·D.callHubTool
112
+ * 주입 지점)이 전부 이 머신에 있음이 확인됨 → 네이티브 배선으로 복원,
113
+ * 가드 폐기. 전선 계약 실측과 배선은 workforce.cjs·local-core-transport.cjs.
114
+ * 남는 교훈: 이름을 지울 때는 반드시 낙하 경로까지 막고, "계층이 없다"는 판정은
115
+ * rg 로 확인한 뒤에 한다.
116
+ */
117
+
104
118
  // 무인자 호출이 프롬프트로 오라우팅되면 안 되는 명령 (smoke 가드 대상)
105
119
  const GUARDED_NO_ARG = new Set(["search", "install", "upload"]);
106
120
 
@@ -108,24 +122,16 @@ const GUARDED_NO_ARG = new Set(["search", "install", "upload"]);
108
122
  // 스킬명과 터미널 명령이 서로 다르면 사용자가 어느 표면에 있는지에 따라 이름을
109
123
  // 바꿔 써야 한다. 같은 기능은 어디서든 같은 이름으로 부른다.
110
124
  //
111
- // 불변식(2026-07-28 수리): 별칭은 "같은 기능"에만 건다. 소스 스코프를 이름에
112
- // 달고 있는 hep-local / hep-cloud / hep-hub 여기 넣으면 안 된다 — 별칭은
113
- // 이름만 바꿔주고 스코프는 어디에도 전달되지 않기 때문이다. 실제로 그랬다:
114
- // hep-cloud cloud : 자산 보관함 명령. 과제 문자열을 서브커맨드로 읽어
115
- // `usage: agentlas cloud <save|…>` + exit 1.
116
- // hep-local workforce : cmdWorkforce 는 스코프 플래그를 받지 않는다(전량
117
- // 공개 Hub 메뉴 스태핑). "로컬 전용"이 조용히 넓어짐.
118
- // hep-hub → search : 디렉터리 나열만 하고 아무것도 실행하지 않음.
119
- // 세 명령은 스코프를 실제로 지키는 Hephaestus 네이티브 표면으로 가는 1급 명령
120
- // (COMMANDS 의 hep-local/hep-cloud/hep-hub)으로 승격했다.
121
- //
122
- // 같은 이유로 hep-network 도 별칭에서 뺐다(2026-07-28). 이름은 "Local + owner
123
- // Cloud + public Hub"인데 cmdWorkforce 는 스코프를 어디에도 싣지 않고
124
- // agentlas.cloud/api/mcp/v1 을 직접 친다. 그 서버는 sourceScope 가 없으면 "hub"
125
- // 로 기본값을 잡으므로(agentlas/.../lib/mcp/workforce.ts:228) 로컬·클라우드
126
- // 에이전트는 후보에 들어간 적이 없는데 결과는 네트워크 전량을 본 것처럼 남았다.
127
- // 연합은 Core 가 소유한다 — 네이티브 표면으로 넘긴다.
125
+ // 불변식: 별칭은 "같은 기능"에만 건다. 이름이 소스 스코프를 약속하는데 별칭이
126
+ // 스코프를 버리면 제품이 거짓말을 한다 2026-07-28 실제로 그랬다
127
+ // (hep-cloud→cloud 자산 보관함, hep-local→workforce 전량 Hub, hep-hub→search).
128
+ // hep-network/hep-local/hep-cloud/hep-hub 그래서 여기 없다 스코프를 실제로
129
+ // 관통시키는 1급 명령(COMMANDS)이다. 경위(스텁→삭제→네이티브 배선)는
130
+ // 2026-08-05 이력 주석 참조.
128
131
  const COMMAND_ALIASES = {
132
+ // legacy-network는 역사적으로 hep-network를 뜻했다(v1 호환 탈출구). 이제
133
+ // hep-network가 네이티브이므로 같은 기능 별칭이 성립한다 — 스코프도 동일(network).
134
+ "legacy-network": "hep-network",
129
135
  "hep-build": "build",
130
136
  "hep-call": "call",
131
137
  "hep-search": "search",
@@ -139,6 +145,20 @@ function resolveCommandName(cmd) {
139
145
  return COMMAND_ALIASES[cmd] || cmd;
140
146
  }
141
147
 
148
+ /**
149
+ * 자기 도움말을 직접 가진 명령들 — `<명령> --help` 는 이들에게 그대로 넘어간다.
150
+ *
151
+ * ★배경(실사용 실측 2026-08-06): 라우터가 `--help`를 가로채 도움말 표에서 한 줄을
152
+ * 긁어 보여줘서, `agentlas graph --help` 는 "Usage: agentlas graph [options]" 두 줄이
153
+ * 전부였다. 정작 `graph help` 에는 하위 명령 8개를 설명하는 제대로 된 안내가 있는데
154
+ * **사용자가 가장 먼저 치는 철자(`--help`)로는 영원히 닿지 못했다.**
155
+ *
156
+ * 목록으로 두는 이유: 모든 명령에 "help"를 넘기면, 자기 도움말이 없는 명령은 그것을
157
+ * 인자로 읽는다(`agentlas run --help` 가 "help"라는 이름을 찾는 식). 추측하지 않는다.
158
+ * `test/command-help-contract.cjs` 가 이 목록과 실제 분기를 대조한다.
159
+ */
160
+ const SELF_HELP_COMMANDS = new Set(["graph", "plugin", "billing", "roles", "native"]);
161
+
142
162
  function dispatch(ctx, argv) {
143
163
  const [rawCmd, ...rest] = argv;
144
164
  if (!rawCmd) return null; // 엔진이 REPL로 진입
@@ -164,6 +184,11 @@ function dispatch(ctx, argv) {
164
184
  * 이라 이 경로를 못 받는다. 여기가 유일한 차단 지점이므로 arity를 보지 않는다.
165
185
  * 진짜 작업이면 안내대로 따옴표로 묶어 하나의 프롬프트로 넘긴다.
166
186
  */
187
+ // (2026-08-05) HOST_LLM_ONLY_SURFACES 가드가 여기 있었다 — hep-* 네이티브
188
+ // 배선으로 표가 비면서 분기도 제거했다. 등록 명령을 지울 일이 다시 생기면
189
+ // 낙하 가드부터 만들 것: 상위 오타 가드는 한 단어 전용이라 인자가 붙은
190
+ // 삭제 이름은 프롬프트로 흘러 에이전트를 기동한다(실측·토큰 소모).
191
+
167
192
  if (DESKTOP_ONLY_SURFACES[cmd]) {
168
193
  const asTask = [rawCmd, ...rest].join(" ");
169
194
  ctx.err(`${DESKTOP_ONLY_SURFACES[cmd]}\nIt was not run as a prompt — rerun with quotes if you meant a task: agentlas "${asTask}"`);
@@ -182,4 +207,4 @@ function dispatch(ctx, argv) {
182
207
  return undefined; // 알 수 없는 토큰 — 엔진이 에이전트 이름/프롬프트로 해석 시도
183
208
  }
184
209
 
185
- module.exports = { dispatch, COMMANDS, COMMAND_ALIASES, resolveCommandName, NOT_YET_PORTED, GUARDED_NO_ARG, DESKTOP_ONLY_SURFACES };
210
+ module.exports = { dispatch, COMMANDS, COMMAND_ALIASES, resolveCommandName, SELF_HELP_COMMANDS, NOT_YET_PORTED, GUARDED_NO_ARG, DESKTOP_ONLY_SURFACES };
@@ -24,7 +24,7 @@ function roleRuntimeLabel(selection, role, en) {
24
24
  return bits.join(" ");
25
25
  }
26
26
 
27
- function run(ctx) {
27
+ function run(ctx, args = []) {
28
28
  const db = ctx.db();
29
29
  // 프라이버시 정책(웹 전용/백그라운드 제외)은 registry가 소유한다 — 직접 SQL 금지.
30
30
  const agents = listAgents(db).map((a) => ({
@@ -34,6 +34,15 @@ function run(ctx) {
34
34
  ? db.prepare("SELECT id, slug, name FROM firms ORDER BY name").all()
35
35
  : [];
36
36
 
37
+ // clig.dev: 스크립트 소비자는 사람용 표를 파싱하게 두지 말 것 — --json 은
38
+ // 사람용 출력과 같은 사실을 기계 계약으로 준다.
39
+ if (args.includes("--json")) {
40
+ const orchestrator = resolvedModelRole(db, "orchestrator");
41
+ const worker = resolvedModelRole(db, "worker");
42
+ ctx.out(JSON.stringify({ agents, firms, modelRoles: { orchestrator, worker } }, null, 2));
43
+ return 0;
44
+ }
45
+
37
46
  const en = ctx.lang === "en";
38
47
  ctx.out(ctx.ui.bold(en ? "Installed agents" : "설치된 에이전트"));
39
48
  if (!agents.length) {
@@ -80,11 +80,15 @@ async function probe(ctx, args) {
80
80
  function run(ctx, args = []) {
81
81
  const [sub, ...rest] = args;
82
82
  if (!sub) return list(ctx);
83
+ // 무인자 기본 동작이 목록인데 이름으로 부르면 거부되는 비대칭이 있었다
84
+ // (2026-08-05 감사 결함 G): 다른 명령들(cloud list, plugin list)이 만든
85
+ // "list를 붙이는" 습관이 여기서만 usage 오류가 됐다.
86
+ if (sub === "list" || sub === "ls") return list(ctx);
83
87
  if (sub === "probe") return probe(ctx, rest);
84
88
  const en = ctx.lang === "en";
85
89
  ctx.err(en
86
- ? `unknown mcp subcommand: ${sub} (available: probe)`
87
- : `알 수 없는 mcp 하위 명령: ${sub} (사용 가능: probe)`);
90
+ ? `unknown mcp subcommand: ${sub} (available: list · probe)`
91
+ : `알 수 없는 mcp 하위 명령: ${sub} (사용 가능: list · probe)`);
88
92
  return 1;
89
93
  }
90
94
 
@@ -8,9 +8,25 @@ function run(ctx, args) {
8
8
  const sub = String(args[0] || "help");
9
9
  const query = args[1];
10
10
  if (sub === "help" || sub === "--help" || sub === "-h") {
11
+ // SELF_HELP_COMMANDS 계약: --help 는 스텁이 아니라 실제 안내여야 한다 —
12
+ // 무엇이 만들어지고 언제 필요한지까지 말한다.
11
13
  ctx.out(ko
12
- ? "사용법: agentlas native prepare <에이전트> · 네이티브 CLI 문맥 파일을 명시적으로 생성"
13
- : "usage: agentlas native prepare <agent> · explicitly create native CLI context files");
14
+ ? [
15
+ "agentlas native 네이티브 CLI 문맥 파일 관리",
16
+ " native prepare <에이전트> 에이전트 폴더에 CLAUDE.md·AGENTS.md 등",
17
+ " 네이티브 CLI 문맥 파일을 명시적으로 생성",
18
+ "",
19
+ " 보통은 실행 시 자동 준비됩니다. 파일을 직접 확인·수정하고 싶을 때 쓰세요.",
20
+ " 에이전트 이름은 agentlas list 에서 확인합니다.",
21
+ ].join("\n")
22
+ : [
23
+ "agentlas native — native CLI context files",
24
+ " native prepare <agent> explicitly create the native CLI context files",
25
+ " (CLAUDE.md, AGENTS.md, …) in the agent folder",
26
+ "",
27
+ " Normally these are prepared automatically on run. Use this when you want",
28
+ " to inspect or edit the files directly. Find agent names via: agentlas list",
29
+ ].join("\n"));
14
30
  return 0;
15
31
  }
16
32
  if (sub !== "prepare" || !query) {
@@ -159,6 +159,28 @@ async function runPluginList(ctx, args) {
159
159
 
160
160
  function run(ctx, args) {
161
161
  const action = args[0];
162
+ // SELF_HELP_COMMANDS 계약(index.cjs): `plugin --help` 는 여기로 ["help"] 가 되어
163
+ // 들어온다. help 분기가 없으면 unknown action → usage exit 1 이라, 도움말을
164
+ // 요청한 사용자가 오류 코드를 받는다.
165
+ if (action === "help" || action === "--help" || action === "-h") {
166
+ const ko = ctx.lang !== "en";
167
+ ctx.out(ko
168
+ ? [
169
+ "agentlas plugin — Hub 플러그인(MCP 서버)",
170
+ " plugin list [--project <경로>] 설치 가능/설치된 플러그인 목록",
171
+ " plugin add <slug> 플러그인 설치 (slug는 list에서 확인)",
172
+ "",
173
+ " 연결 확인: agentlas mcp probe <server-id>",
174
+ ].join("\n")
175
+ : [
176
+ "agentlas plugin — Hub plugins (MCP servers)",
177
+ " plugin list [--project <path>] list available/installed plugins",
178
+ " plugin add <slug> install a plugin (find slugs via list)",
179
+ "",
180
+ " Check a connection with: agentlas mcp probe <server-id>",
181
+ ].join("\n"));
182
+ return 0;
183
+ }
162
184
  if (action === "add") {
163
185
  if (args.length !== 2) {
164
186
  ctx.err("usage: agentlas plugin add <slug> (run agentlas plugin list first)");