Commit Graph
1841 Commits
Author SHA1 Message Date
sam d4e91e04dd chore(beads): record archie-core-t2db.9 close interaction 2026-09-03 02:38:07 +10:00
sam d06c167cd2 chore(beads): close archie-core-t2db.9 2026-09-03 02:35:48 +10:00
sam 97a5c0d2ca feat(workflow): make kind-to-workflow routing YAML-overridable
First slice of docs/prds/eda-playbook-engine.md: which registered
workflow an intake Kind (bug/feature/bootstrap) prefers is now data,
loaded from an optional WorkflowRoutingFile, instead of a Go literal.
labelKinds and the NATS-subject-per-kind set are unchanged -- expanding
the label vocabulary itself is a separate, larger decision (subject
allocation) deferred per the design doc's open questions.

An unrecognised kind in the file is a reported load failure (schema
defines what's accepted, per the design doc's collision-handling rule),
not a silently-dropped binding. No file configured falls back to
today's hardcoded defaults unchanged.
2026-09-03 02:35:42 +10:00
sam 4acfa28966 docs(prds): add EDA playbook engine design doc
Records the design for drop-in, data-driven workflows/labels/actions:
YAML playbooks as pure orchestration data over four typed logic
positions (Workflow/Module/Channel/Forge), go:generate-driven schemas,
and load-time collision handling (detect+log+report, no auto-arbitration).
Flags execution-time idempotency and mid-run failure handling as
unresolved gaps to close before Channel/Forge or multi-action playbooks
ship.
2026-09-03 02:22:04 +10:00
sam cc7d1babbc chore(release): archied v1.20.0 archie v1.20.0
deploy / gate (push) Failing after 3m27s
deploy / build-and-push (push) Skipped
2026-09-03 01:35:14 +10:00
sam 9ed5f57ccb chore: mark completed issues and epics as closed 2026-09-03 00:55:50 +10:00
sam 227cc6bb36 test(webui): migrate UI tests to Preact testing library and fix tasks Fragment render
Use @testing-library/preact rendered under jsdom (registered via
test/register.js) so the Post-Preact .jsx components and pages are
exercised through the real automatic-runtime render path instead of the
legacy el() DOM-helper API the tests were written against.

- Add jsdom + @testing-library/preact dev deps and a jsdom globals setup
  in ui/test/register.js (window/document/navigator/getComputedStyle/...).
- Switch the .jsx loader hook to the automatic JSX runtime to match
  @preact/preset-vite, so source files that shadow h (mapping-editor) and
  Fragment/children arrays work exactly as in the Vite build.
- Migrate captures, config-row, mappings, settings-update-status,
  task-logs, settings-lifecycle, settings-schema, tasks-actions and the
  chat-app tests to render the Preact components and query the DOM via
  testing-library.
- Fix a real render bug in tasks.jsx: <h.Fragment> is not rendered by the
  automatic runtime (rows came out as [object Object]); use the imported
  <Fragment> instead, matching the other migrated modules.
2026-09-03 00:52:20 +10:00
sam 422f06c5a3 Refactor captures, mappings, and curators modules to use Preact components 2026-09-03 00:23:41 +10:00
sam b6112642db feat(webui): refactor chat module to Preact component and add unit tests 2026-09-03 00:21:01 +10:00
sam 4e189b605e Refactor channels, settings, logs, and memory to use Preact components 2026-09-03 00:20:43 +10:00
sam 09d85149ee Refactor workflows and skills modules to use Preact components 2026-09-03 00:16:48 +10:00
sam 4e5f6f78f5 Refactor tasks module to use Preact components 2026-09-03 00:14:45 +10:00
sam fd32459dc0 Rename remaining JS files to JSX 2026-09-03 00:12:03 +10:00
sam 87aaf1f7dc Add Preact bridge and rename JS to JSX 2026-09-03 00:06:43 +10:00
sam 4c0c596617 Refactor dashboard module to use Preact components 2026-09-03 00:06:35 +10:00
sam 87e03320f9 fix(store): satisfy makezero when building cipher payload
append(nonce, sealed...) appends to a slice initialized with a non-zero
length, which makezero flags. Build the nonce||ciphertext||tag payload with
an explicit buffer sized upfront instead.

