Commit Graph
48 Commits
Author SHA1 Message Date
weichen 4075cc6501 Point backend at the merged N1 ask-loop and Policy increment
ci / vet-and-test (pull_request) Successful in 38s
Why: Library PR #17 landed on agent-native main as c2befaf; backend
compiles with the merged combination, not the pre-merge branch head.

Evidence: go vet and full go test run next; native main ancestry of
9758a8d verified before the pin bump.

Impact: Nested agent-native pin only.
2026-10-07 04:37:43 +00:00
weichen 17f7e2b168 Wire the permission ask port to HITL and adopt the Policy object
ci / vet-and-test (pull_request) Successful in 40s
Why: N1 WP2/WP3 host side - the kernel ask loop must reach the HITL
confirm card, and tool gating should run through the typed Policy with
the session-allow store port instead of a hand-built Request.

Evidence: go vet clean; go test ./... all packages ok, including new
TestConvAllowStoreKeysByName, TestPermissionAskRoutesToHITL, and
permissionAskOf tests. Nested agent-native pin at 9758a8d (PR #17).

Impact: runmgr.ExecuteTool decides via agentpolicy.Policy with
convAllowStore (keying unchanged: conversation x tool name);
runCtx.PermissionAsk routes kernel asks to the shared toolConfirmCard
HITL; direct and subagent loops pass PermissionAsk into the kernel
config (nil for hosts without the method, preserving legacy ask=reject).

Refs: Documents proposal 2026-10-07-agent-stack-n1q1i1-plans.md WP2/WP3; Agent-Native PR #17
2026-10-07 04:04:10 +00:00
weichenandCursor c05832dd6a Pin agent-system-core after the contract type cleanup
ci / vet-and-test (pull_request) Successful in 43s
Why: Dev and the backend checkout must name the same core commit, and the section type is no longer a separate export.
Evidence: modules/core is 0b5c774. The nested checkout is detached at that commit.
Impact: Backend still compiles the same Go observation type. Only the TypeScript export changed.
Refs: .task/feature-sillytavern-review.md
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-04 18:36:58 +00:00
weichen 8c7f3d9a7e Pin agent-squad to the shared agent-native commit
Why: The pin check requires Backend's squad gitlink to match Dev, and that squad commit must itself pin the message-shaping agent-native.
Evidence: Squad commit 5a57636 points agent-native at 3a110a7.
Impact: Backend and Dev resolve the same squad and native trees.
Refs: docs/records/2026-10-04-sillytavern-review.md
2026-10-04 18:28:30 +00:00
weichen 42cca8fade Store secrets apart from settings and assemble context at the end
Why: Masks must not be the only copy of a key, and personal instructions, lore hits, and candidate replies have to reach the model without rewriting the system prefix or deleting history.
Evidence: go test ./internal/store ./internal/ctxasm ./internal/settings ./internal/runtime ./internal/server. Migration v16 upgrades and rolls back. Startup snapshots settings before moving raw keys.
Impact: One labeled key is active per service. Excluding a message hides its whole run from the model. Regenerating appends another candidate and rewinds files to the user turn. User slash commands expand to prompt text and do not fire on their own.
Refs: docs/records/2026-10-04-sillytavern-review.md
2026-10-04 18:20:10 +00:00
weichenandCursor cd57276f1c Run tool scripts through the shared host and keep orchestration off
ci / vet-and-test (pull_request) Successful in 39s
Why: workflow scripts and run_tool_script should share one Python host, while a slow MCP server must not block the first prompt.
Evidence: GOWORK=off go test ./internal/runtime/ ./internal/app/ ./internal/settings/ ./internal/tools/ ./internal/runmgr/
Impact: runtime.codeOrchestration defaults to false, so the tool stays hidden. Workflow script confirmation and its longer timeout cap stay as they were.
Refs: feature/code-orchestration
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 18:04:25 +00:00
weichenandCursor bead03374e Rewind tracked files and fall back before the first token
ci / vet-and-test (pull_request) Successful in 39s
Why: workspace writes had no checkpoint, and a 5xx before any output stopped the turn instead of trying the next configured model.
Evidence: GOWORK=off go test ./internal/runtime/ ./internal/runmgr/ ./internal/tools/ ./internal/settings/ ./internal/server/ ./internal/app/
Impact: models.chat.fallbacks defaults to empty, so existing runs keep their model. Rewind restores only tracked writes and appends a system note. Usage records the model that served.
Refs: feature/durable-rewind
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 17:31:56 +00:00
weichenandCursor ce95cd1355 Pin rebased native, squad, and core permission commits
ci / vet-and-test (pull_request) Successful in 40s
Why: Those three branches were replayed onto origin/main after the first pin.
Evidence: native 0a52d9f, squad beea97e, and core cf7df54 each contain origin/main.
Impact: The backend build uses the same commits that will be merged.
Refs: feature/permission-hooks
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 17:02:47 +00:00
weichenandCursor 6b0ff49f34 Gate tools by session mode and show confirmation details
Why: Plan mode has to block writes, confirmations dropped the argument preview, and direct chat did not share its stop gate with squad members.
Evidence: GOWORK=off go test ./internal/store/ ./internal/tools/ ./internal/runmgr/ ./internal/runtime/ ./internal/server/ passed. Default mode still runs write_artifact; plan mode rejects it.
Impact: Empty permission mode keeps the profile allow, deny, and confirm lists. High-risk shell commands now ask. There is no bypass-all mode.
Refs: feature/permission-hooks
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 17:01:46 +00:00
weichenandCursor b2dc9a7e0b Pin agent-squad to the context-engineering native
ci / vet-and-test (pull_request) Successful in 38s
Why: The pin check requires backend's squad gitlink to match the Dev pin, and that squad commit carries the native context-engineering loop.
Evidence: deps/agent-squad is 4d53450, whose agent-native gitlink is 6fd1d44.
Impact: No backend behavior change beyond the shared native loop.
Refs: feature/context-engineering
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 16:22:32 +00:00
weichenandCursor 78ce78a7d3 Cap tool results by character and gate stale file writes
Why: Byte truncation split UTF-8, subagent results could return unbounded text, and a write could overwrite a file that changed after it was read.
Evidence: cutRunes keeps a two-character Chinese prefix; tool selection honors -name; checklist reminders go through the reminder bus.
Impact: Tool output limits count characters. A subagent result over 32000 characters is stored as an artifact and the parent sees the path. fs_write_file rejects an existing file that was not read in this run.
Refs: feature/context-engineering
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 16:21:02 +00:00
weichenandCursor 93adb93b9d Retry direct model calls before the first delta
ci / vet-and-test (pull_request) Successful in 40s
Why: The direct path never retried provider timeouts, so a single 429 failed the run.
Evidence: go test ./internal/settings/ ./internal/runtime/ passed. Default runtime.llmRetries is 2.
Impact: Retries happen only when the stream has not forwarded a delta. Injected test streams are not wrapped.
Refs: feature/llm-robustness
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 15:53:42 +00:00
weichen 0a9a9776d6 Pin native and squad to the SSE abort fix
ci / vet-and-test (pull_request) Successful in 42s
Why: Backend's nested checkouts have to match the native head that treats a cancelled stream as aborted.
Evidence: gitlinks only. The race test passed on d84a67c.
Impact: no Backend source change.
Refs: D1
2026-10-03 13:52:01 +00:00
weichen 5d0097d145 Pin native and squad to the aligned D1 heads
ci / vet-and-test (pull_request) Successful in 5m44s
Why: Backend's nested checkouts have to match the intent, native, and squad commits Dev will pin.
Evidence: gitlinks only. Internal package tests passed before this pointer move.
Impact: no Backend source change.
Refs: D1
2026-10-03 13:45:23 +00:00
weichenandCursor aa969aa747 Pin agent-squad to the adapter-only intent import
Why: Backend must build against the squad head that keeps agent-intent inside adapters/intent.
Evidence: the previous internal package tests passed on a182d76; this commit only moves the gitlink to f68e5bd.
Impact: no Backend source change.
Refs: D1
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 13:43:09 +00:00
weichenandCursor b8e8cfb754 Wire the squad native adapter instead of the core registration
Why: Backend has to keep the same squad runs after the core stopped importing agent-native. The adapter module owns the concrete client.
Evidence: GOWORK=off go test -count=1 ./internal/... passed.
Impact: AgentNativeOptions now returns the adapter config. Default roles still use the agent-system backend.
Refs: D1
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 13:42:04 +00:00
weichenandCursor 6e30569cab Pin agent-native and agent-squad to the summed R2 heads
ci / vet-and-test (pull_request) Successful in 41s
Why: native 855fe41 records the golang.org/x/text sum that intent's NFKC import needs, and squad 31ee395 pins that native commit.
Evidence: GOWORK=off go vet ./internal/squadadapter/ ./internal/app/ passed against these heads.
Impact: two gitlinks move. Backend product code is unchanged.
Refs: I4
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 13:13:58 +00:00
weichenandCursor a494375d58 Pin the three agent libraries to their R2 heads
ci / vet-and-test (pull_request) Successful in 42s
Why: backend must run against the intent, native, and squad commits that close this batch.
Evidence: agent-intent 05e74d8, agent-native 11d1a76, and agent-squad 1bb0c3a are the feature/agent-stack-r2 heads.
Impact: gitlinks move; backend product code is unchanged.
Refs: R2 pin
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 13:10:50 +00:00
weichenandCursor ef0a1bef0f Pin the three agent libraries to their pull request heads
ci / vet-and-test (pull_request) Failing after 4s
Why: Backend must call the library commits that include the hold fixes and the CI checkout change.
Evidence: intent 7f7879b06b053f0a62746309b79e0e1b9a00f42d, native 91c155618487e21edeb4f1d3cc27e985aae2b0d2, squad e928ea3c0fa649cbbbad22a93a1bc0a12dee5f7d.
Impact: The three gitlinks match the open pull request heads. Other pins are unchanged.
Refs: feature/agent-stack-r0-r1
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 10:20:54 +00:00
weichenandCursor 898fdd1371 Align library pins with the stack repair commits
Why: Backend still built against the pre-repair intent, native, and squad commits, so the host would not see the closed P0 and HTTP guard fixes.
Evidence: GOWORK=off go test -count=1 ./... passed with no code changes.
Impact: The backend module now tracks the same intent, native, squad, error-code, and logging commits as the Dev integration pins.
Refs: R1-d
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 01:54:27 +00:00
weichenandCursor a506e137f6 Compose a separate final reply after the work loop
Why: End-of-turn checks were injected as user messages, so the model answered the checker instead of the user, and the last draft was treated as the reply.
Evidence: go test ./internal/runtime/ ./internal/prompts/ ./internal/settings/ ./internal/ctxasm/
Impact: Rejections are system reminders. A main-model compose step writes the user-facing reply when tools were used. Deliverable cards stay after that reply.
Refs: feature/final-reply-compose
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 13:37:54 +00:00
weichenandCursor cd74434b4f Stream tool progress and drop hard agent limits
Why: Tool calls stayed invisible until execution finished, and turn, tool, timeout, and output caps stopped long tasks early.
Evidence: go test ./internal/runtime/ ./internal/tools/ ./internal/prompts/ ./internal/squadadapter/ ./internal/runmgr/ ./internal/app/ ./internal/settings/
Impact: tool.call.delta and tool.output reach the client; default profile, subagents, and squad no longer cap turns or tool calls; exec timeout defaults to 600s with no hard ceiling. A profile or subagent maxTurns above 0 still applies.
Refs: feature/stream-display-overhaul
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 02:17:02 +00:00
weichenandCursor 63ea1a262c Register plugin workflows and drop them on uninstall
Why: Intent routing needs a registry of workflow definitions, and uninstall was leaving intents and workflows in place.
Evidence: go test ./internal/workflow/ ./internal/plugins/ ./internal/app/ passed. Validation rejects duplicate ids, unknown kinds, denied tools, and both step caps. Unregister clears the registry and the intent gate.
Impact: Script steps must stay inside the plugin directory. The server holds the registry for later routing.
Refs: feature/agent-harness-p4
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 15:59:54 +00:00
weichenandCursor 46ce1b2c8e Let subagents run in the background and be reviewed
Why: A parent turn should be able to finish while children keep working, and a review should keep only findings that a second pass confirms. Users also need to override a profile's tools, model, and turn cap without adding dispatch tools.
Evidence: go test ./... passed. New cases cover overlay rejection, role mapping, queued notices, and dropping FAIL or unparsed findings.
Impact: Notices live only in memory, and each conversation allows three background children. Squad writer steps now use the writer profile.
Refs: feature/agent-harness-p3b
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 15:29:01 +00:00
weichenandCursor cfcf95d335 Run direct chat through the native turn loop
Why: deliverable checks, truncation continuation, and tool budgets should live in one loop instead of a second copy inside LLMRunner.
Evidence: go test ./... in backend passed. Existing runtime assertions were unchanged; new tests cover whole-batch tool-cap rejection with parts saved, and length continuation.
Impact: the direct path enables repeat guard and length continuation. Squad still uses the one-shot deliverable predicate and does not set the new kernel switches.
Refs: feature/agent-harness-p1
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 13:28:17 +00:00
weichen 88f8a476f0 Merge remote-tracking branch 'origin/main' into feature/base-extension-roadmap 2026-10-01 10:36:01 +00:00
weichenandCursor cd5b82186d Add the public extension surface and platform services
Why: Downstream products must extend the base through a public package and host API instead of editing internal code.
Evidence: go test ./... passed, including plugin v2 assets, sidecar startup, migration v13, pending confirms, HITL timeout, hash embedder, command pairs, and the extension surface snapshot.
Impact: apiVersion 2.0-experimental rejects empty network allowlists for declarative HTTP. Hash embeddings stay opt-in via models.embedding.provider=hash. Plugin secrets resolve per owner at execution time.
Refs: docs/proposals/2026-10-01-plugin-contract-v2.md
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 10:35:02 +00:00
weichenandCursor 17c799bc90 Upgrade Agent-Native and Agent-Squad dependencies
Why: The product should build against the headless session runtime and the orchestration database.
Evidence: go test -count=1 -timeout 300s ./...
Impact: runtime.entry stays direct. This commit only moves the submodule pointers.
Refs: feature/orchestration-deps
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 10:31:49 +00:00
weichenandCursor 268f4a9abf Route conversations through a squad entry when selected
Why: Squad steps previously ran without tools, and the product had no way to make the squad the conversation entry without losing streaming, cards, or the deliverable guard.
Evidence: go test ./... -count=1 passed, including streaming, cardflow, false-deliverable rejection, tool allowlist, model routing, usage, cancel, and turn and tool budgets.
Impact: runtime.entry defaults to direct. squad uses one kernel step for simple work and the leader for the rest. squad_orchestrate is hidden in that mode. The default is not switched.
Refs: deliverable-quality-system B3-B5
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 09:34:53 +00:00
weichen ca8aa5d526 Merge remote-tracking branch 'origin/main' into feature/chat-timeline-preview 2026-10-01 06:17:45 +00:00
weichen 87a3d0dbfb Wire the agent-native kernel factory into squad runs and pin full-agent deps
Why: the full-agent batch (Agent-Native PR #3, Agent-Squad PR #3) made
roles capable of declaring model/tools/skills/bash execution, but the
product composition root had no path to register the kernel backend or
inject search/exec/skills config.

Evidence: go vet ./... clean; go test ./... 19 packages ok. New cases:
buildBackends registers agent-native only when composition-root options
are enabled (default backend stays agent-system, per the parity
progressive-enablement clause) and resolves explicit
Backend:agent-native roles; InterpreterExecConfigForKernel validates
absolute interpreter paths and the env whitelist reused from the
product exec tools.

Impact: deps/agent-native pinned to f9ab2ef and deps/agent-squad to
9a402e4; app.go resolves settings.models.chat, tools.tavily.*,
runtime.exec, and <data>/skills into squad.AgentNativeConfig per run;
squadadapter exposes the AgentNativeOptions hook and buildBackends.

Refs: Dev task feature/full-agent-r1 batch B10.
2026-10-01 06:07:34 +00:00
weichenandCursor a34e61cd01 Record thinking duration and successful tool summaries
Why: After a refresh the timeline had no thinking duration and successful tool rows expanded to nothing, because only failures stored a summary.
Evidence: go test ./internal/runtime/ -count=1 -run 'TestLLMRunnerRecordsThinkingAndToolDuration|TestLLMRunnerToolTurnTextIsProcess|TestLLMRunnerDeliverablePinnedAfterText'
Impact: Thinking parts gain durationMs; tool calls gain durationMs; tool results keep a short success summary. Requires the core duration field.
Refs: feature/chat-timeline-preview
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 06:04:19 +00:00
weichen 73769f3a07 Land project inbox: aggregation, archive-to-project, project SSE (CF3)
Why: D48-D51 approved — cross-session inbox so todos are not lost across
conversations.
Evidence: store v12 index + ListProjectCards aggregate (D49 verdict:
project cards any status + per-conversation action_required only);
cardsvc project-stream emit/mirror via project:<id> pseudo-key (helpers
in core PR #11/#12) and ToProject (idempotent via ref, dismisses origin,
refuses flow-bound hitl/cmd cards); runmgr scope=project ownership;
llm.go scope param on submit_card/card_begin; server routes
GET /api/projects/{id}/cards, POST /api/cards/{id}/to_project, events
scope=project; vendored core synced; new tests ToProject/,
TestLLMRunnerCardScopeProject, e2e TestProjectInbox; e2e server now
wires production card emitter (no-op before).
Impact: additive; no change to existing conversation flows.
Refs: documents proposal 2026-09-30-card-stream-artifact-unify-project-inbox.md (D48-D52).
2026-09-30 19:11:11 +00:00
weichen 4843c7738d Sync vendored core to project-envelope tip (CF3)
Why: backend consumes core via vendored gitlink; core PR #11 (ProjectID)
merged first per multi-repo order.
Evidence: core main f8b77c0; go build green.
Impact: gitlink-only.
2026-09-30 18:57:42 +00:00
weichen c0baa342fc Add url-preview endpoint and gated sandboxed fs tool family
Why: the adjudicated preview plan needs server-side OG fetching for link
cards, and the proposal's reserved-capability items call for the fs tool
family to exist behind a default-off gate (implemented, not offered).

Evidence: GET /api/url-preview fetches and parses og:title/description/
site_name/image/favicon with a 5s timeout, 256KB body cap, text/html
content check, TTL cache, and SSRF guards enforced at dial time (loopback
/private/link-local/multicast/reserved/CGNAT rejected per hop, anti DNS-
rebind; AS_URL_PREVIEW_ALLOW_PRIVATE=1 exists for local testing only,
default fail-closed; errors return sanitized cards, never internal
addresses). fs_read_file/fs_write_file/fs_list_dir register as Hidden
tools sandboxed under <root>/<owner>/<conversationId>: traversal,
absolute paths, backslashes, and symlink escape rejected; 1MB/2MB size
caps; writes register an artifact so workspace files stay visible in the
panel. ToolDesc.Hidden gates both model visibility (runctx.Tools) and
/api/tools listing on runtime.fsTools, and registry.Execute re-checks
fail-closed. ToolExecCtx gains OwnerID/WorkspaceRoot/SettingBool.
go test ./... green (fs negative matrix, SSRF negatives, endpoint
fail-closed, cache).

Impact: link previews work end to end once the frontend wires the
fetcher; fs tools are inert until runtime.fsTools is enabled.

Refs: task feature/file-preview-caps; core 4d29301.
2026-09-30 17:16:07 +00:00
weichen 1c4b198603 Pin nested agent-system-core to a64fb5a (CardID on fresh main)
Why: 嵌套 core 指针同步——CF1 消费 CardPart.CardID,且 rebase 到含 cross-session 契约的新 main 后旧 pin 缺字段编译失败。
Evidence: go build ./... 与全量测试随后执行。
Impact: 仅指针。
Refs: Dev 任务卡 feature/cardflow-r1。
2026-09-30 16:30:13 +00:00
weichen 53c6630eca Add submit_card explicit routing with card-as-authority and context backfill (CF1)
Why: 卡流机制(D39–D43)——产物型长内容显式路由进收件箱:模型经 submit_card 提交 result 卡,全文权威在卡片,消息只存引用,上下文回填防失忆。
Evidence: go test ./internal/runtime/(门控/产卡/引用部件)、./internal/ctxasm/(回填/截断/占位)、./internal/server/ 全绿(新增 TestMockCardflowFullLoop:#cardflow → result 卡 + cardId 部件 + finishRun 锚点回填)。
Impact: 新内置工具 submit_card(ui.cardflow 默认关闭,未声明被幻觉调用时拒绝执行);settings 增 ui.cardflow;style-cardflow 模块 + ModuleBody 注入;ctxasm 增 CardResolver 与 card(n) 观测;runmgr 增 SubmitCard/Card 与锚点回填;mock 增 #cardflow。
Refs: Dev 任务卡 feature/cardflow-r1;依赖 core bcfacee(CardPart.CardID)。
2026-09-30 16:30:13 +00:00
weichen 2c5c68d16c Add layered cross-session reading with gated peer tools
Why: conversation transcripts were the only project channel not
readable across sessions (artifacts/knowledge are already shared),
which caused duplicate parallel work; see proposal
2026-09-30-cross-session-reading.

Evidence: runmgr/crossread_test.go covers the full gate matrix
(project gate on/off x outbound flag x private target x cross-project
x cross-tenant x self-read x archived x limit clamping) against a real
store + settings chain; store tests cover migration v11, flag
persistence and tenant isolation; tools/peers_test.go covers args
validation, transcript rendering and the untrusted-content banner;
go test ./... green.

Impact: setting crossSession.read (default off, schema-driven);
conversation columns allow_cross_read (default true) and cross_private
(default false) with PATCH support; builtin tools list_conversations
and read_conversation gated fail-closed in runmgr toolCtx; nested
agent-system-core pin bumped to fd44179 (Core PR #6).

Refs: Agent-System-Documents proposals/2026-09-30-cross-session-reading.md
(Dev task feature/cross-session-reading).
2026-09-30 15:13:36 +00:00
weichen be513de8fd Add task list APIs with pin and archive flags (R1)
Why: the task-centric sidebar (approved option A) needs a cross-project
conversation list, server-authoritative pinned/archived state, and an
identity endpoint for the sidebar account footer.

Evidence:
- migration v8 conversation_flags (sqlite/postgres up+down; the upgrade
  test walks v1<->v8 for real); store and e2e tests cover pinned-first
  ordering, archived filtering with ?archived=1, tenant-isolation
  negatives (cross-owner flag write -> NotFound), and /api/me shape
  (owner/name/auth) in embedded mode.
- go vet + full go test ./... pass.

Impact: additive columns/APIs; existing endpoints unchanged (PATCH gains
optional pinned/archived fields; responses keep prior shape).

Refs: core bump deps/agent-system-core -> 1dc08fc (Conversation flags)
2026-09-30 10:40:44 +00:00
weichen 4938bd095c Move prompts into a layered data library with trigger-based assembly
Why: prompts lived inline in Go (profile const, subagent string, squad
role one-liners, tool descriptions) - every copy change shipped code,
and task guidance like meeting-minutes quality lived permanently in the
base prompt whether or not the task was at hand.

Evidence: new prompts package tests (library integrity, default
assembly, skill triggering incl. attachment gate and command bypass,
priority supersession, override chain drift, command match, frontmatter
parse); composite make test green; runtime check on a live server
(40 modules across 7 layers, override round-trip, /minutes starts a
run instead of hitting the command bus).

Impact: 40 builtin modules as embed data (5 base + 1 env + 12 task
skills + 10 agent roles + 7 tool descriptions + 3 aux templates + 2
styles); migration v8 adds prompt_modules for user overrides with
basedOnVersion drift markers; ctxasm assembles multi-segment system
messages with per-module observability; subagent/squad/tool copy now
resolve from the library with inline fallbacks; skill commands surface
in the / menu and route to runs; default profile SystemPrompt empties
onto the library base; pins deps/agent-system-core to the contract
commit.

Refs: feature/prompt-library task card; design guide in Documents.
2026-09-30 10:35:23 +00:00
weichen 9fbafcc432 Bump nested provider pins: core contracts T1, agent-command v0
Why: Consumer adaptation step of the cross-repo five-step — Core gained the
  activity-card/UI-vocabulary contracts (its PR#2) and Agent-Command reached
  v0 (its PR#2); this module's replace-based build must consume those mains so
  cmdbus (T3) builds against the real contracts.

Evidence: nested gitlinks now at core a2050d8 and agent-command cc1ad77 (both
  merged mains); go build/vet/test green at this state (combo run in Dev).

Impact: Pins only; no code change.

Refs: modules/documents docs/records/2026-09-30-t1-core-cards-commands-verification.md
2026-09-30 06:29:52 +00:00
weichen ea3b5bc871 Wire Agent-Command as nested dependency
Why: The command bus work (proposal D30) needs the Agent-Command ecosystem
  library available to this module before internal/cmdbus lands in T3; wiring
  now keeps that task provider-ready.

Evidence: submodule pinned at Agent-Command main 50f99d9 (skeleton + guidelines
  pin, merged via its PR #1); go.mod gains only the replace directive — build,
  vet and full go test pass with no other change (go mod tidy churn deliberately
  excluded).

Impact: No import yet; zero behavior change. Recursive init materializes
  guidelines inside agent-command (development-only).

Refs: Agent-System-Documents proposal 2026-09-30-ui-inbox-command-workspace (D30)
2026-09-30 05:53:13 +00:00
weichen 72e6ce66b4 Advance the core gitlink and serialize empty lists as arrays
Why: backend main pinned core 019617e (unfetchable post-migration) and the
store List* functions returned nil slices that encode as JSON null, which
crashed the frontend nav with .map on null (the 2026-09-30 white-screen).
Evidence: go test ./... across all packages; store regression
TestEmptyListsSerializeAsEmptyArrays asserts [] for empty project lists.
Impact: all 17 store list sites now initialize empty slices; build-blocker
core pin resolved; frontend no longer receives null for empty lists.
Refs: documents/records/2026-09-30-history-migration.md
2026-09-30 03:20:57 +00:00
weichen 4fdbfbc9a2 Add the vector RAG pipeline: paragraph chunker
Details (original message):
Add the vector RAG pipeline: paragraph chunker, OpenAI-compatible embeddings and rerank clients, dual-tier vector store with cosine search, and RRF hybrid retrieval
2026-09-30 02:39:50 +00:00
weichen 02e2036fc6 Add dual-tier storage (embedded SQLite + optional PostgreSQL)
Details (original message):
Add dual-tier storage (embedded SQLite + optional PostgreSQL), tenant owner scoping, API key auth, versioned dual-dialect migrations, integrity hardening, and batched event persistence
2026-09-30 02:39:50 +00:00
weichen c7736a1917 Integrate the Agent-Squad engine
Details (original message):
Integrate the Agent-Squad engine: squadadapter maps RoleRegistry/RulePlanner/BackendResolver/ProgressSink/HITL onto the unified Run and event model (step subagents, plan updates, deliverable artifacts, confirmation cards); step-wise engine driving loop; model routing respects profile routes with layered resolver + integration tests; context assembly observation flows to run.completed; mock outputs and e2e coverage.
2026-09-29 18:27:49 +00:00
weichen 30ad92730d Integrate the agent-intent gate
Details (original message):
Integrate the agent-intent gate: plugin intent overlays rebuild the registry (fail-closed, keeps previous snapshot), HITL free-input pivots on matched foreign intents; unit and e2e tests; pin logging-system and error-code-system submodules.
2026-09-29 18:11:47 +00:00
weichen 0d74ec94dd Implement the backend: store/bus/runmgr core
Details (original message):
Implement the backend: store/bus/runmgr core, mock and LLM runners (agent-native client), HITL three-branch routing, subagent runs, builtin and declarative HTTP tools, ingest parsers (md/txt/docx/pdf-text), knowledge fulltext, layered settings, profiles, plugin host, REST+SSE API, single-binary entrypoint; e2e and unit tests.
2026-09-29 17:53:24 +00:00