agentlas 0.9.8 → 0.9.10

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/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.10 — 2026-07-26
4
+
5
+ - `agentlas context refresh|refs|slice|impact|verify` now invokes the installed
6
+ Agentlas Core module directly. Context commands no longer fall through the
7
+ natural-language Hephaestus command route.
8
+ - Context Slice generation refreshes the project fingerprint before each
9
+ concrete Terminal task, so a long-running Terminal session sees newly added
10
+ or changed CommonJS, ESM, TypeScript, and JavaScript files.
11
+ - Release validation pins Agentlas Core v1.1.67 commit
12
+ `04258b7541f604479dc04279146a506e363ad85e`, including Code Map v2 backlinks,
13
+ functional Sitemap dependencies, and fail-closed impact verification.
14
+
15
+ ## 0.9.9 — 2026-07-26
16
+
17
+ - In an explicitly initialized project, ordinary runs, firms, Stormbreaker, and
18
+ Workforce now receive the same local Context Slice from Agentlas OS v1.1.66
19
+ after the task is concrete. The slice carries inherited goals and constraints
20
+ plus exact definitions, backlinks, and structurally related files without
21
+ sending the project map to Hub or Cloud.
22
+ - Read, write, and full task permission no longer doubles as consent to create
23
+ `.agentlas/` or edit `.gitignore`. `agentlas project status` is passive, and
24
+ only the explicit `agentlas project init` boundary creates private project
25
+ state after announcing the side effects.
26
+ - Workload-routing receipts now conform to the public v1 nested schema, treat a
27
+ missing model/runtime pair as unresolved, and fail closed on unknown required
28
+ metadata or ambiguous duplicate model identifiers.
29
+ - The shared architecture seeder is monotonic: it preserves newer or
30
+ unparseable shared state, upgrades older state atomically, and repairs only
31
+ missing built-ins at an equal version instead of flipping the Desktop-shared
32
+ database back to an older Terminal bundle.
33
+ - Interactive output is append-only while a task runs, preserves long streamed
34
+ output and scrollback through resize/cancellation, wraps command meaning at
35
+ narrow widths, and keeps saved runtime, permission, lifecycle, and Korean/
36
+ English status text truthful.
37
+ - Release validation targets the exact Agentlas OS v1.1.66 contract commit
38
+ `3f6f9ac3929b9238330de18c758ba200fb371017`.
39
+
3
40
  ## 0.9.8 — 2026-07-25
4
41
 
5
42
  - No more silent keyword fallback. When the connected model can't judge a route
package/README.md CHANGED
@@ -17,10 +17,9 @@ Claude Code style, standalone: **no desktop app required.**
17
17
  Agentlas Terminal is the already-shipped independent terminal product. It is
18
18
  not a Desktop `cli/` mirror and does not require the Desktop app to run.
19
19
 
20
- > **Current source release candidate (2026-07-16):** `v0.9.1`. The source commit
21
- > does not prove a GitHub release or npm publication. After the immutable tag
22
- > and release gates pass, verify the independently published npm version with
23
- > `npm view agentlas version` before installation.
20
+ > **Current source release candidate (2026-07-26):** `v0.9.10`. A source commit
21
+ > does not prove npm publication. Verify the independently published package
22
+ > before installation with `npm view agentlas version`.
24
23
 
25
24
  Release tags are published to npm through the repository's OIDC trusted
26
25
  publisher workflow. The workflow accepts only an exact immutable `vX.Y.Z` tag,
@@ -116,6 +115,25 @@ agentlas import <폴더> # 로컬 에이전트/팀 임포트
116
115
  agentlas list # 설치된 에이전트/회사 + 활성 런타임