Found by golangci-lint.
2026-09-03 00:01:11 +10:00
sam f9f9888702 feat(webhook): harden captured payload redaction
RedactPayload only redacted values under a fixed set of sensitive key
names, so a sender that names a secret field something else leaked it into
captured_events.body. Harden the heuristic:

- broaden the key-name markers (compound names like access_token,
  client_secret, signing_key, x_api_key, webhook_secret, refresh_token)
  and keep gateway.sensitiveParameterKey identical to preserve the
  documented agreement between the two redaction paths.
- add value-shape detection: a compact JWT or a PEM private-key block is
  redacted under any key, catching the 'sender named the field something
  the heuristic misses' gap.
- keep it conservative so schema-by-example field mapping still works:
  only unambiguous shapes (eyJ-prefixed JWTs, PEM key blocks) are
  redacted by value, never ordinary content.

Best-effort per docs/prds/webhook-intake-security.md point 5.

Refs archie-core-t2db (captured_events.body redaction)
2026-09-02 23:59:43 +10:00
sam 087f161836 feat(store): encrypt playbook binding secrets at rest
binding.Binding.Secret was persisted as plaintext in the bindings.secret
column, so anyone with the SQLite file saw sender-side HMAC secrets. Seal
it with AES-256-GCM transparently inside the store: encrypt-on-write,
decrypt-on-read.

- cipher: AES-256-GCM, 12-byte random nonce, SHA-256-normalised 32-byte
  key resolved through the secret registry ([bindings].encryption_key).
- envelope 'arcie-binding:v1:<fingerprint>:<b64(nonce||ct||tag)>' so a
  future cipher/KDF change is a version bump and old rows stay readable.
- rotation via previous_encryption_keys; key identity is the material's
  SHA-256 fingerprint embedded in each row.
- legacy plaintext rows written before a key was configured stay readable;
  encryption is not retroactive.
- nil cipher (no key configured) preserves the pre-t2db.7 plaintext path.

Deferred: captured_events.body redaction upgrade (separate concern, see
docs/prds/binding-secret-encryption.md).

Refs archie-core-t2db.7
2026-09-02 23:54:06 +10:00
sam e7871450be chore: sync issue tracker entries and metadata 2026-09-02 23:40:29 +10:00
sam 59638ed35e fix: resolve golangci-lint funlen, nilerr, and empty branch issues 2026-09-02 23:10:38 +10:00
sam 5dc3c9895c feat(webui): playbook bindings -- matcher + mapping + workflow, HMAC-gated
Implements archie-core-t2db.4: the runtime-editable binding entity that
turns a captured webhook into an archie task, plus the per-source HMAC
verification at handleCapture that makes t2db.5's 'unauthenticated event
cannot trigger a binding' invariant structurally enforceable.

Captures, mappings and bindings are now separate concerns on the same
single *store.Store; the new BindingStore / BindingDispatcher /
BindingTaskCreator split keeps each interface under the interfacebloat
limit (8 methods).

State machine: draft -> pending_approval -> armed; any edit on an armed
binding drops it back to pending_approval, enforced in SQL via
status='pending_approval' on UPDATE so the rule cannot be bypassed by a
direct status field in the request body. Approve is the only sanctioned
transition into armed (WHERE status='pending_approval' guard).

Overlap: two bindings may not share a source in any status; enforced at
InsertBinding and UpdateBinding (transaction-local SELECT). Approve has
a separate TOCTOU guard so a race between Insert and Approve cannot
// bypass the check.

