Commit Graph
41 Commits
Author SHA1 Message Date
weichen cbd700d3d6 Merge pull request 'feature/prompt-catalog-coverage' (#14) from feature/prompt-catalog-coverage into main 2026-09-30 10:45:47 +00:00
weichen a89a2ea1d1 Cover the remaining portable catalog prompts (44 modules)
Why: the porting filter excluded templates without a named roadmap slot,
but the user's bar was anything portable; wizard, memory extraction,
session memory and in-place doc updates all have carriers (delegation
today, memory/doc-editing slots later).

Evidence: go test ./... 16 packages ok with the library floor raised to
44; module format checks unchanged.

Impact: +agent.docs-wizard, +agent.memory-extractor, +aux.session-memory,
+aux.magic-docs; no wiring change.

Refs: feature/prompt-catalog-coverage task card; guide section 9 in
Documents lists the full disposition.
2026-09-30 10:45:44 +00:00
weichen 396c92463e Merge pull request 'Task list APIs with pin/archive flags and /api/me (R1)' (#15) from feature/task-sidebar-r1 into main 2026-09-30 10:45:21 +00:00
weichen 9660490c31 Renumber conversation_flags to v9 after prompt_modules v8
Why: upstream merged prompt_modules as migration v8; the version
namespace is linear so the rebased task-sidebar work moves to v9.

Evidence: go vet + full go test ./... green; migration upgrade test now
walks v1<->v9 (up and down paths exercised for real).

Impact: fresh databases apply v8 (prompts) then v9 (conversation flags);
no released v8 conversation_flags ever existed, so no deployed database
can hold the old numbering.
2026-09-30 10:41:05 +00:00
weichen 5871c3e771 Fix /api/me auth flag to respect Authenticator.Enabled
Why: a non-nil Authenticator with Enabled=false is the embedded no-auth
mode; reporting auth=true there made the sidebar account footer show
the wrong identity state (found in the live headless walk).

Evidence: restarted binary now returns {"auth":false,...} in embedded
mode; TestTaskListAndFlags still green.

Impact: response field value only.
2026-09-30 10:40:44 +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 f71631ff61 Merge pull request 'feature/prompt-library' (#13) from feature/prompt-library into main 2026-09-30 10:36:34 +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 10f400a2c0 Merge pull request 'feature/chat-live-quality: live streaming bubble, markdown spacing, document-task quality' (#12) from feature/chat-live-quality into main 2026-09-30 09:59:29 +00:00
weichen fe4887be18 Lift document-task quality: attachment budget, prompts, docx order
Why: attachments were hard-truncated at 16k chars (most of a meeting
transcript silently dropped), injection carried no task guidance, the
builtin profile prompt was one generic line, subagents were capped at
300 chars, and docx tables were appended after all paragraphs losing
document order - together these produced sparse meeting minutes.

Evidence: go test ./... 16 packages ok incl. new ctxasm limit tests and
docx order assertions (heading->para->table->para); composite make test
green over the pinned combo.

Impact: attachment ceiling is 48k chars (settings
context.maxAttachmentChars), truncated on rune boundaries and observable
in the context report; the builtin prompt demands full-coverage
structured markdown for document tasks and upgrades stale builtin rows
on boot; budget.maxTokens now reaches the provider; subagents may write
full-length results; docx tables stay in place.

Refs: feature/chat-live-quality task card.
2026-09-30 09:57:36 +00:00
weichen 303cdf3b63 Merge pull request 'Load plugin workspace declarations and expose GET /api/workspaces (T4)' (#11) from feature/workspaces-r1 into main 2026-09-30 08:08:05 +00:00
weichen 6403d3d9d9 Sync main before merge (stale-candidate guard) 2026-09-30 08:08:00 +00:00
weichen e08d9b091d Load plugin workspace declarations and expose GET /api/workspaces (T4)
Why: T4 workspaces are declared by plugins via provides.workspaces (Core PluginWorkspace is the authoritative type); the host must surface the merged overlay for the frontend to render in OverlayHost.
Evidence: go test green - plugins suite new TestWorkspacesOverlay (manifest + workspaces/main.json loads, ListWorkspaces returns the declaration with shortcut and body); full internal sweep unchanged.
Impact: plugins host loads workspaces/*.json assets and exposes ListWorkspaces; server adds GET /api/workspaces passthrough; no behavior change without the manifest key.
Refs: docs/proposals/2026-09-30-ui-inbox-command-workspace.md T4; task card feature/workspaces-r1
2026-09-30 08:01:31 +00:00
weichen 0f7402640a Merge pull request 'Add cmdbus: registry-driven command dispatch with audit and inline confirm (T3)' (#10) from feature/command-bus-r1 into main 2026-09-30 07:54:53 +00:00
weichen 5c52c71f9c Add cmdbus: registry-driven command dispatch with audit and inline confirm
Why: T3 of the interaction foundation - unify button/card/slash/chat entries onto one command bus (D27) composing the Agent-Command library (D30), with danger=high commands gated behind inline confirm cards and every dispatch leaving the same audit envelope.
Evidence: go test green - cmdbus suite (four-entrance audit symmetry, high-danger confirm lifecycle incl. cancel/expiry/handler-reject, audit-unavailable yields unknown, plugin spec fail-closed, schema scalar validation) and server e2e (danger command via POST /api/commands -> confirm card -> card action confirm -> committed receipt -> audit query ordered accepted->committed); legacy /help,/new,/mock,/model,/profile contract preserved through the bus; store migration v7 command_audit (both dialects) with roundtrip test updated.
Impact: new internal/cmdbus (L1 package per D33), server routes POST /api/commands/{id} + GET /api/commands/audit + registry-driven GET /api/commands, postMessage chat-entrance dispatch when the intent gate matches a registered command, plugins host OnCommands overlay, module cards policy/modules/{cmdbus,cardsvc}.md; pending confirm state is process-local (documented limitation).
Refs: docs/proposals/2026-09-30-ui-inbox-command-workspace.md T3; task card feature/command-bus-r1
2026-09-30 07:51:31 +00:00
weichen ba1714d122 Merge pull request 'Return persisted receipt message from card action' (#9) from feature/inbox-r2 into main 2026-09-30 06:56:02 +00:00
weichen f2b0efa08f Merge main into feature/inbox-r2 2026-09-30 06:55:53 +00:00
weichen 5694c04c78 Return persisted receipt message from card action
Why: The frontend appends the confirmation receipt locally so it appears
  immediately; returning the server-persisted message (with its id) keeps the
  authoritative reconcile duplicate-free.

Evidence: go build green; covered by combo test in Dev.

Impact: response shape gains receipt field (additive).

Refs: proposal 2026-09-30-ui-inbox-command-workspace
2026-09-30 06:55:32 +00:00
weichen abf43bb703 Merge pull request 'Add inbox activity cards: cardsvc, store, events, API and producers' (#8) from feature/inbox-r2 into main 2026-09-30 06:52:48 +00:00
weichen 797a6eaab7 Add inbox activity cards: cardsvc, store, events, API and producers
Why: T2 of the interaction foundation — activity cards as first-class state
  objects behind the right-rail inbox (proposal D25): upload ingest cards
  (SR-A5 failures explicit, artifact retrievable), HITL projection cards
  (double-presence, ref-linked two-way sync), squad orchestration cards and
  the mock #upload demo of the full card lifecycle.

Evidence: go test ./... green across 14 packages incl. new cardsvc suite
  (lifecycle, action labels and idempotency, pin/dismiss, owner isolation,
  resolve-by-ref idempotency) and updated migration test (v6 activity_cards,
  both dialects); events flow through the session event buffer (persist, seq,
  replay); receipts appended to the conversation timeline on card actions.

Impact: additive; cards disabled (SetCards nil) degenerates to the T0
  baseline; upload cards persist at project level per the v1 inbox boundary
  (conversation-scoped inbox; project-level aggregation is follow-up).

Refs: modules/documents docs/proposals/2026-09-30-ui-inbox-command-workspace.md
2026-09-30 06:52:48 +00:00
weichen 02a7b4d708 Merge pull request 'Bump nested provider pins: core contracts T1, agent-command v0' (#7) from feature/core-cards-commands-r1 into main 2026-09-30 06:29:53 +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 a72c45f68a Merge pull request 'Wire Agent-Command as nested dependency' (#6) from feature/ui-foundation-r0 into main 2026-09-30 05:53:14 +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 1e62188709 Merge pull request 'Add the startup configuration pipe with file and env layers plus explain' (#4) from feature/config-surface into main 2026-09-30 04:19:53 +00:00
weichen 66b4bbf55a Add the startup configuration pipe with file and env layers plus explain
Why: startup had only defaults and CLI flags; dev/test/prod operation needs
the standard baseline (explicit file, environment, explicit-only CLI) and a
read-only diagnostic.
Evidence: internal/config unit tests cover precedence, unset-CLI no-override,
presence-based file semantics, unknown-key/missing-file errors, env bool
parsing, explain source labelling and DSN redaction; full suite 12 packages
pass; live run of config explain with envs/prod.json shows correct layer
attribution and redaction.
Impact: serve gains --config and AGENT_SYSTEM_* env overrides (behavior
unchanged when neither is used); new config explain subcommand; envs/
examples and PROJECT.md configuration section.
Refs: documents docs/proposals/2026-09-30-configuration-surface.md; standards/configuration.md
2026-09-30 04:19:11 +00:00
weichen 6e515dacc1 Merge pull request 'Serialize empty store lists as JSON arrays and advance the core pin' (#2) from fix/empty-list-json into main 2026-09-30 03:24:02 +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 99fb59bdc2 Merge pull request 'Adopt the task-startup gate and commit format in AGENTS.md' (#1) from feature/entry-docs-gate into main 2026-09-30 03:15:23 +00:00
weichen 76cdb89615 Adopt the task-startup gate and commit format in AGENTS.md
Why: the composition adopted the delivery gate (Dev repo ef89fc8); resident
entry rules must carry the gate so agents load them without reading the
guidelines submodule first.
Evidence: text-only entry change; gate mechanics validated in the Dev repo
scratch-repo suite (19/19) and merged as PR weichen/Agent-System-Dev#1.
Impact: entry doc only; no code, contract, or build change in this repo.
Refs: Development-Guidelines 0.1.0-draft.7; Agent-System-Dev ef89fc8
2026-09-30 03:14:35 +00:00
weichen 8ae5b2334a Fix apikey subcommand flag parsing (flags must follow the subcommand) 2026-09-30 02:39:50 +00:00
weichen 29f14ac5f2 Add multi-instance groundwork: blobstore seam for artifacts
Details (original message):
Add multi-instance groundwork: blobstore seam for artifacts, PG LISTEN/NOTIFY event fanout, and per-tenant rate limiting with native Redis backend
2026-09-30 02:39:50 +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 1f6cc530af Ignore squad workspace data produced by test runs. 2026-09-29 18:32:17 +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 964e4fb545 Ignore embedded frontend build outputs (copied by the Dev build, never committed)
Details (original message):
Ignore embedded frontend build outputs (copied by the Dev build, never committed).
2026-09-29 18:01:57 +00:00
weichen 16fbd70721 Persist subagent intermediate messages for the agent tracker view. 2026-09-29 17:54:23 +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
weichen 6832b7f0da Bootstrap the repository skeleton: README, agent rules, policy index, project facts
Details (original message):
Bootstrap the repository skeleton: README, agent rules, policy index, project facts.
2026-09-29 17:30:31 +00:00