117
116
  ```
118
117
 
118
+ **프로젝트 의존관계 지도**
119
+ ```sh
120
+ agentlas project status
121
+ agentlas project init
122
+ agentlas context refresh
123
+ agentlas context refs resolveHubEntityKind
124
+ agentlas context slice --task "entity kind 라우팅 수정" \
125
+ --target src/package-kind.ts --render
126
+ agentlas context impact --changed src/package-kind.ts
127
+ agentlas context verify --changed src/package-kind.ts \
128
+ --reviewed src/register/route.ts
129
+ ```
130
+
131
+ `agentlas project init`으로 명시적으로 초기화한 프로젝트에서만 일반
132
+ 실행, 팀, Stormbreaker, Workforce가 작업이 구체화된 뒤 같은 로컬 Context
133
+ Slice를 자동으로 받는다. 읽기·쓰기·전체 권한만으로는 `.agentlas/`나
134
+ `.gitignore`를 만들거나 수정하지 않는다. Hub/Cloud 검색에는 코드맵,
135
+ 소스 경로, 프로젝트 파일 내용이 전송되지 않는다.
136
+
119
137
  **Portable Experience Bundle과 Variant**
120
138
  ```sh
121
139
  agentlas experience list
@@ -1643,7 +1643,13 @@ function create(deps = {}) {
1643
1643
  }
1644
1644
 