HMAC at handleCapture: reads X-Hub-Signature-256 (then X-Signature-256)
// fallback, verifies via webhookguard.VerifyHMAC against the binding's
// per-source secret, marks CapturedEvent.Authenticated=true on match.
// Captures with no armed binding, missing signature, or wrong signature
all persist as authenticated=false -- the dispatch loop's
binding.Matcher.Matches gate (requires authenticated) is what stops
them from spawning a task. Two armed bindings for one source returns
409 at capture time as a belt-and-braces TOCTOU guard.

Dispatch loop: added Daemon.dispatchBindings, called from both Cycle
and maintainAndDrain between poll and drain. Walks
captured_events where authenticated=1 AND source IN armed bindings
AND id NOT IN binding_dispatches, runs the binding's matcher, resolves
the mapping, enqueues a chat-style task with binding_id /
// binding_version provenance stamped in the same transaction as the
// row insert. The binding_dispatches ledger (composite PK on
(binding_id, capture_id)) is the at-most-once guarantee across cycles
// and daemon restarts.

Tasks schema migration: binding_id INTEGER NOT NULL DEFAULT 0 +
binding_version INTEGER NOT NULL DEFAULT 0 (taskSchemaVersion bumped
1 -> 2). Existing tasks keep 0 / 0.

Out of scope (documented follow-ups):
- secret encryption at rest (plaintext today)
- full dashboard HTML for the binding editor (CRUD API only this bead)
- per-binding rate limits (existing per-remote-address limit applies)
- binding.Owner / binding.Repo fields (dispatch falls back to the
  single configured repo; multi-repo deployments log and skip)
2026-09-02 23:09:25 +10:00
sam 1f985c5f7d chore: updated ai-sdk core lib 2026-09-02 22:37:59 +10:00
sam 5552ee9c56 feat(webui): inline editing for per-repo allow_concurrent/max_retries/review_enabled
Adds PATCH /api/config/repos/{owner}/{name}, a dedicated seam distinct
from the generic dotted-key PATCH /api/config path: a repository is
one element of []config.Repo, not a flat key. Traced the mechanism
before adding any new plumbing -- overlay.Nest/ApplyOverlayValues
already handle "repos" as a single whole-slice key with no dot, so
the fix is a webui handler plus a bootstrap seam that reads the
daemon's live, untrimmed Repos (never webui.RepoView, which omits
Preflight/TestGlob), mutates the one matched field via the pure
applyRepoFieldUpdate helper, and republishes through the existing
UpdateConfig(ctx, {"repos": repos}) path unchanged.

config-row.js's row() gains an opts.save override so an edit can be
redirected to a different persistence call. The repositories table
renders an autosaving checkbox for the two booleans and a
save-on-blur/Enter input for max_retries, via api.configRepoUpdate.

Closes archie-core-b6ew.6, and with it archie-core-b6ew.
2026-09-02 22:35:03 +10:00
sam 48039222bf test(webui): pin restart-required deliberateness and generic-render proof
TestConfigFieldDescriptorsRestartRequiredIsDeliberate pins the exact
RestartRequired value per field against the reload.go evidence
already documented in configFieldDescriptors' own comment, so a field
reclassified without re-checking reload.go fails loudly instead of
silently defaulting to "takes effect immediately."

ui/test/settings-schema.test.js renders settingsPage against a schema
fixture containing a field settings.js was never written to know
about, proving the renderer needs no field-specific branch to show it
correctly, and asserts by reading settings.js's own source that none
of the generically-rendered fields' keys appear literally in it --
the direct regression test for archie-core-b6ew.3.

The rest of this issue's scope (metadata completeness, structured/
locked non-editability, schema secret-leak guard) was already covered
incrementally while implementing archie-core-b6ew.1 through .4.

Closes archie-core-b6ew.5
2026-09-02 22:26:34 +10:00
sam 63f75db30b feat(webui): surface allow_concurrent/max_retries/review_enabled on the repositories card
RepoView.ReviewEnabled was previously absent from GET /api/config
entirely, not just unrendered; add it alongside AllowConcurrent and
MaxRetries. The repositories table gains Concurrent/Max retries/
Self-review columns as read-only pills -- this is the concrete
discoverability fix for "why isn't a second agent running": that
config was already reachable from the API, just never shown.

