Nightly Build / build (push) Successful in 6m58s
Reframe TIC from an ownerless global loop into a per-user system agent.
The events it reads live in each user's own encrypted mcp_events, the
connectors that produced them run in that user's container, and the
notifications go to that user's hub — so the previous design (built
against the ownerless Conversation bundle, writing into system.db and
notifying a hub with no subscribers) was inert by construction.
Core changes
- TicManager owns no timer and no user list. It now exposes
run_for(user_id, pool, sessions, hub): one tick for one user, over
deps unpacked from that user's UserContext. Removed from the
Conversation bundle; Skald::tic_manager() is gone.
- New spawn_system_agents in wiring.rs: one instance-wide loop, spawned
post-construction with a Weak<Skald> (like spawn_user_lifecycle).
Each pass walks the directory and runs TIC for one user at a time —
sequential, because a pass is N container round-trips and N LLM calls
nobody is waiting on. A ConfigKeyUpdated on the interval key cuts the
current wait short; enabled is re-read per pass.
- A user whose database is still locked is skipped (normal, not an
error): the pool is the unlock token, so a user who hasn't logged in
since restart has no readable events and nowhere to record a skip.
- The configured tic.security_group is re-checked per user through
run_context::reconcile_group_for_user — a restricted member never
gets a tool set their role wouldn't grant; unconfigured starts from
role_default_run_context, never None (None = catch-all = wider).
- New system_agent_runs owner table (no user_id column — the file is
the owner): start/finish split so a crash leaves a visible 'running'
row, swept to 'failed' by the next start; safe because the scheduler
is sequential and single-instance. An idle tick writes nothing.
- counting_notify wraps the notify tool so the run log can report
notifications emitted without the tool knowing it's counted.
- The session's event channel is drained by a spawned task instead of
a dropped receiver — the translator awaits its sends and would wedge
at capacity.
EventLog::{Persist,Discard} on McpManager::new
- mcp_events is an owner table and its only reader (TIC) is per-user,
so an event is something that happened to someone. The per-user
runtime gets Persist; the ownerless global runtime gets Discard (its
pool is system.db, rows would be unattributable and unread).
API + UI
- GET /api/system-agents/runs: the caller's own run history, scoped
through require_context with no admin override (same promise as the
rest of the private pool).
- web/components/system-agents.js replaces tic-sessions.js. The old
#tic debug page inferred runs from leftover ephemeral sessions; the
new #system-agents page (sidebar group 'extensions', visible to
everyone — the data is the caller's own) reads the real run log.
- i18n: tic.* keys replaced with system_agents.* in en/it/fr.
Docs
- New docs/system-agents.md (user-facing: what TIC does, why it runs
per person, why a run can be missing). Updated docs/settings.md and
docs/index.md.
- agents/tic/AGENT.md reframed per-user: events are that person's,
memory is user-memory/ (private) — never shared-memory/.
- CLAUDE.md records the system-agents design and the EventLog seam.
130 lines
5.4 KiB
HTML
130 lines
5.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Skald</title>
|
|
<link rel="icon" href="/assets/icons/favicon.ico" sizes="any" />
|
|
<link rel="icon" href="/assets/icons/icon-192.png" type="image/png" />
|
|
|
|
<!-- Redirect mobile browsers to the mobile UI -->
|
|
<script>
|
|
(function () {
|
|
var isMobile = /Android|iPhone|iPad|iPod/i.test(navigator.userAgent) || window.innerWidth < 768;
|
|
if (isMobile) window.location.replace('/mobile.html');
|
|
})();
|
|
</script>
|
|
|
|
<!-- Apply theme before render to avoid flash. localStorage wins over OS preference. -->
|
|
<script>
|
|
(function () {
|
|
const saved = localStorage.getItem('theme');
|
|
const dark = saved ? saved === 'dark' : window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
document.documentElement.setAttribute('data-bs-theme', dark ? 'dark' : 'light');
|
|
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
|
|
if (!localStorage.getItem('theme')) {
|
|
document.documentElement.setAttribute('data-bs-theme', e.matches ? 'dark' : 'light');
|
|
}
|
|
});
|
|
})();
|
|
</script>
|
|
|
|
<!-- Font -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" />
|
|
|
|
<!-- Bootstrap 5 -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" />
|
|
<!-- Bootstrap Icons -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" />
|
|
|
|
<link rel="stylesheet" href="css/variables.css" />
|
|
<link rel="stylesheet" href="css/topbar.css" />
|
|
<link rel="stylesheet" href="css/sidebar.css" />
|
|
<link rel="stylesheet" href="css/copilot.css" />
|
|
<link rel="stylesheet" href="css/copilot-messages.css" />
|
|
<link rel="stylesheet" href="css/copilot-input.css" />
|
|
<link rel="stylesheet" href="css/dialogs.css" />
|
|
<link rel="stylesheet" href="css/page-shell.css" />
|
|
<link rel="stylesheet" href="css/connectors.css" />
|
|
<link rel="stylesheet" href="css/models-hub.css" />
|
|
<link rel="stylesheet" href="css/tasks/base.css" />
|
|
<link rel="stylesheet" href="css/tasks/history.css" />
|
|
<link rel="stylesheet" href="css/models-llm.css" />
|
|
<link rel="stylesheet" href="css/models-image.css" />
|
|
<link rel="stylesheet" href="css/llm-providers.css" />
|
|
<link rel="stylesheet" href="css/agents.css" />
|
|
<link rel="stylesheet" href="css/approval-groups.css" />
|
|
<link rel="stylesheet" href="css/approval-rules.css" />
|
|
<link rel="stylesheet" href="css/inbox-cards.css" />
|
|
<link rel="stylesheet" href="css/config.css" />
|
|
<link rel="stylesheet" href="css/agent-inbox.css" />
|
|
<link rel="stylesheet" href="css/home.css" />
|
|
<link rel="stylesheet" href="css/llm-requests.css" />
|
|
<link rel="stylesheet" href="css/setup-page.css" />
|
|
<link rel="stylesheet" href="css/users-roles.css" />
|
|
<link rel="stylesheet" href="css/projects/base.css" />
|
|
<link rel="stylesheet" href="css/projects/board.css" />
|
|
<link rel="stylesheet" href="css/file-viewer.css" />
|
|
|
|
<script src="/vendor/cronstrue.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.7/dist/chart.umd.min.js"></script>
|
|
|
|
<script type="importmap">
|
|
{
|
|
"imports": {
|
|
"lit": "/vendor/lit-all.min.js",
|
|
"lit/directives/unsafe-html.js": "/vendor/lit-all.min.js",
|
|
"marked": "/vendor/marked.esm.js",
|
|
"dompurify": "/vendor/purify.es.mjs",
|
|
"cronstrue": "/vendor/cronstrue.mjs"
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="app">
|
|
<app-topbar></app-topbar>
|
|
<div class="app-body">
|
|
<app-sidebar></app-sidebar>
|
|
<div class="app-workspace" id="app-workspace"></div>
|
|
<agents-page></agents-page>
|
|
<users-page></users-page>
|
|
<roles-page></roles-page>
|
|
<shared-folders-page></shared-folders-page>
|
|
<connectors-page></connectors-page>
|
|
<connector-detail-page></connector-detail-page>
|
|
<plugins-page></plugins-page>
|
|
<plugin-page-host></plugin-page-host>
|
|
<plugin-catalog-page></plugin-catalog-page>
|
|
<plugin-detail-page></plugin-detail-page>
|
|
<marketplace-page></marketplace-page>
|
|
<catalog-page></catalog-page>
|
|
<profile-page style="display:none"></profile-page>
|
|
<llm-providers-page></llm-providers-page>
|
|
<models-hub-page></models-hub-page>
|
|
<tasks-page></tasks-page>
|
|
<approval-groups-page></approval-groups-page>
|
|
<approval-rules-page></approval-rules-page>
|
|
<config-page></config-page>
|
|
<dashboard-page></dashboard-page>
|
|
<agent-inbox-page></agent-inbox-page>
|
|
<llm-requests-page></llm-requests-page>
|
|
<session-detail-page style="display:none"></session-detail-page>
|
|
<system-agents-page style="display:none"></system-agents-page>
|
|
<projects-page style="display:none"></projects-page>
|
|
<file-viewer-page style="display:none"></file-viewer-page>
|
|
<tool-detail-page style="display:none"></tool-detail-page>
|
|
<app-copilot></app-copilot>
|
|
</div>
|
|
</div>
|
|
|
|
<setup-page style="display:none"></setup-page>
|
|
<login-page style="display:none"></login-page>
|
|
|
|
<script type="module" src="app.js"></script>
|
|
</body>
|
|
</html>
|