@galaxy-stack/ai-coder-core 0.3.0-alpha.9 → 0.3.0
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.d/2026-09-19-advisory-guard-policy.md +1 -1
- package/CHANGELOG.d/2026-09-26-binary-review-pipe-guidance-finalization-test.md +14 -0
- package/CHANGELOG.d/2026-09-26-cache-capability-and-mcp-reconnect.md +16 -0
- package/CHANGELOG.d/2026-09-26-cache-hit-harness.md +13 -0
- package/CHANGELOG.d/2026-09-26-cache-hit-rate-and-inhistory-option.md +12 -0
- package/CHANGELOG.d/2026-09-26-cumulative-cache-hit.md +13 -0
- package/CHANGELOG.d/2026-09-26-finalization-prefix-and-verified-inhistory.md +12 -0
- package/CHANGELOG.d/2026-09-26-generated-state-and-churn-guard.md +16 -0
- package/CHANGELOG.d/2026-09-26-mcp-reconnect-fixture.md +11 -0
- package/CHANGELOG.d/2026-09-26-memory-hybrid-semantic-consolidation.md +16 -0
- package/CHANGELOG.d/2026-09-26-memory-recall-benchmark.md +12 -0
- package/CHANGELOG.d/2026-09-26-ollama-cache-usage.md +14 -0
- package/CHANGELOG.d/2026-09-26-ollama-embeddings-provider.md +13 -0
- package/CHANGELOG.d/2026-09-26-rerecord-live-fixture.md +6 -0
- package/CHANGELOG.d/2026-09-26-skill-index-signing.md +11 -0
- package/CHANGELOG.d/2026-09-26-skill-version-and-marketplace.md +14 -0
- package/CHANGELOG.d/2026-09-27-workspace-derived-build-output.md +16 -0
- package/CHANGELOG.d/2026-09-28-advisory-lenh-check-va-server.md +26 -0
- package/CHANGELOG.d/2026-09-28-clamp-tham-so-vuot-cap.md +20 -0
- package/CHANGELOG.d/2026-09-28-digest-context-item.md +16 -0
- package/CHANGELOG.d/2026-09-28-gate-bo-qua-path-da-xoa.md +20 -0
- package/CHANGELOG.d/2026-09-28-ngan-sach-luot-finalization.md +20 -0
- package/CHANGELOG.d/2026-09-28-scope-cua-project-validate.md +22 -0
- package/CHANGELOG.d/2026-09-28-staleness-theo-pham-vi.md +22 -0
- package/CHANGELOG.d/2026-09-28-thong-bao-guard-dependency.md +24 -0
- package/CHANGELOG.d/2026-09-28-thu-tu-mandatory-state-cache.md +20 -0
- package/CHANGELOG.md +71 -1
- package/README.md +10 -10
- package/dist/adapters/node/config/manual-provider-config.d.ts +3 -0
- package/dist/adapters/node/config/manual-provider-config.d.ts.map +1 -1
- package/dist/adapters/node/config/manual-provider-config.js +4 -0
- package/dist/adapters/node/config/manual-provider-config.js.map +1 -1
- package/dist/adapters/node/host/node-workspace-evidence-verifier.d.ts.map +1 -1
- package/dist/adapters/node/host/node-workspace-evidence-verifier.js +8 -13
- package/dist/adapters/node/host/node-workspace-evidence-verifier.js.map +1 -1
- package/dist/adapters/node/host/node-workspace-port.d.ts +1 -1
- package/dist/adapters/node/host/node-workspace-port.d.ts.map +1 -1
- package/dist/adapters/node/host/node-workspace-port.js +47 -4
- package/dist/adapters/node/host/node-workspace-port.js.map +1 -1
- package/dist/adapters/node/host/node-workspace-snapshot.d.ts.map +1 -1
- package/dist/adapters/node/host/node-workspace-snapshot.js +60 -4
- package/dist/adapters/node/host/node-workspace-snapshot.js.map +1 -1
- package/dist/adapters/node/host/project-tools.d.ts.map +1 -1
- package/dist/adapters/node/host/project-tools.js +8 -1
- package/dist/adapters/node/host/project-tools.js.map +1 -1
- package/dist/adapters/node/host/workspace-generated-state.d.ts +8 -0
- package/dist/adapters/node/host/workspace-generated-state.d.ts.map +1 -0
- package/dist/adapters/node/host/workspace-generated-state.js +8 -0
- package/dist/adapters/node/host/workspace-generated-state.js.map +1 -0
- package/dist/adapters/node/mcp/mcp-client.d.ts +7 -2
- package/dist/adapters/node/mcp/mcp-client.d.ts.map +1 -1
- package/dist/adapters/node/mcp/mcp-client.js +41 -6
- package/dist/adapters/node/mcp/mcp-client.js.map +1 -1
- package/dist/adapters/node/memory/ollama-embeddings.d.ts +26 -0
- package/dist/adapters/node/memory/ollama-embeddings.d.ts.map +1 -0
- package/dist/adapters/node/memory/ollama-embeddings.js +98 -0
- package/dist/adapters/node/memory/ollama-embeddings.js.map +1 -0
- package/dist/adapters/node/memory/sqlite-memory.d.ts +16 -3
- package/dist/adapters/node/memory/sqlite-memory.d.ts.map +1 -1
- package/dist/adapters/node/memory/sqlite-memory.js +138 -16
- package/dist/adapters/node/memory/sqlite-memory.js.map +1 -1
- package/dist/adapters/node/provider/ollama-chat-stream.d.ts.map +1 -1
- package/dist/adapters/node/provider/ollama-chat-stream.js +4 -0
- package/dist/adapters/node/provider/ollama-chat-stream.js.map +1 -1
- package/dist/adapters/node/provider/ollama-coding-model.d.ts +16 -2
- package/dist/adapters/node/provider/ollama-coding-model.d.ts.map +1 -1
- package/dist/adapters/node/provider/ollama-coding-model.js +18 -0
- package/dist/adapters/node/provider/ollama-coding-model.js.map +1 -1
- package/dist/adapters/node/skills/directory-skills.d.ts.map +1 -1
- package/dist/adapters/node/skills/directory-skills.js +16 -1
- package/dist/adapters/node/skills/directory-skills.js.map +1 -1
- package/dist/adapters/node/skills/skill-marketplace.d.ts +71 -0
- package/dist/adapters/node/skills/skill-marketplace.d.ts.map +1 -0
- package/dist/adapters/node/skills/skill-marketplace.js +259 -0
- package/dist/adapters/node/skills/skill-marketplace.js.map +1 -0
- package/dist/adapters/node/tools/tool-executor.d.ts.map +1 -1
- package/dist/adapters/node/tools/tool-executor.js +36 -15
- package/dist/adapters/node/tools/tool-executor.js.map +1 -1
- package/dist/adapters/node/tools/workspace-review.d.ts.map +1 -1
- package/dist/adapters/node/tools/workspace-review.js +51 -12
- package/dist/adapters/node/tools/workspace-review.js.map +1 -1
- package/dist/agent/index.d.ts +17 -0
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/context/checkpoint.js +1 -1
- package/dist/context/checkpoint.js.map +1 -1
- package/dist/context/context-manager.d.ts +27 -1
- package/dist/context/context-manager.d.ts.map +1 -1
- package/dist/context/context-manager.js +54 -7
- package/dist/context/context-manager.js.map +1 -1
- package/dist/context/context-profile.d.ts.map +1 -1
- package/dist/context/context-profile.js +6 -2
- package/dist/context/context-profile.js.map +1 -1
- package/dist/context/token-ledger.d.ts +9 -0
- package/dist/context/token-ledger.d.ts.map +1 -1
- package/dist/context/token-ledger.js +8 -0
- package/dist/context/token-ledger.js.map +1 -1
- package/dist/ports/capability-port.d.ts +8 -0
- package/dist/ports/capability-port.d.ts.map +1 -1
- package/dist/ports/workspace-port.d.ts +2 -1
- package/dist/ports/workspace-port.d.ts.map +1 -1
- package/dist/prompt/prompt-assembler.d.ts +1 -1
- package/dist/prompt/prompt-assembler.d.ts.map +1 -1
- package/dist/prompt/prompt-assembler.js +12 -4
- package/dist/prompt/prompt-assembler.js.map +1 -1
- package/dist/runtime/completion-gate.d.ts +1 -0
- package/dist/runtime/completion-gate.d.ts.map +1 -1
- package/dist/runtime/completion-gate.js +54 -11
- package/dist/runtime/completion-gate.js.map +1 -1
- package/dist/runtime/run-controller.d.ts +6 -0
- package/dist/runtime/run-controller.d.ts.map +1 -1
- package/dist/runtime/run-controller.js +138 -13
- package/dist/runtime/run-controller.js.map +1 -1
- package/dist/runtime/runtime-error.d.ts +1 -1
- package/dist/runtime/runtime-error.d.ts.map +1 -1
- package/dist/runtime/runtime-error.js.map +1 -1
- package/dist/runtime/runtime-types.d.ts +10 -0
- package/dist/runtime/runtime-types.d.ts.map +1 -1
- package/dist/runtime/workspace-generated-path.d.ts +26 -0
- package/dist/runtime/workspace-generated-path.d.ts.map +1 -0
- package/dist/runtime/workspace-generated-path.js +61 -0
- package/dist/runtime/workspace-generated-path.js.map +1 -0
- package/dist/tools/command-shape.d.ts +4 -0
- package/dist/tools/command-shape.d.ts.map +1 -0
- package/dist/tools/command-shape.js +62 -0
- package/dist/tools/command-shape.js.map +1 -0
- package/dist/tools/json-schema.d.ts +13 -0
- package/dist/tools/json-schema.d.ts.map +1 -1
- package/dist/tools/json-schema.js +45 -0
- package/dist/tools/json-schema.js.map +1 -1
- package/dist/tools/tool-registry.js +2 -2
- package/dist/tools/tool-registry.js.map +1 -1
- package/dist/tools/validation-scope.d.ts +14 -0
- package/dist/tools/validation-scope.d.ts.map +1 -0
- package/dist/tools/validation-scope.js +16 -0
- package/dist/tools/validation-scope.js.map +1 -0
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CACHE_HIT.md +109 -0
- package/docs/GALAXY_AGENT_PLATFORM_TODO.md +11 -2
- package/docs/SKILL_MARKETPLACE.md +59 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- `AiCoderRunBudget.noProgressPolicy`: `advisory` (mặc định) và `strict`.
|
|
6
6
|
- `AiCoderRunBudget.observationNudgeThresholds` (mặc định `[3, 5, 8]`, theo
|
|
7
|
-
tư tưởng repeat-tool-reminder của
|
|
7
|
+
tư tưởng repeat-tool-reminder của DSH gốc): các mốc nhắc advisory
|
|
8
8
|
cho observation đọc-only; block chỉ xảy ra sau mốc cuối.
|
|
9
9
|
- Checkpoint lưu `noProgress.policy` và `noProgress.observationNudgeThresholds`;
|
|
10
10
|
resume với cấu hình khác bị từ chối `CHECKPOINT_INCOMPATIBLE`, checkpoint cũ
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 2026-09-26 — Binary review không chặn, pipe guidance, test finalization
|
|
2
|
+
|
|
3
|
+
Vùng: adapters/tools, prompt, runtime/test
|
|
4
|
+
|
|
5
|
+
## Sau
|
|
6
|
+
- `NodeWorkspaceReviewExecutor`: file **nhị phân/quá lớn** (không đọc được text ổn định) được review **theo hash** với `textReviewed: false` và `opaquePaths` disclosure, thay vì throw `WORKSPACE_REVIEW_FAILED`. `diff_review` evidence vẫn được cấp (hash bao gồm hash file). Entry đặc biệt (symlink/other) và thay đổi đồng thời vẫn fail-closed.
|
|
7
|
+
- Prompt `editing-command-policy` 2.2.0 (prompt `ai-coder-single/2.8.0`): cấm pipe khi cần exit code (`| tail/head/cat/grep` che mã thoát), dùng `validate_project`.
|
|
8
|
+
- Test deterministic `cache-hit.test.ts`: finalization append-only giữ prefix (>95%) còn projection thì sập (<50%).
|
|
9
|
+
|
|
10
|
+
## Bối cảnh
|
|
11
|
+
- Run GymFlow: `review_changes` fail trên `hero.png` ở turn ~31 rồi lại pass ở turn ~40 (không nhất quán), và model từng đọc sai exit code do pipe.
|
|
12
|
+
|
|
13
|
+
## Test hồi quy
|
|
14
|
+
- `test/workspace-review.test.ts` (binary), `test/cache-hit.test.ts` (finalization), `test/dist-smoke.mjs` (prompt version).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# 2026-09-26 — Cache capability và MCP reconnect
|
|
2
|
+
|
|
3
|
+
Vùng: runtime/prompt/adapters
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- Không có cách để route khai báo prefix cache hay cách cập nhật system prompt; runtime luôn ghi đè node 0 khi prompt đổi (lazy activation) → mất prefix cache.
|
|
7
|
+
- MCP client không reconnect khi transport lỗi giữa run.
|
|
8
|
+
|
|
9
|
+
## Sau
|
|
10
|
+
- `ModelCapabilities` thêm `promptCache` và `systemPromptUpdate` (tùy chọn, mặc định coi như in-place).
|
|
11
|
+
- `AiCoderContextManager.replaceSystemPrompt(..., mode)` hỗ trợ `in-history`: append system prompt mới sau history (giữ head byte-stable) khi route khai báo `in-history`; `in-place` giữ hành vi cũ và dọn các node in-history. `addItem` dedup theo content.
|
|
12
|
+
- Ollama adapter khai báo `promptCache: "unknown"`, `systemPromptUpdate: "unknown"` (không tự nhận hỗ trợ).
|
|
13
|
+
- `McpAgentClient` reconnect sau lỗi transport và retry **chỉ** tool read-only; mutation giữ unknown outcome.
|
|
14
|
+
|
|
15
|
+
## Test hồi quy
|
|
16
|
+
- `test/cache-prompt.test.ts`: in-history append + dedup; in-place rewrite + dọn node in-history.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 2026-09-26 — Cache-hit (prefix reuse) harness
|
|
2
|
+
|
|
3
|
+
Vùng: runtime/prompt
|
|
4
|
+
|
|
5
|
+
## Sau
|
|
6
|
+
- `test/cache-hit.test.ts` mô phỏng prefix cache bằng token hoá request và đo **tỷ lệ tái dùng prefix** khi prompt đổi giữa run:
|
|
7
|
+
- `in-history` (append system prompt sau history) giữ prefix cũ → reuse cao (>90%);
|
|
8
|
+
- `in-place` (ghi đè node 0) → reuse sụp (<50%).
|
|
9
|
+
- Assert ledger ghi `cachedInput` từ `prompt_cache_hit_tokens`/`cached_tokens`.
|
|
10
|
+
- Đây là công cụ đo deterministic cho H-full; không cần provider.
|
|
11
|
+
|
|
12
|
+
## Test hồi quy
|
|
13
|
+
- `test/cache-hit.test.ts` (2 case); chạy trong `npm run verify`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 2026-09-26 — Cache hit rate, token_ledger event, và systemPromptUpdate option
|
|
2
|
+
|
|
3
|
+
Vùng: runtime/context/adapters
|
|
4
|
+
|
|
5
|
+
## Sau
|
|
6
|
+
- `AiCoderTokenLedgerEntry` thêm `cacheHitRate`; log `trace.token_ledger` giờ có số này.
|
|
7
|
+
- Runtime phát event `token_ledger` (`actualInput/cachedInput/cacheHitRate/outputTokens/turn`) để host hiển thị live.
|
|
8
|
+
- `OllamaCodingModel` nhận option `systemPromptUpdate` (`in-place|in-history|unknown`, mặc định unknown).
|
|
9
|
+
- `docs/CACHE_HIT.md`: cách đo, baseline Ollama, và quy trình kiểm chứng template trước khi bật in-history (kết quả gemma3: đọc system message mới nhất).
|
|
10
|
+
|
|
11
|
+
## Test hồi quy
|
|
12
|
+
- `test/cache-hit.test.ts`: cacheHitRate, capability in-history của adapter.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 2026-09-26 — Cache hit luỹ kế
|
|
2
|
+
|
|
3
|
+
Vùng: context/runtime
|
|
4
|
+
|
|
5
|
+
## Sau
|
|
6
|
+
- `AiCoderTokenLedgerEntry` thêm `cumulativeActualInput`, `cumulativeCachedInput`, `cumulativeCacheHitRate`.
|
|
7
|
+
- Event `token_ledger` mang thêm `cumulativeCacheHitRate` để host hiển thị số kiểu phiên (như DSH), tách khỏi per-turn.
|
|
8
|
+
|
|
9
|
+
## Lý do
|
|
10
|
+
- Per-turn `cacheHitRate` dao động mạnh khi context phình/đổi prefix; số luỹ kế phản ánh tỷ lệ prefix tái dùng của cả phiên.
|
|
11
|
+
|
|
12
|
+
## Test hồi quy
|
|
13
|
+
- `test/cache-hit.test.ts`: cộng dồn qua 2 lượt (200 actual / 120 cached → 0.6).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 2026-09-26 — Finalization tool-free, allowlist in-history, cache accounting
|
|
2
|
+
|
|
3
|
+
Vùng: runtime/adapters/context
|
|
4
|
+
|
|
5
|
+
## Sau
|
|
6
|
+
- Lượt finalization vẫn **tool-free** + project context (host conformance): lượt cuối không gửi tool definitions và không dispatch tool call. (Thử nghiệm giữ tools để tối ưu cache đã bị revert vì vi phạm conformance.)
|
|
7
|
+
- `OllamaCodingModel` map `promptCache: "supported"` (Ollama báo `prompt_eval_cached_count`).
|
|
8
|
+
- `verifiedSystemPromptUpdate(model)`: mặc định `in-history` cho model đã probe template (`gemma3*`, `deepseek-v4.1-flash*`); còn lại in-place. Option `systemPromptUpdate` luôn thắng.
|
|
9
|
+
- Token ledger thêm `cachedInput`, `cacheHitRate` và luỹ kế phiên (`cumulativeCacheHitRate`); map `prompt_eval_cached_count` → `cachedInputTokens`.
|
|
10
|
+
|
|
11
|
+
## Test hồi quy
|
|
12
|
+
- `test/cache-hit.test.ts`: allowlist verified/unverified, capability override, cumulative ledger.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# 2026-09-26 — Generated-state evidence boundary
|
|
2
|
+
|
|
3
|
+
Vùng: runtime/host
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- Snapshotter coi `dist/`, `coverage/`, build output là durable writes, trong khi evidence verifier bỏ qua chúng. Hai chính sách lệch nhau khiến completion gate đòi validation/diff review cho build output, fingerprint đổi mỗi lần typecheck → run lặp build→xoá→validate tới `maxTurns`.
|
|
7
|
+
|
|
8
|
+
## Sau
|
|
9
|
+
- Policy generated-state **runtime-neutral** (`src/runtime/workspace-generated-path.ts`; adapter `workspace-generated-state.ts` re-export).
|
|
10
|
+
- **Snapshotter** vẫn báo build output (`dist`, `build`, `coverage`, `out`) là **durable host effect** để `run_command` chứng minh mutation nó tạo; chỉ caches/`node_modules`/`*.tsbuildinfo`/`.DS_Store`/`.eslintcache` là derived. Evidence verifier luôn verify active files kể cả trong ignored dir.
|
|
11
|
+
- **Runtime** lọc generated path khỏi **authored evidence** (`session.evidence.writes`) và khỏi `durableAuthoredProgress`: build output không reset no-progress budget cũng không đòi validation/write evidence.
|
|
12
|
+
- Prompt `tool-policy` 2.3.0 (prompt `ai-coder-single/2.8.0`): load first-party skill trước; không pipe khi cần exit code.
|
|
13
|
+
|
|
14
|
+
## Test hồi quy
|
|
15
|
+
- `test/workspace-generated-state.test.ts`: predicate + snapshot durable/derived + fingerprint.
|
|
16
|
+
- `test/dist-smoke.mjs` cập nhật prompt version.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# 2026-09-26 — Failure-injection test cho MCP reconnect
|
|
2
|
+
|
|
3
|
+
Vùng: adapters/mcp
|
|
4
|
+
|
|
5
|
+
## Sau
|
|
6
|
+
- Thêm fixture `test/mcp-crash-fixture.mjs` (tự `process.exit` giữa call) và `test/mcp-reconnect.test.ts`:
|
|
7
|
+
- tool read-only được reconnect + retry và thành công;
|
|
8
|
+
- tool mutating **không** bị retry ngầm, nhưng kết nối được phục hồi cho call sau.
|
|
9
|
+
|
|
10
|
+
## Test hồi quy
|
|
11
|
+
- `npx tsx --test test/mcp-reconnect.test.ts` (2 case).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# 2026-09-26 — Memory hybrid ranking, semantic port và consolidation
|
|
2
|
+
|
|
3
|
+
Vùng: adapters/memory
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- `search` chỉ sắp theo bm25 + updated_at; không có semantic, không có consolidation; vector/embedding không tồn tại.
|
|
7
|
+
|
|
8
|
+
## Sau
|
|
9
|
+
- Xếp hạng hybrid: lexical (FTS5 bm25) + **optional** semantic cosine + recency (half-life 14 ngày) + trust, trên cùng một candidate pool.
|
|
10
|
+
- `AgentEmbeddingPort` (tùy chọn, capability-gated): host cấp provider thì lưu vector `Float32` vào `memory_embeddings(model, dims, vector)`; không có provider thì giữ lexical + recency. Vector được dọn bằng trigger khi xoá memory.
|
|
11
|
+
- Không có lexical hit mà có embedding → fallback về recent active để rank semantic.
|
|
12
|
+
- `consolidate({ keepSupersededRevisions })`: prune revision đã superseded + xoá orphan embedding; port có method tùy chọn.
|
|
13
|
+
- CLI thêm `blackhole memory consolidate`.
|
|
14
|
+
|
|
15
|
+
## Test hồi quy
|
|
16
|
+
- `test/memory-hybrid.test.ts`: trust tie-break, semantic không cần lexical hit, prune superseded, embedding bị xoá khi forget.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 2026-09-26 — Memory recall benchmark
|
|
2
|
+
|
|
3
|
+
Vùng: adapters/memory (test)
|
|
4
|
+
|
|
5
|
+
## Sau
|
|
6
|
+
- Bộ nhãn dùng chung `test/helpers/recall-set.ts`: 8 note tiếng Việt + 8 truy vấn paraphrase/cross-lingual, cùng embedder giả deterministic.
|
|
7
|
+
- `test/memory-recall.test.ts` (offline): so recall@1/@3 lexical vs hybrid+semantic; kết quả đo `lexical@1=0% @3=13%` vs `semantic@1=100% @3=100%`.
|
|
8
|
+
- `test/embedding-live.test.ts` (env-gated) chạy cùng bộ nhãn với model thật; live `bge-m3` cho `lexical@1=0% @3=13%` vs `semantic@1=88% @3=100%`.
|
|
9
|
+
|
|
10
|
+
## Test hồi quy
|
|
11
|
+
- Offline: `test/memory-recall.test.ts`.
|
|
12
|
+
- Live: `GALAXY_LIVE_EMBEDDINGS=1 GALAXY_EMBEDDING_MODEL=bge-m3 GALAXY_EMBEDDING_BASE_URL=http://127.0.0.1:11434 npx tsx --test test/embedding-live.test.ts`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 2026-09-26 — Ollama báo cache; adapter map vào token ledger
|
|
2
|
+
|
|
3
|
+
Vùng: adapters/provider
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- Bộ chuẩn hoá Ollama chỉ đọc `prompt_eval_count`/`eval_count`, bỏ qua cache; tài liệu nội bộ cho rằng Ollama không báo cache-hit.
|
|
7
|
+
|
|
8
|
+
## Sau
|
|
9
|
+
- Ollama >= 0.34 báo cache prefix: native `/api/chat` trả `prompt_eval_cached_count`, `/v1` trả `prompt_tokens_details.cached_tokens` (đã đo trực tiếp với `gemma3:latest`: 24/29 cached).
|
|
10
|
+
- `ollama-chat-stream.ts` map `prompt_eval_cached_count` → `cachedInputTokens` trong usage; `token-ledger` đã có `cachedInput` nên log `trace.token_ledger` giờ hiển thị số cache-hit.
|
|
11
|
+
- ⇒ Cache-hit của H-full **đo được live với Ollama, miễn phí**, không cần adapter DeepSeek-official.
|
|
12
|
+
|
|
13
|
+
## Test hồi quy
|
|
14
|
+
- `test/cache-hit.test.ts`: map `prompt_eval_cached_count` + ledger `cachedInput`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 2026-09-26 — Ollama embedding provider
|
|
2
|
+
|
|
3
|
+
Vùng: adapters/memory/config
|
|
4
|
+
|
|
5
|
+
## Sau
|
|
6
|
+
- `adapters/node/memory/ollama-embeddings.ts`: `OllamaEmbeddings` gọi `/api/embed`, batch ≤64, response bounded 4 MiB, timeout, kiểm tra vector hợp lệ; **không gửi credential tới endpoint localhost**.
|
|
7
|
+
- `ResolvedOllamaConnection` thêm optional `embeddingModel`/`embeddingBaseUrl` đọc từ cùng entry manual.
|
|
8
|
+
- `test/ollama-embeddings.test.ts` (fake fetch): batch, credential localhost vs remote, response lỗi.
|
|
9
|
+
- `test/embedding-live.test.ts` (skip mặc định, bật bằng `GALAXY_LIVE_EMBEDDINGS=1`): semantic recall cho paraphrase tiếng Việt và cross-lingual; đã chạy live với `bge-m3`.
|
|
10
|
+
|
|
11
|
+
## Test hồi quy
|
|
12
|
+
- Deterministic: `test/ollama-embeddings.test.ts`.
|
|
13
|
+
- Live: `GALAXY_LIVE_EMBEDDINGS=1 GALAXY_EMBEDDING_MODEL=bge-m3 GALAXY_EMBEDDING_BASE_URL=http://127.0.0.1:11434 npx tsx --test test/embedding-live.test.ts`.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# 2026-09-26 — Re-record live replay fixture
|
|
2
|
+
|
|
3
|
+
Vùng: testing
|
|
4
|
+
|
|
5
|
+
## Sau
|
|
6
|
+
- `testing/live/recordings/01-write-and-validate.json` được re-record với prompt `ai-coder-single/2.8.0` (contract + recorded bodies). Fixture cũ ghi `2.6.0` nên `recorded-session-replay` báo "Re-record the fixture".
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# 2026-09-26 — Ký số skill index (Ed25519 trust)
|
|
2
|
+
|
|
3
|
+
Vùng: adapters/skills
|
|
4
|
+
|
|
5
|
+
## Sau
|
|
6
|
+
- Index nhận `signature` (base64 Ed25519) trên canonical JSON (key sắp xếp, bỏ `signature`).
|
|
7
|
+
- `SkillMarketplace` nhận `publicKey` (PEM); khi có key thì index **bắt buộc** chữ ký hợp lệ, sai/thiếu bị từ chối (fail-closed). Không key → unsigned chấp nhận.
|
|
8
|
+
- Export `stableSkillIndexJson`, `signSkillIndex`, `verifySkillIndexSignature`; script publisher `scripts/sign-skill-index.mjs`.
|
|
9
|
+
|
|
10
|
+
## Test hồi quy
|
|
11
|
+
- `test/skill-marketplace.test.ts`: ký hợp lệ cài được; tamper/thiếu chữ ký/sai key đều bị từ chối.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# 2026-09-26 — Skill versioning và marketplace
|
|
2
|
+
|
|
3
|
+
Vùng: adapters/skills
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- Skill chỉ có name/description; không version, không cài/update; không có registry.
|
|
7
|
+
|
|
8
|
+
## Sau
|
|
9
|
+
- Frontmatter nhận thêm `version` (semver) và `tags`; `SkillDescriptor` expose `version`/`tags`. Sai định dạng bị từ chối.
|
|
10
|
+
- `SkillMarketplace`: index JSON (schemaVersion 1) từ **path hoặc HTTP(S) URL**; resolve semver (`*`, exact, `^`, `~`); tải nội dung (bounded), **verify sha256**, ghi atomic mode 0600 ngoài workspace; `search/install/update/remove/listInstalled`; chặn downgrade ngầm và path traversal.
|
|
11
|
+
- Vì core là typed ports, marketplace không tự chạy; host cấu hình index.
|
|
12
|
+
|
|
13
|
+
## Test hồi quy
|
|
14
|
+
- `test/skill-marketplace.test.ts`: install/resolve/update/remove, idempotent, verify sha256 (tamper reject), discoverable qua `DirectorySkills`.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# 2026-09-27 — Build output là derived, manifest workspace
|
|
2
|
+
|
|
3
|
+
Vùng: runtime/host
|
|
4
|
+
|
|
5
|
+
## Sau
|
|
6
|
+
- Snapshotter dùng `isGeneratedWorkspacePath(segments)` nên `dist/`, `build/`,
|
|
7
|
+
`coverage/` và `*.tsbuildinfo` được xếp `derived` thay vì `durable write`.
|
|
8
|
+
Validation/diff-review không còn stale khi build sinh lại output — trước đây
|
|
9
|
+
gate lặp tới `maxTurns`.
|
|
10
|
+
- Hợp nhất derived dirs từ `.gitignore` (pattern thư mục) và từ
|
|
11
|
+
`.galaxy/workspace.json` — manifest agent cập nhật khi dự án mở rộng.
|
|
12
|
+
`.galaxy/` là generated state nên ghi manifest không void validation.
|
|
13
|
+
- Prompt nhắc ghi `.galaxy/workspace.json` sau khi validation sinh build output.
|
|
14
|
+
|
|
15
|
+
## Test hồi quy
|
|
16
|
+
- `npm run verify` (core) + `npm test` galaxy-code (90/90).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# 2026-09-28 — Advisory khi lệnh shell trùng check dự án hoặc chạy server
|
|
2
|
+
|
|
3
|
+
Vùng: tools/prompt
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- Model chạy `bun test`/`tsc --noEmit` bằng shell song song với `validate_project`
|
|
7
|
+
— tốn lượt mà **không** sinh completion evidence (3 lần trong một bước E2E).
|
|
8
|
+
- Model tự bật dev server để "chứng minh" dự án chạy được (xem mục 1 của journal).
|
|
9
|
+
|
|
10
|
+
## Sau
|
|
11
|
+
- `command.run` trả advisory khi lệnh là check **toàn dự án** hoặc khi lệnh giống
|
|
12
|
+
server/watch. Advisory của check nói **đúng call cần gọi**, suy ra từ chính lệnh:
|
|
13
|
+
`cd gymflow-backend && bunx tsc --noEmit` ⇒
|
|
14
|
+
`validate_project {"path":"gymflow-backend","checks":["typecheck"]}` (đường dẫn lấy
|
|
15
|
+
từ `cd` trong lệnh, nếu không có thì lấy `cwd` của tool call); nhận cả dạng
|
|
16
|
+
runner `bunx`/`npx`/`pnpx`/`exec`/`dlx`.
|
|
17
|
+
- Lệnh nhắm một file (`bun test src/x.spec.ts`) **không** bị nhắc, vì
|
|
18
|
+
`validate_project` không diễn đạt được; package reference (`vite@latest`) và
|
|
19
|
+
đường dẫn (`assets/vite.svg`) không bị coi là server.
|
|
20
|
+
- Prompt `editing-command-policy` v2.3.0: server nền không phải supervision cũng
|
|
21
|
+
không phải evidence; xoá file probe trước khi validate; không probe API bằng
|
|
22
|
+
`bun -e`/`node -e`.
|
|
23
|
+
|
|
24
|
+
## Test hồi quy
|
|
25
|
+
- `test/command-shape.test.ts`.
|
|
26
|
+
- Incident: galaxy-code/docs/TEST_FAILURE_ANALYSIS.md mục 7, 8, 9.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# 2026-09-28 — Clamp tham số vượt cap thay vì từ chối tool call
|
|
2
|
+
|
|
3
|
+
Vùng: tools/adapter
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- `run_command` với `timeoutMs` > 600000 trả `INVALID_TOOL_ARGUMENTS`
|
|
7
|
+
(`$.timeoutMs lớn hơn maximum=600000.`): cả lệnh không chạy, mất một lượt model,
|
|
8
|
+
dù host luôn tự chặn ở 10 phút.
|
|
9
|
+
|
|
10
|
+
## Sau
|
|
11
|
+
- `clampAiCoderJsonSchemaNumbers` kéo số vượt `maximum` về đúng cap, đi đệ quy
|
|
12
|
+
theo `properties`/`items`/`$ref`, và nối ghi chú
|
|
13
|
+
`Arguments clamped to host limits: …` vào summary trả cho model.
|
|
14
|
+
- Giá trị dưới `minimum`, sai kiểu và mọi vi phạm khác vẫn fail như cũ.
|
|
15
|
+
- Kèm sửa test `contracts.test.ts` còn đọc `input.precondition.kind` sau khi
|
|
16
|
+
precondition thành optional — lỗi này làm `npm run typecheck` (và CI) đỏ ở HEAD.
|
|
17
|
+
|
|
18
|
+
## Test hồi quy
|
|
19
|
+
- `test/json-schema-clamp.test.ts` (5 case), `npm run verify`.
|
|
20
|
+
- Incident: galaxy-code/docs/TEST_FAILURE_ANALYSIS.md mục 2 và 3.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# 2026-09-28 — Fingerprint từng context item mỗi lượt (chẩn đoán cache)
|
|
2
|
+
|
|
3
|
+
Vùng: context/diagnostics
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- `context_diagnostic` chỉ có tổng token theo nhóm; khi cache hit thấp không thể
|
|
7
|
+
biết block nào đổi đã reset prefix cache.
|
|
8
|
+
|
|
9
|
+
## Sau
|
|
10
|
+
- Mỗi lượt ghi thêm `itemDigests` (index, id, kind, tokens, hash theo đúng thứ tự
|
|
11
|
+
gửi, tối đa 24 item) và `toolHash`/`toolTokens` của block tool. Diff hai lượt
|
|
12
|
+
liên tiếp là ra item phá cache — chính cách tìm ra mục 6 của journal.
|
|
13
|
+
- Chỉ thêm dữ liệu chẩn đoán; không đổi cách chọn context hay nội dung prompt.
|
|
14
|
+
|
|
15
|
+
## Test hồi quy
|
|
16
|
+
- `npm run verify`; dùng thực tế trong E2E 2026-09-28.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# 2026-09-28 — Gate không đòi validation cho path đã bị xoá
|
|
2
|
+
|
|
3
|
+
Vùng: runtime/completion-gate
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- Mọi write trong evidence đều bị đòi validation sau nó, kể cả khi path **đã bị xoá**
|
|
7
|
+
trong cùng run. Một bước E2E viết file probe `.e2e-sale-check.ts` để chạy thử
|
|
8
|
+
luồng bán gói rồi xoá đi, và vẫn nhận 2 mục
|
|
9
|
+
`WRITE_NOT_VALIDATED: .e2e-sale-check.ts` ⇒ phải validate lại vô ích.
|
|
10
|
+
|
|
11
|
+
## Sau
|
|
12
|
+
- `removedPaths` = các path có `afterHash === null` (đã xoá); write tới path đó
|
|
13
|
+
(hoặc chính write xoá) **không** còn đòi validation. Kiểm tra
|
|
14
|
+
`WRITE_EVIDENCE_INVALID` vẫn áp dụng cho mọi write như cũ.
|
|
15
|
+
- Không nới lỏng gì khác: write còn tồn tại vẫn phải có validation sau nó.
|
|
16
|
+
|
|
17
|
+
## Test hồi quy
|
|
18
|
+
- `test/completion-gate-scope.test.ts`: "a path written and then removed does not
|
|
19
|
+
demand validation".
|
|
20
|
+
- Incident: galaxy-code/docs/TEST_FAILURE_ANALYSIS.md mục 11.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# 2026-09-28 — Hết ngân sách lượt thì finalize một lượt trước khi fail
|
|
2
|
+
|
|
3
|
+
Vùng: runtime
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- Chạm `maxTurns` là ném `MAX_TURNS` ngay, kể cả khi evidence đã đủ: một bước E2E
|
|
7
|
+
fail với `reached maxTurns=48` ngay sau khi tool cuối trả "Project validation
|
|
8
|
+
passed" (11 validation pass, 21 mutation, hai call cuối là review → validate).
|
|
9
|
+
- CLI không có cách nâng trần, deadline host còn bị hard-code 15 phút.
|
|
10
|
+
|
|
11
|
+
## Sau
|
|
12
|
+
- Hết lượt ⇒ cấp **đúng một lượt finalization không tool** để model báo cáo trạng
|
|
13
|
+
thái đã có; completion gate vẫn là bên quyết định; hết lượt lần hai mới fail
|
|
14
|
+
`MAX_TURNS`. Có trace `policy_decision: budget_finalization_turn`.
|
|
15
|
+
- CLI thêm `--max-turns <n>` và `--run-minutes <n>`; budget controller được canh
|
|
16
|
+
thẳng với deadline host.
|
|
17
|
+
|
|
18
|
+
## Test hồi quy
|
|
19
|
+
- `npm run verify` (core) + `npm run check` (galaxy-code, test parse flag).
|
|
20
|
+
- Incident: galaxy-code/docs/TEST_FAILURE_ANALYSIS.md mục 5.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# 2026-09-28 — project.validate ghi đúng phạm vi theo project path
|
|
2
|
+
|
|
3
|
+
Vùng: tools/executor
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- Mọi validation sinh từ `project.validate` đều được ghi `scope: "workspace"`,
|
|
7
|
+
kể cả khi check chạy trong một subproject (`path: "frontend"`), và không kèm
|
|
8
|
+
`paths`. Hệ quả: gate coi nó bao phủ cả workspace nên **một write ở package
|
|
9
|
+
khác** cũng void (đo được: sửa `backend/` làm stale `lint:frontend` và
|
|
10
|
+
`build:frontend`, buộc validate lại toàn bộ — mất nguyên một vòng).
|
|
11
|
+
- Vì `paths` luôn rỗng, quy tắc staleness theo phạm vi ở gate không có tác dụng
|
|
12
|
+
với evidence thật.
|
|
13
|
+
|
|
14
|
+
## Sau
|
|
15
|
+
- `validationScopeForProjectPath(projectPath)`: `"."`/`""` ⇒ `scope: "workspace"`
|
|
16
|
+
(vẫn nghiêm ngặt như cũ); subproject ⇒ `scope: "paths"`, `paths: [<path đã
|
|
17
|
+
chuẩn hoá>]`.
|
|
18
|
+
- Gate nhờ đó chỉ vô hiệu validation khi chính subproject đó bị sửa.
|
|
19
|
+
|
|
20
|
+
## Test hồi quy
|
|
21
|
+
- `test/validation-scope.test.ts` + `test/completion-gate-scope.test.ts`.
|
|
22
|
+
- Incident: galaxy-code/docs/TEST_FAILURE_ANALYSIS.md mục 4 (bổ sung).
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# 2026-09-28 — Validation chỉ stale theo phạm vi nó bao phủ
|
|
2
|
+
|
|
3
|
+
Vùng: runtime/completion-gate
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- Gate so fingerprint **toàn workspace**, nên viết `README.md` hay sửa package
|
|
7
|
+
khác cũng void **mọi** validation ⇒ bắt validate lại (một ngày chạy: 21
|
|
8
|
+
write-sau-validation, 5 lần chặn `WORKSPACE_EVIDENCE_STALE`, 340 mục
|
|
9
|
+
`WRITE_NOT_VALIDATED`).
|
|
10
|
+
|
|
11
|
+
## Sau
|
|
12
|
+
- Validation chỉ bị void khi có **write trong phạm vi nó bao phủ** sau nó.
|
|
13
|
+
- Write tài liệu (`.md/.mdx/.txt`, `docs/`, LICENSE/CHANGELOG) không đòi và
|
|
14
|
+
không void validation.
|
|
15
|
+
- Nếu fingerprint workspace lệch mà **không hoạt động nào giải thích được** (thay
|
|
16
|
+
đổi ngoài luồng) thì mọi validation vẫn bị void; scope `workspace` vẫn nghiêm
|
|
17
|
+
ngặt như cũ.
|
|
18
|
+
|
|
19
|
+
## Test hồi quy
|
|
20
|
+
- `test/completion-gate-scope.test.ts` (6 case) + test staleness cũ trong
|
|
21
|
+
`test/runtime.test.ts`.
|
|
22
|
+
- Incident: galaxy-code/docs/TEST_FAILURE_ANALYSIS.md mục 4.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 2026-09-28 — Lỗi guard dependency nói rõ đường đọc được phép
|
|
2
|
+
|
|
3
|
+
Vùng: host/workspace-port
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- `readText` trong `node_modules` đã cho phép `package.json`, `README.md`,
|
|
7
|
+
`*.d.ts` (đúng như orbit-mcp docs mô tả: "đọc .d.ts và package.json trong
|
|
8
|
+
node_modules (được phép) — KHÔNG grep cả cây"), nhưng `searchText`/`searchPaths`
|
|
9
|
+
bị chặn bằng message chung *"không đọc source thư viện bằng file tools"*.
|
|
10
|
+
- Hệ quả đo được: model thử lại grep/glob 8 lần trong chiến dịch E2E — đây là mã
|
|
11
|
+
lỗi tool **nhiều nhất**, mỗi lần mất một lượt, vì message không nói rằng đọc
|
|
12
|
+
thẳng một file `.d.ts` là hợp lệ.
|
|
13
|
+
|
|
14
|
+
## Sau
|
|
15
|
+
- `dependencySearchError` cho search/glob: nói rõ grep/glob cả cây không được phép
|
|
16
|
+
**và** `read_file` trên `package.json`/`README.md`/`*.d.ts` trong node_modules
|
|
17
|
+
thì hợp lệ; suggestedAction trỏ về MCP tools/skill docs.
|
|
18
|
+
- Không nới quyền đọc source: `.js`/`.mjs`/`.cjs` vẫn bị chặn như cũ.
|
|
19
|
+
|
|
20
|
+
## Test hồi quy
|
|
21
|
+
- `test/workspace-generated-state.test.ts`: "dependency trees allow ground-truth
|
|
22
|
+
reads but refuse search and glob".
|
|
23
|
+
- Incident: galaxy-code/docs/TEST_FAILURE_ANALYSIS.md mục "không phải lỗi" (guard
|
|
24
|
+
node_modules) — nay có hướng dẫn đúng trong message.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# 2026-09-28 — Đặt run state đổi-mỗi-lượt ra sau prefix ổn định (cache)
|
|
2
|
+
|
|
3
|
+
Vùng: context/runtime
|
|
4
|
+
|
|
5
|
+
## Trước
|
|
6
|
+
- `runtime-mandatory-state` (turn budget, editedFiles, phase, nextAction — viết
|
|
7
|
+
lại mỗi lượt) nằm ở thứ tự mặc định của checkpoint, ngay sau system prompt.
|
|
8
|
+
- Đo trên E2E: item này **đổi đầu tiên trên 38/40 lượt**, `cachedInput` kẹt ở
|
|
9
|
+
10.752 token suốt 17 lượt dù context tăng tới 60–90k ⇒ cache hit 40%, 1,42M
|
|
10
|
+
token bị tính lại.
|
|
11
|
+
|
|
12
|
+
## Sau
|
|
13
|
+
- Block đó mang `physicalOrder` muộn (sau history, ngay trước message của lượt
|
|
14
|
+
mới) nên toàn bộ prefix ổn định (policy, goal, checkpoint, files, tools, history)
|
|
15
|
+
vẫn cache được; đo lại: 40% → 61% toàn run, bước 1 từ 10% → 59–73%.
|
|
16
|
+
|
|
17
|
+
## Test hồi quy
|
|
18
|
+
- `test/context.test.ts`: "the mutable mandatory state is ordered after the stable
|
|
19
|
+
prefix".
|
|
20
|
+
- Incident: galaxy-code/docs/TEST_FAILURE_ANALYSIS.md mục 6.
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,76 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
Times are recorded in Asia/Ho_Chi_Minh (+07:00). Per-fix fragments are filed in
|
|
8
8
|
[CHANGELOG.d](CHANGELOG.d/README.md) and compiled here at release time.
|
|
9
9
|
|
|
10
|
+
## [0.3.0] - 2026-09-28 23:10 +07:00
|
|
11
|
+
|
|
12
|
+
First verified stable line: the 25-prompt end-to-end flow completes with this
|
|
13
|
+
runtime. The failure journal that drove the changes below lives in
|
|
14
|
+
`galaxy-code/docs/TEST_FAILURE_ANALYSIS.md`.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Prompt-cache layout: the mutable run state moved after the stable prefix, so a turn
|
|
19
|
+
re-bills only its tail (measured run-wide 40% → 61%, per step 10% → 59–87%).
|
|
20
|
+
- `project.validate` records the scope it really covered, so a check in one package
|
|
21
|
+
is no longer invalidated by a write in a sibling package.
|
|
22
|
+
- The completion gate is scope-aware: documentation writes need no validation, a path
|
|
23
|
+
written and then removed needs none either, and untracked workspace drift still
|
|
24
|
+
voids every validation.
|
|
25
|
+
- Reaching the turn budget grants one tool-free finalization turn instead of failing a
|
|
26
|
+
run whose evidence is already satisfied; `maxTurns` and the host deadline are
|
|
27
|
+
configurable through the CLI.
|
|
28
|
+
- Arguments above a schema cap are clamped and reported rather than rejected; a
|
|
29
|
+
shell-run project check and a long-running server answer with an advisory that names
|
|
30
|
+
the exact `validate_project` call; a refused dependency search names the read that
|
|
31
|
+
is allowed.
|
|
32
|
+
- `context_diagnostic` fingerprints every context item and the tool block each turn —
|
|
33
|
+
that is how the cache regression above was found.
|
|
34
|
+
|
|
35
|
+
<details>
|
|
36
|
+
<summary>Per-fix trail: 39 fragments (2026-09-19 … 2026-09-28)</summary>
|
|
37
|
+
|
|
38
|
+
- Advisory guard policy cho observation (2026-09-19 00:15 +07:00) (core). [fragment](CHANGELOG.d/2026-09-19-advisory-guard-policy.md)
|
|
39
|
+
- Sửa parser citation bị nhiễu Markdown (2026-09-19 11:55 +07:00) (core). [fragment](CHANGELOG.d/2026-09-19-research-citation-parsing.md)
|
|
40
|
+
- Lưu evidence khi citation bị từ chối (2026-09-19 23:15 +07:00) (core). [fragment](CHANGELOG.d/2026-09-19-research-rejection-evidence.md)
|
|
41
|
+
- Node test reporter ghi nhật ký (2026-09-18 23:45 +07:00) (core). [fragment](CHANGELOG.d/2026-09-19-test-journal-reporter.md)
|
|
42
|
+
- Remediation cho RESEARCH_EVIDENCE_MISSING (2026-09-21 02:20 +07:00) (core). [fragment](CHANGELOG.d/2026-09-21-evidence-missing-remediation.md)
|
|
43
|
+
- Nudge nhận diện bằng arguments hash (2026-09-21 00:55 +07:00) (core). [fragment](CHANGELOG.d/2026-09-21-observation-nudge-context.md)
|
|
44
|
+
- Retry delay theo scenario budget + deadline-aware skip (2026-09-22 07:25 +07:00) (core). [fragment](CHANGELOG.d/2026-09-22-model-retry-budget.md)
|
|
45
|
+
- Recovery turn trước no-progress pause (2026-09-22 01:07 +07:00) (core). [fragment](CHANGELOG.d/2026-09-22-no-progress-recovery-turn.md)
|
|
46
|
+
- Agent platform foundation (core). [fragment](CHANGELOG.d/2026-09-23-agent-platform.md)
|
|
47
|
+
- # 0.3.0-alpha.7 — 2026-09-23 07:00 +07:00 (core). [fragment](CHANGELOG.d/2026-09-23-conservative-output-reserve.md)
|
|
48
|
+
- Request-scoped approvals and scratch workspace review (core). [fragment](CHANGELOG.d/2026-09-24-approval-workspace-review.md)
|
|
49
|
+
- Incremental Ollama streaming (core). [fragment](CHANGELOG.d/2026-09-24-incremental-ollama.md)
|
|
50
|
+
- Tail-anchored tool output bounding (core). [fragment](CHANGELOG.d/2026-09-25-tail-anchored-bounding.md)
|
|
51
|
+
- Binary review không chặn, pipe guidance, test finalization (adapters/tools, prompt, runtime/test). [fragment](CHANGELOG.d/2026-09-26-binary-review-pipe-guidance-finalization-test.md)
|
|
52
|
+
- Cache capability và MCP reconnect (runtime/prompt/adapters). [fragment](CHANGELOG.d/2026-09-26-cache-capability-and-mcp-reconnect.md)
|
|
53
|
+
- Cache-hit (prefix reuse) harness (runtime/prompt). [fragment](CHANGELOG.d/2026-09-26-cache-hit-harness.md)
|
|
54
|
+
- Cache hit rate, token_ledger event, và systemPromptUpdate option (runtime/context/adapters). [fragment](CHANGELOG.d/2026-09-26-cache-hit-rate-and-inhistory-option.md)
|
|
55
|
+
- Cache hit luỹ kế (context/runtime). [fragment](CHANGELOG.d/2026-09-26-cumulative-cache-hit.md)
|
|
56
|
+
- Default model: deepseek-v4.1-flash:cloud (core). [fragment](CHANGELOG.d/2026-09-26-default-model-deepseek.md)
|
|
57
|
+
- Finalization tool-free, allowlist in-history, cache accounting (runtime/adapters/context). [fragment](CHANGELOG.d/2026-09-26-finalization-prefix-and-verified-inhistory.md)
|
|
58
|
+
- Generated-state evidence boundary (runtime/host). [fragment](CHANGELOG.d/2026-09-26-generated-state-and-churn-guard.md)
|
|
59
|
+
- Failure-injection test cho MCP reconnect (adapters/mcp). [fragment](CHANGELOG.d/2026-09-26-mcp-reconnect-fixture.md)
|
|
60
|
+
- Memory hybrid ranking, semantic port và consolidation (adapters/memory). [fragment](CHANGELOG.d/2026-09-26-memory-hybrid-semantic-consolidation.md)
|
|
61
|
+
- Memory recall benchmark (adapters/memory (test)). [fragment](CHANGELOG.d/2026-09-26-memory-recall-benchmark.md)
|
|
62
|
+
- Ollama báo cache; adapter map vào token ledger (adapters/provider). [fragment](CHANGELOG.d/2026-09-26-ollama-cache-usage.md)
|
|
63
|
+
- Ollama embedding provider (adapters/memory/config). [fragment](CHANGELOG.d/2026-09-26-ollama-embeddings-provider.md)
|
|
64
|
+
- Re-record live replay fixture (testing). [fragment](CHANGELOG.d/2026-09-26-rerecord-live-fixture.md)
|
|
65
|
+
- Ký số skill index (Ed25519 trust) (adapters/skills). [fragment](CHANGELOG.d/2026-09-26-skill-index-signing.md)
|
|
66
|
+
- Skill versioning và marketplace (adapters/skills). [fragment](CHANGELOG.d/2026-09-26-skill-version-and-marketplace.md)
|
|
67
|
+
- Build output là derived, manifest workspace (runtime/host). [fragment](CHANGELOG.d/2026-09-27-workspace-derived-build-output.md)
|
|
68
|
+
- Advisory khi lệnh shell trùng check dự án hoặc chạy server (tools/prompt). [fragment](CHANGELOG.d/2026-09-28-advisory-lenh-check-va-server.md)
|
|
69
|
+
- Clamp tham số vượt cap thay vì từ chối tool call (tools/adapter). [fragment](CHANGELOG.d/2026-09-28-clamp-tham-so-vuot-cap.md)
|
|
70
|
+
- Fingerprint từng context item mỗi lượt (chẩn đoán cache) (context/diagnostics). [fragment](CHANGELOG.d/2026-09-28-digest-context-item.md)
|
|
71
|
+
- Gate không đòi validation cho path đã bị xoá (runtime/completion-gate). [fragment](CHANGELOG.d/2026-09-28-gate-bo-qua-path-da-xoa.md)
|
|
72
|
+
- Hết ngân sách lượt thì finalize một lượt trước khi fail (runtime). [fragment](CHANGELOG.d/2026-09-28-ngan-sach-luot-finalization.md)
|
|
73
|
+
- project.validate ghi đúng phạm vi theo project path (tools/executor). [fragment](CHANGELOG.d/2026-09-28-scope-cua-project-validate.md)
|
|
74
|
+
- Validation chỉ stale theo phạm vi nó bao phủ (runtime/completion-gate). [fragment](CHANGELOG.d/2026-09-28-staleness-theo-pham-vi.md)
|
|
75
|
+
- Lỗi guard dependency nói rõ đường đọc được phép (host/workspace-port). [fragment](CHANGELOG.d/2026-09-28-thong-bao-guard-dependency.md)
|
|
76
|
+
- Đặt run state đổi-mỗi-lượt ra sau prefix ổn định (cache) (context/runtime). [fragment](CHANGELOG.d/2026-09-28-thu-tu-mandatory-state-cache.md)
|
|
77
|
+
|
|
78
|
+
</details>
|
|
79
|
+
|
|
10
80
|
## [0.3.0-alpha.7] - 2026-09-23 07:00 +07:00
|
|
11
81
|
|
|
12
82
|
### Fixed
|
|
@@ -88,7 +158,7 @@ this version; the internal working versions `0.2.0`–`0.2.2` were never publish
|
|
|
88
158
|
- Configurable observation guard policy:
|
|
89
159
|
- `AiCoderRunBudget.noProgressPolicy`: `advisory` (default) and `strict`.
|
|
90
160
|
- `AiCoderRunBudget.observationNudgeThresholds` (default `[3, 5, 8]`,
|
|
91
|
-
following the
|
|
161
|
+
following the upstream DSH `repeat-tool-reminder` design): escalating
|
|
92
162
|
trusted nudges for repeated read-only observations; blocking only after the
|
|
93
163
|
final threshold. Advisory nudges no longer count toward
|
|
94
164
|
`maxNoProgressEpisodes`; the `strict` policy preserves the older
|
package/README.md
CHANGED
|
@@ -23,12 +23,12 @@ sessions, and subagents are outside the current runtime baseline.
|
|
|
23
23
|
|
|
24
24
|
## Versioning and release policy
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
Work in progress keeps an explicit semver pre-release tag (`x.y.z-alpha.N`) and
|
|
27
|
+
publishes under the `alpha` dist tag, so `latest` never moves on unverified work.
|
|
28
|
+
A plain `x.y.z` is a **verified** line: it ships only once the 25-prompt
|
|
29
|
+
end-to-end flow completes against it, and its fixes are journalled in
|
|
30
|
+
`galaxy-code/docs/TEST_FAILURE_ANALYSIS.md`. `1.0.0` remains the API-stability
|
|
31
|
+
milestone; `0.y.z` may still change shape before then.
|
|
32
32
|
|
|
33
33
|
Every behavior- or API-level fix lands in [CHANGELOG.d](CHANGELOG.d/README.md)
|
|
34
34
|
as a dated fragment (date, time, area, before/after, regression requirement)
|
|
@@ -41,15 +41,15 @@ token): every push to `main` runs the conformance gate and
|
|
|
41
41
|
[.github/workflows/publish.yml](.github/workflows/publish.yml) publishes the
|
|
42
42
|
package only when `package.json` carries a version that npm does not have yet.
|
|
43
43
|
Pre-release versions publish under the `alpha` dist tag, so
|
|
44
|
-
`npm install @galaxy-stack/ai-coder-core@latest`
|
|
45
|
-
|
|
44
|
+
`npm install @galaxy-stack/ai-coder-core@latest` only ever lands on a verified
|
|
45
|
+
line.
|
|
46
46
|
|
|
47
47
|
## Installation
|
|
48
48
|
|
|
49
|
-
Install the
|
|
50
|
-
on the last non-alpha release:
|
|
49
|
+
Install the verified line, or track development explicitly:
|
|
51
50
|
|
|
52
51
|
```sh
|
|
52
|
+
npm install @galaxy-stack/ai-coder-core
|
|
53
53
|
npm install @galaxy-stack/ai-coder-core@alpha
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -4,6 +4,9 @@ export interface ResolvedOllamaConnection {
|
|
|
4
4
|
readonly baseUrl: string;
|
|
5
5
|
readonly configPath: string;
|
|
6
6
|
readonly credentialSource: CredentialSource;
|
|
7
|
+
/** Optional embedding model + endpoint declared by the same manual entry. */
|
|
8
|
+
readonly embeddingBaseUrl?: string;
|
|
9
|
+
readonly embeddingModel?: string;
|
|
7
10
|
readonly model: string;
|
|
8
11
|
}
|
|
9
12
|
export interface ResolveOllamaConnectionOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual-provider-config.d.ts","sourceRoot":"","sources":["../../../../src/adapters/node/config/manual-provider-config.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG,eAAe,GAAG,MAAM,CAAC;AAExE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IACpE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAkDD,wBAAsB,uBAAuB,CAC3C,OAAO,GAAE,8BAAmC,GAC3C,OAAO,CAAC,wBAAwB,CAAC,
|
|
1
|
+
{"version":3,"file":"manual-provider-config.d.ts","sourceRoot":"","sources":["../../../../src/adapters/node/config/manual-provider-config.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG,eAAe,GAAG,MAAM,CAAC;AAExE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,6EAA6E;IAC7E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IACpE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAkDD,wBAAsB,uBAAuB,CAC3C,OAAO,GAAE,8BAAmC,GAC3C,OAAO,CAAC,wBAAwB,CAAC,CA+BnC;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,wBAAwB,GACnC,IAAI,CAAC,wBAAwB,EAAE,QAAQ,GAAG,YAAY,CAAC,GAAG,QAAQ,CAAC;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAO5F"}
|
|
@@ -72,11 +72,15 @@ export async function resolveOllamaConnection(options = {}) {
|
|
|
72
72
|
?? DEFAULT_AI_CODER_CORE_SETTINGS.singleAgent.model;
|
|
73
73
|
if (model.trim().length === 0)
|
|
74
74
|
throw new Error("Ollama model must be non-empty.");
|
|
75
|
+
const embeddingModel = optionalNonEmpty(manual?.embeddingModel);
|
|
76
|
+
const embeddingBaseUrl = optionalNonEmpty(manual?.embeddingBaseUrl);
|
|
75
77
|
return Object.freeze({
|
|
76
78
|
...(apiKey === undefined ? {} : { apiKey }),
|
|
77
79
|
baseUrl,
|
|
78
80
|
configPath,
|
|
79
81
|
credentialSource,
|
|
82
|
+
...(embeddingModel === undefined ? {} : { embeddingModel }),
|
|
83
|
+
...(embeddingBaseUrl === undefined ? {} : { embeddingBaseUrl: safeProviderBaseUrl(embeddingBaseUrl) }),
|
|
80
84
|
model: model.trim(),
|
|
81
85
|
});
|
|
82
86
|
}
|