config.example.toml documents review_enabled, which had no example
entry before this.

Full inline editing of per-repo fields is out of scope here: the
dashboard's PATCH /api/config path has no array-index support for
updating one element of the Repos slice, which is separate,
real scope -- filed as archie-core-b6ew.6.

Closes archie-core-b6ew.4
2026-09-02 22:23:58 +10:00
sam 63e56a8b91 feat(webui): render scalar config sections generically from the schema
settings.js drops identityCard/budgetsCard/storageCard/webCard/
pullPolicyLabel in favour of one schemaCards() that walks cfg.schema
and builds a card per section, a row per non-structured field --
label, type, description, editability and enum options all come from
the backend descriptor instead of a hardcoded row(...) call per key.

config-row.js gains: enum fields edit as a <select> from opts.options;
opts.editable === false renders read-only distinct from a locked row
(no reason to show, just no edit affordance); opts.hint carries a
field's description as the label's tooltip, so "0 means unlimited."
travels with the field instead of being baked into a display-value
string per key.

ConfigSection also gains Description, filled in per section to match
each card's existing sub-text, since the card's own explanation is
schema metadata too.

Structured sections (repositories, models & providers) are untouched
-- still the existing bespoke renderers, reserved for archie-core-b6ew.4.

Closes archie-core-b6ew.3
2026-09-02 22:12:48 +10:00
sam bb3b11f7e8 feat(webui): attach the config field schema to GET /api/config
ConfigView.Schema carries the archie-core-b6ew.1 descriptor catalog
with each request's own values, locked reasons, and overridden
markers attached (buildConfigSchema), additive alongside the existing
flat fields so nothing that reads ConfigView today breaks.

Tests confirm schema values match their flat-field source of truth,
locked reasons propagate to the schema entry, structured fields stay
non-editable, and secrets never reach the schema block.

Closes archie-core-b6ew.2
2026-09-02 22:08:02 +10:00
sam 0ac8bd1744 feat(webui): hand-author the configuration field descriptor catalog
Introduces ConfigField/ConfigSection and configFieldDescriptors(),
attaching key/label/type/editable/restart-required to every field
GET /api/config already exposes -- the data-independent half of the
schema contract from docs/prds/config-schema.md. RestartRequired is
sourced from reload.go's reloadableFields/reloadableSubFields
allowlist rather than guessed.

Not wired into the API response yet (archie-core-b6ew.2); this issue
is the catalog and its contract tests only.

Closes archie-core-b6ew.1
2026-09-02 22:05:46 +10:00
sam 2980ffa7c7 docs(webui): design a backend-owned config schema for the Configuration page
Field metadata (label, section, type, editability, restart-required)
currently lives only in settings.js/config-row.js, disjoint from the
backend's ConfigView allowlist -- adding or changing a runtime-tunable
setting means editing Go and JS by hand in two places with nothing to
catch drift. Repo.ReviewEnabled never reaches the API at all, and
AllowConcurrent/MaxRetries reach it but the repositories card never
renders them.

Decision: keep the existing secret-free ConfigView allowlist as the
safety boundary (no reflection over config.Config, which is already
scheduled for dissolution), and hand-author a descriptor per allowed
field so the frontend renders sections/fields generically instead of
hardcoding rows.

Filed as archie-core-b6ew (epic) with five dependency-ordered children.
2026-09-02 22:01:41 +10:00
sam f4b0df5092 fix(curator): stop curator actions from serializing a zero timestamp
session-memory's extracted actions never set Action.At, so the wire
carried time.Time's zero value ("0001-01-01") and the Curators
dashboard rendered it as "105694 wks ago". Stamp the action with the
curator's clock at the producer, and backfill any zero Action.At in
activityTracker.record from the pass's own timestamp so an engine
with no clock (skillcurator) can't hit the same bug.