1645
1645
  async function runModel(runtime, system, prompt, context) {
1646
- if (typeof D.runModel === "function") return normalizeModelText(await D.runModel({ runtime, system, prompt, context }));
1646
+ const localContextSlice = typeof D.projectContextSlice === "function"
1647
+ ? D.projectContextSlice(context.cwd, context.task || "")
1648
+ : "";
1649
+ const effectiveSystem = localContextSlice
1650
+ ? `${system}\n\n${localContextSlice}`
1651
+ : system;
1652
+ if (typeof D.runModel === "function") return normalizeModelText(await D.runModel({ runtime, system: effectiveSystem, prompt, context }));
1647
1653
  if (runtime.mode === "cli") {
1648
1654
  const authorityMode = context.authorityMode || "no-authority";
1649
1655
  if (runtime.kind === "codex" && authorityMode === "no-authority") {
@@ -1658,7 +1664,7 @@ function create(deps = {}) {
1658
1664
  "Gemini CLI workforce execution is blocked until this host proves an empty built-in and MCP tool inventory",
1659
1665
  );
1660
1666
  }
1661
- return normalizeModelText(await D.captureRuntime(runtime.kind, system, prompt, {
1667
+ return normalizeModelText(await D.captureRuntime(runtime.kind, effectiveSystem, prompt, {
1662
1668
  cwd: context.cwd,
1663
1669
  env: context.env,
1664
1670
  permission: context.permission,
@@ -1667,7 +1673,7 @@ function create(deps = {}) {
1667
1673
  authorityMode,
1668
1674
  }));
1669
1675
  }
1670
- return normalizeModelText(await D.runApi(runtime.backend, context.modelPin || runtime.model, system, prompt));
1676
+ return normalizeModelText(await D.runApi(runtime.backend, context.modelPin || runtime.model, effectiveSystem, prompt));
1671
1677
  }
1672
1678
 
1673
1679
  async function callHubTool(name, args) {
@@ -1888,7 +1894,15 @@ function create(deps = {}) {
1888
1894
  const env = typeof D.buildChildEnv === "function" ? await D.buildChildEnv(db, {
1889
1895
  projectPath: ctx.projectPath || null, permission, cwd, lang: ui.lang,
1890
1896
  }) : process.env;
1891
- const modelContext = { cwd, permission, env, modelPin: ctx.modelPin || null, effortPin: ctx.effortPin, authorityMode: "no-authority" };
1897
+ const modelContext = {
1898
+ cwd,
1899
+ permission,
1900
+ env,
1901
+ modelPin: ctx.modelPin || null,
1902
+ effortPin: ctx.effortPin,
1903
+ authorityMode: "no-authority",
1904
+ task,
1905
+ };
1892
1906
  const prompts = buildPrompts(task, identity);
1893
1907
  const runId = `workforce-run:${crypto.randomUUID()}`;
1894
1908
  const provider = runtime.mode === "cli" ? runtime.kind : runtime.backend;
@@ -35,7 +35,11 @@ const desktopOntologyLoadout = require("./agentlas-desktop-loadout.cjs");
35
35
  const workloadRouting = require("./agentlas-workload-routing.cjs");
36
36
  const terminalExperienceIntake = require("./agentlas-experience-intake.cjs");
37
37
  const terminalMemoryGovernance = require("./agentlas-memory-governance.cjs");
38
- const { captureCoreJsonSync, resolveCoreRuntimeRoot } = require("./agentlas-core-harness.cjs");
38
+ const {
39
+ captureCoreJsonSync,
40
+ resolveCoreRuntimeRoot,
41
+ spawnCoreModule,
42
+ } = require("./agentlas-core-harness.cjs");
39
43
 
40
44
  // ── 앱과 동일한 userData 경로 (electron app.getPath('userData')와 일치) ──
41
45
  function userDataDir() {
@@ -8334,7 +8338,66 @@ function ensureTerminalProjectForExecutionCli(db, projectPath, permission = PERM
8334
8338
  if (permission === "read") return activeProjectPath(db, { projectPath: root });
8335
8339
  return activeProjectPath(db, { projectPath: root, activate: true, reason });
8336
8340
  }
8337
- function cliMemoryContext(db, projectPath, agentId = null) {
8341
+
8342
+ function cliProjectContextSlice(projectPath, task) {
8343
+ if (!projectPath || !String(task || "").trim()) return "";
8344
+ if (!fs.existsSync(path.join(projectPath, ".agentlas"))) return "";
8345
+ try {
8346
+ const coreRoot = resolveCoreRuntimeRoot();
8347
+ if (!coreRoot) return "";
8348
+ const result = captureCoreJsonSync(
8349
+ "agentlas_cloud",
8350
+ [
8351
+ "context", "slice",
8352
+ "--project", projectPath,
8353
+ "--task-stdin",
8354
+ "--render",
8355
+ ],
8356
+ {
8357
+ cwd: projectPath,
8358
+ input: String(task).slice(0, 12_000),
8359
+ timeout: 4_000,
8360
+ },
8361
+ coreRoot,
8362
+ );
8363
+ return result
8364
+ && result.schemaVersion === "agentlas.context-slice.v1"
8365
+ && typeof result.rendered === "string"
8366
+ ? result.rendered.trim()
8367
+ : "";
8368
+ } catch {
8369
+ return "";
8370
+ }
8371
+ }
8372
+
8373
+ function cliProjectContextCommand(projectPath, args) {
8374
+ const coreRoot = resolveCoreRuntimeRoot();
8375
+ const child = spawnCoreModule(
8376
+ "agentlas_cloud",
8377
+ ["context", ...args],
8378
+ { cwd: projectPath, stdio: "inherit" },
8379
+ coreRoot,
8380
+ );
8381
+ if (!child) {
8382
+ process.stderr.write("Agentlas Context Map requires the installed Agentlas Core runtime and Python 3.9+.\n");
8383
+ process.exitCode = 1;
8384
+ return Promise.resolve(1);
8385
+ }
8386
+ return new Promise((resolve) => {
8387
+ child.on("error", (error) => {
8388
+ process.stderr.write(`Agentlas Context Map failed: ${error.message}\n`);
8389
+ process.exitCode = 1;
8390
+ resolve(1);
8391
+ });
8392
+ child.on("close", (code) => {
8393
+ const status = code == null ? 1 : code;
8394
+ if (status !== 0) process.exitCode = status;
8395
+ resolve(status);
8396
+ });
8397
+ });
8398
+ }
8399
+
8400
+ function cliMemoryContext(db, projectPath, agentId = null, task = "") {
8338
8401
  const sections = [];
8339
8402
  const arch = loadArch();
8340
8403
  ensureMemoryContextColumn(db);
@@ -8347,6 +8410,8 @@ function cliMemoryContext(db, projectPath, agentId = null) {
8347
8410
  if (s.trim()) sections.push(`### Project memory (${projectPath})\n${s.trim()}`);
8348
8411
  }
8349
8412
  } catch { /* ignore */ }
8413
+ const contextSlice = cliProjectContextSlice(projectPath, task);
8414
+ if (contextSlice) sections.push(contextSlice);
8350
8415
  }
8351
8416
  if (tableExists(db, "memory_entries")) {
8352
8417
  try {
@@ -8514,7 +8579,7 @@ function augmentSystem(db, baseSystem, ctx, withEmitter, request = "") {
8514
8579
  sys = langDirective(lang) + (sys ? "\n\n" + sys : "");
8515
8580
  const connectionSkill = loadGlobalConnectionSkill();
8516
8581
  if (connectionSkill) sys += "\n\n" + connectionSkill;
8517
- const mem = cliMemoryContext(db, ctx && ctx.projectPath, ctx && ctx.agentId);
8582
+ const mem = cliMemoryContext(db, ctx && ctx.projectPath, ctx && ctx.agentId, request);
8518
8583
  if (mem) sys += "\n\n" + mem;
8519
8584
  if (withEmitter) {
8520
8585
  sys += "\n\n" + memoryEmitterPromptFor(request, arch, ctx && ctx.turnId, ctx && ctx.permission);
@@ -9803,7 +9868,7 @@ function buildHelpers(db) {
9803
9868
  autoRouteNote: (choice, lang) => autoRouteNote(choice, lang),
9804
9869
  autoRoutePreamble: (choice, lang) => autoRoutePreamble(choice, lang),
9805
9870
  directSystemPrompt: (lang) => directSystemPrompt(lang),
9806
- cliMemoryContext: (db_, pp, agentId) => cliMemoryContext(db_, pp, agentId),
9871
+ cliMemoryContext: (db_, pp, agentId, task) => cliMemoryContext(db_, pp, agentId, task),
9807
9872
  importLocal: (db_, p) => importLocalFolderCli(db_, p),
9808
9873
  // REPL-safe public Hub install: fail()(process.exit) 대신 Error를 throw 해 REPL이 직접 렌더하게 한다.
9809
9874
  cloudInstall: async (db_, slug) => {
@@ -10285,6 +10350,7 @@ function workforce() {
10285
10350
  fetchHub: (url, init) => fetchHubCli(url, init),
10286
10351
  listWorkforceTools: listWorkforceToolsCli,
10287
10352
  supportsWorkforceToolAuthority: async () => false,
10353
+ projectContextSlice: cliProjectContextSlice,
10288
10354
  prefsLang,
10289
10355
  out,
10290
10356
  });
@@ -11949,6 +12015,7 @@ function cmdHelp() {
11949
12015
  " research <sub> Research Engine: status|gather|search|read|plan",
11950
12016
  " career-graph <sub> source routing index: status|list|add",
11951
12017
  " ontology <sub> project knowledge: status|list|add (REPL: /ontology)",
12018
+ " context <sub> project map: refresh|locate|refs|slice|impact|verify",
11952
12019
  " journal <sub> Stormbreaker run journal: status|verify|repair|gate",
11953
12020
  "",
11954
12021
  hdr("ACCOUNT & OPS"),
@@ -12063,6 +12130,17 @@ async function main() {
12063
12130
  case "memory":
12064
12131
  // Phase 1b: 기존 마크다운 메모리 → 공유 agentlas.sqlite 이관(dry-run 기본, --apply).
12065
12132
  return require("./agentlas-memory-import.cjs").cmdMemory({ db, args: rest.slice(1), out, fail });
12133
+ case "context": {
12134
+ if (!rest[1]) return fail("usage: agentlas context refresh|locate|refs|slice|impact|verify [options]");
12135
+ const cwd = projectCwd();
12136
+ ensureTerminalProjectForExecutionCli(db, cwd, PERMISSION, "terminal-context");
12137
+ const contextArgs = rest.slice(1);
12138
+ const hasProject = contextArgs.includes("--project");
12139
+ return cliProjectContextCommand(
12140
+ cwd,
12141
+ [...contextArgs, ...(hasProject ? [] : ["--project", cwd])],
12142
+ );
12143
+ }
12066
12144
  case "evolve":
12067
12145
  // Phase 2/2+: 데스크탑 트리거가 만든 성장 제안 검토·적용·되돌리기(공유 DB).
12068
12146
  return require("./agentlas-evolution.cjs").cmdEvolve({ db, args: rest.slice(1), out, fail, agentFolder });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentlas",
3
- "version": "0.9.8",
3
+ "version": "0.9.10",
4
4
  "description": "Agentlas agent terminal — chat with your installed AI agents and teams from the terminal, Claude Code style. Standalone: no desktop app required.",
5
5
  "bin": {
6
6
  "agentlas": "bin/agentlas.cjs"