Closes archie-core-z6wy
2026-09-02 21:52:28 +10:00
sam dea69d895d fix(gateway): stop SOUL from forging the prompt invariant tags
Persona/SOUL text was interpolated raw at the top of archie.md.tpl,
so a hostile SOUL could inject its own <core_rules> or
<instruction_precedence> tags ahead of the real ones. Render it
through the existing xml-escaping helper into a labeled
trust="data" <soul> block, and tell instruction_precedence
explicitly that the block is reference data, not an authority.

Closes archie-core-1786637490097-12-bf415ffb
2026-09-02 21:48:57 +10:00
sam 6cedc0213e docs: drop the standing adversarial-review pass from the dev protocol
Sticking with red-green TDD plus task check as the gate for now,
rather than a fresh-context reviewer pass on every change by default.
Adversarial review stays available, just opt-in per request.
2026-09-02 21:40:57 +10:00
sam 5bec08b6ce feat(workflow): dynamic triage instead of defaulting every task to implement
Route() had no content-aware fallback: any task with no explicit
workflow and no label match ran the full "implement" pipeline
regardless of content. Confirmed in production (task 6): a
chat-spawned task whose entire content was "this is just a test,
close it when you receive it" burned 669,421 tokens finding that out
the expensive way -- baseline, plan, and build all ran before the
plan stage's own conclusion (nothing needed to change) arrived too
late to save anything.

Adds a "triage" workflow: one cheap, read-only classification turn
(mirrors feasibility.go's decide-tool pattern) that either closes a
task needing no code change immediately, or sets Task.Workflow and
requeues under whichever workflow fits. Route()'s fallback now
prefers a registered "triage" over "implement", unchanged when
triage isn't registered. Labeled tasks are untouched -- a label is
already a free, reliable signal, so triage never fires there.

See docs/prds/dynamic-workflow-triage.md for the full design.
2026-09-02 21:40:06 +10:00
sam 322e081365 fix(workflow): net cache hits from token totals, trim gate-retry output
Confirmed in production (task 6, 2026-09-02): dashboard/PR summaries
showed raw prompt-token sums with no cache accounting -- 360,018 of a
reported 400,021 "prompt tokens" were cache hits billed at a steep
discount, not full price. Real fresh spend was ~40,003 tokens, roughly
10x less than the headline number implied. Nothing was double-counted;
the totals were internally consistent, just presented misleadingly.

Adds TaskContext.RunUsage (in-memory, presentation-only) and
formatTokenUsage, rendering "N tokens (F fresh + C cached)" in PR
bodies and the dashboard timeline instead of a raw sum, falling back
to the plain total when no breakdown is available.

Also trims StageBaselineGate's retry-mission prompt to failing-only
go test output via extractFailingGateOutput -- the full passing-
package listing was a direct, mechanical contributor to the growing
per-iteration prompt sizes on every gate-repair retry, not just a
display problem. Degrades to unchanged output for non-Go gates or
unrecognized shapes.
2026-09-02 21:28:49 +10:00
sam 1bead14717 fix(webui): wire the Logs page to per-task attempt-log detail
GET /api/tasks/{id}/logs was fully working -- internal/logging's
decode() already captures every JSON field generically (stage,
tokens, iterations, model, everything) -- but nothing in the
dashboard ever called it. The only Logs page hit the daemon-wide
feed, which never carries this per-stage/per-agent-run detail in the
first place. An operator could never see why a task took as long as
it did or its token spend breakdown, even though the daemon already
recorded and could already serve it.

Adds a collapsible attempt-log section to each task's existing
timeline drill-down, reusing the daemon-wide page's row rendering
(extracted to ui/src/base/log-row.js as the shared second consumer).
2026-09-02 21:26:52 +10:00
sam 8c53977c74 fix(workflow): stop discarding baseline-fix commits as 'no changes'
Confirmed in production (carina, 2026-09-02, task 6): StageBaselineGate
spent 405,004 tokens genuinely fixing two broken pre-existing tests and
committed the fix locally, then the plan/build stages correctly found
nothing further to do for a content-free task. StageCommitPush decided
"no changes required" purely from the build stage's own empty diff,
with zero awareness that StageBaselineGate had already committed a
real, gate-verified change two stages earlier -- so it never pushed,
never opened a PR, and the whole worktree (including the real fix) was
discarded. 669,421 tokens burned to fix a real bug that then evaporated,
and it recurs: any task that hits the same red baseline pays the
identical tax again since the fix never lands.

Adds TaskContext.BaselineFixed, set when StageBaselineGate's own
CommitAll reports a real commit. The build stage's no-changes
determination now respects it, and StageCommitPush pushes whenever
either a fresh commit was made or a baseline fix already landed,
instead of erroring on an empty tree.
2026-09-02 21:25:54 +10:00
sam f820a89e32 fix(channels): call MarkRunning once a channel is actually up
channels.Manager.MarkRunning was never called for telegram, email, or
webhook -- every start path only called MarkStarting then MarkFailed
on error, so the dashboard showed a working channel stuck on
"Starting" forever (confirmed live: Telegram polling and delivering
messages while /api/channels still reported "starting").

Adds gateway.Lifecycle{Starting, Running func()}, threaded through
Gateway.Start(ctx, router, lifecycle). Email and webhook report
Running once their listener actually binds -- webhook moves off
http.Server.ListenAndServe's internal bind to an explicit
net.ListenConfig.Listen so binding is observable before Serve.
Telegram reports Running after StartWebhook launches in webhook mode,
or after the first successful getUpdates response in long-poll mode,
observed via a pollReadinessClient http.Client wrapper since the
go-telegram/bot library keeps polling errors inside its own worker
goroutine. Restart re-reports Starting/Running each cycle.
2026-09-02 20:47:01 +10:00
sam f4111e7208 docs(config): document chat.telegram.token_env in config.example.toml
TelegramConfig.TokenEnv was a real, used field with no example-file
mention -- an operator reading the template wouldn't discover the
key exists.
2026-09-02 20:44:37 +10:00
sam cc24b8f129 chore(beads): track minimax video.Provider adapter follow-up (archie-core-1y6y) 2026-09-02 20:36:25 +10:00
sam 45b183b325 docs(image): point the hosted-provider bead at ai-sdk's existing image facility
ai-sdk (already a dependency) has a provider-agnostic image.Provider,
core.GenerateImage, and registry.RegisterImage -- three backends
(azure/togetherai/xai) implement it, OpenAI doesn't yet. The next
bead should adapt that instead of a raw HTTP client, mirroring how
curatorLLMRunner adapts runtime.Runtime for chat. Noted the one real
gap (no edit/mask support in ai-sdk's request type) for that bead to
resolve at its own design step.
2026-09-02 20:23:14 +10:00
sam 75158b7fc7 feat(image): define provider-neutral image capability contract and config
Adds internal/domain/image (Provider/Registry per the plugin engine
family shape, but no Lifecycle -- a provider is call-scoped, not
long-running) and config.ImageConfig with the same explicit
enabled=true cost gate MinimaxConfig already uses, since a hosted
provider spends real API credits and a local one can saturate the
host GPU. Design doc at docs/prds/image-capability-contract.md per
CLAUDE.md's rule for undesigned capabilities.

No provider implementation lands here -- that's the epic's next
child bead. Also re-links all 7 epic children that were unlinked
from archie-core-1786748942120-1-6636e629 (same orphaning pattern
found in the curator/memory epics earlier this session).
2026-09-02 20:20:54 +10:00
sam 622961a875 fix(logging): propagate bound slog attrs to wrapped handler in FeedHandler
FeedHandler.WithAttrs/WithGroup only tracked bound attrs for the live
feed copy; Handle forwarded the bare record to the wrapped handler, so
component (and any other With-bound attr) never reached stderr/file
JSON sinks or survived restart for historical log filtering. Now
WithAttrs/WithGroup also derive the wrapped handler via its own
With*, matching agentexec.SystemLogHandler's existing pattern.
2026-09-02 19:45:42 +10:00
sam be21f5d0d0 Merge pull request #650 from feat/curator-and-other-components-arent-being-logged-or-shown-in
curator and other components aren't being logged or shown in the Web UI (archie)
2026-09-02 19:38:33 +10:00
samcharles93 d466fc80b0 curator and other components aren't being logged or shown in the Web UI (archie) 2026-09-02 04:00:05 +00:00
samcharles93 83dc672074 fix: baseline gate repair (go test ./... -count=1) 2026-09-02 03:53:40 +00:00
sam ee0f6c1327 chore(release): archied v1.19.10
deploy / gate (push) Failing after 3m43s
deploy / build-and-push (push) Skipped
2026-09-02 03:09:58 +10:00
sam 31d8181c39 chore(beads): close session-memory curator reference implementation 2026-09-02 03:09:23 +10:00
sam fc6bffad50 feat(curator): session-memory curator reference implementation
Closes archie-core-1786637499114 (persistent session-memory curator),
the last open item in the curator engine epic.

docs/prds/session-memory-curator.md records the decisions this needed
before coding, most notably: Observation.Identity is the session ID,
not a user or cross-session identity. migration-decisions.md#5's
memory-scope mapping (global/agent-wide/user-wide/agent-user
relationship) is still explicitly open, and this issue has no business
deciding it unilaterally -- session-as-identity is the narrowest
unambiguous scope available today and is forward-compatible with a
later, properly-decided identity resolution.

curator gains ConversationSource (RecentSessions/Messages), gated in
Registry.validateDeclared/filter exactly like Skills/MemoryEngines, plus
Manifest.Conversations. internal/infrastructure/sessioncurator/adapter.go
adapts gateway.SessionStore's full CRUD/branch/search surface down to
those two read-only methods -- curator must not import gateway.Message,
so role derivation (message.From == botUser -> assistant) is copied from
gateway.compressTurnHistory's existing logic, not shared.

sessioncurator.go: Check is a cheap RecentSessions bool. Pass takes each
session's last 40 messages, asks the model for a JSON array of durable
facts (capped at 5/session), and writes each through
Registrar.MemoryEngines.Get(name) -- resolved by name at call time, the
same trust model every other curator capability already uses. A
response that fails to parse degrades to "nothing extracted" for that
session (not a Pass error); a real model-call failure propagates as one
(these were originally conflated into the same swallowed-error path --
caught by TestPassPropagatesALLMFailure, fixed by splitting the model
call from the parse step). PassInput.Since zero resolves to a 24h
lookback, not the beginning of time, so a cold-start first pass can't
read a session's entire history.

Manifest.OnInput = true wakes it via the existing WakeOnPrimaryInput
wiring (events.KindTurnCompleted), which already excludes every
curator-derived event kind from the forwarded set -- the trigger-
accounting invariant (archie-core-1786637489768) needed no new code to
hold here.

Wired into bootstrap.go:setupCurators via a new curatorLLMRunner adapter
(main.go) over the shared ai-sdk runtime, and sessioncurator.NewAdapter
over b.chatSessionStore/b.cfg.BotUser. Model resolves from
b.chatModels.ActiveModel() -- not b.defaultChatIdentity, which names a
task-routing identity, not a model reference (the same source
telegram_setup.go's sendChatTurn already uses for a real chat turn).

task check is green (full Go suite + dashboard tests).
2026-09-02 03:09:04 +10:00
sam 71096f34d4 chore(release): archied v1.19.9 archie v1.19.9
deploy / gate (push) Failing after 2m44s
deploy / build-and-push (push) Skipped
2026-09-02 02:59:17 +10:00
sam 40ad32468b chore(beads): close skill curator reference implementation 2026-09-02 02:58:52 +10:00