Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Merge pull request #2292 from atomantic/next/issue-2142
[._.]/ Adam Eivy0db4daa9fed9
diff --cc .changelog/NEXT.mdindex dbc6bf8468,4bb78ed0ca..031e4e7490--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@@ -29,9 -29,12 +29,13 @@@- **Partially-completed issues no longer become un-claimable "zombies," and a new scheduled task heals any that already exist.** When a claim run shipped only PART of an issue's scope and merged the PR, the issue was left OPEN with its `in-progress` label (and assignee) still on — and since the claim queue treats `in-progress` as "claimed and being worked," the remaining scope was never re-picked and never finished (real cases: #2220, #2179, #2175). The completion flow was binary (fully-done → close + unlabel) with no "partial ship" path, and the branch reconciler is branch-centric so it never touched the linked issue. Two fixes: **(1)** the `claim-issue` / `-gitlab` / `-jira` prompts now choose the PR trailer deliberately (`Closes` for a full ship, `Refs` + a `## Remaining` section for a partial one) and Phase 7 reconciles the issue with an agent-judged hybrid — close + file a scoped follow-up when the remainder is a clean separable chunk, else post a `Done ✓ / Remaining ▢` comment and release the `in-progress` claim so the queue re-picks it (JIRA records remaining scope + files a follow-up ticket). **(2)** a new opt-in per-app `issue-reconcile` CoS task (sibling to `branch-reconcile`, disabled by default) runs a deterministic `gh`/`git` scan for zombie issues — open + `in-progress` yet with their PR merged and no live claim anywhere (no open PR, no local/remote/CoS claim branch, no active agent) — and dispatches a coordinator agent that applies the same hybrid per issue, with an `autoClose` toggle (OFF ⇒ comment + release only) and follow-up dedup so two federated peers can't file duplicates. Perpetual drain with a convergence signature, exactly like branch-reconcile. (`server/services/issueReconcile.js`, `server/services/cosTaskGenerator.js`, `server/services/taskSchedule.js`, `server/lib/cosValidation.js`, `server/services/taskPromptDefaults/`)+ ## Privacy Center++ - **[issue-2142] A new Privacy Center UI puts your encrypted PII vault and the organizations that hold it in one place.** Building on the Phase 1 encrypted vault (#2140) and Phase 2 trusted-organizations registry (#2141), a deep-linkable `/privacy/:tab` page (Identity → Privacy, `⌘K`/voice-navigable) ships three tabs: **Overview** — a doctor-style readout of whether AES-256-GCM encryption is engaged, vault record counts by type, and org counts by trust stance, with quick-jump cards into the other tabs; **Vault** — records grouped by type showing only the precomputed masked value (`•••, Portland OR` / `a•••@example.com`), with per-record "Share with Twin" / "Use for scans" optimistic toggles (hard-disabled for sensitive SSN/passport/license/financial types), a create/edit `Drawer`, and an explicit per-record **Reveal** action that decrypts plaintext only on click (never cached in list state) — plaintext never renders until you ask for it; **Organizations** — a trust/category/status chip-filtered list with per-org holdings status badges and a create/edit drawer whose holdings picker checkboxes over your vault records (masked) to record which fields each org holds. All mutations update local state directly (no full-list refetch), deletes use an inline confirm row (no `window.confirm`), and every tab is usable at 360px. Each tab path is registered in the nav manifest (`nav.identity.privacy-*`). (`client/src/pages/Privacy.jsx`, `client/src/components/privacy/`, `client/src/services/apiPrivacy.js`, `server/lib/navManifest.js`)+## Layered Intelligence+- **[issue-2262] The loop can now hand a trivial, safe fix straight to a coding agent instead of only filing it.** Each app's Intelligence config gains an opt-in "Auto hand-off" toggle (off by default, on top of enabling the loop). When it's on and the reasoner marks its single proposal both `trivial` and `safe`, the loop still files the tracker issue for the audit trail, then also queues an approval-gated CoS coding-agent task to implement that exact issue end-to-end (read → fix → test → PR that closes it, or stop and comment if it turns out non-trivial). The reasoner's JSON now carries `complexity` (`trivial`/`moderate`/`complex`) and `safe` fields, and the prompt only mentions the hand-off path when the app enabled it — so a hand-off-off app's reasoning is unchanged. The hand-off only fires for a concretely-filed forge issue or Jira ticket (a plan-tracked app has no issue number, so it stays file-only and its PLAN item is drained by the normal claim-work scheduler), the enqueued task requires user approval before any code is written, and it's deduped per app so a re-run won't double-queue while the fix is still pending. No cold-bootstrap risk — it only runs inside the already user-enabled scheduled sweep. (`server/services/layeredIntelligence.js` `isHandoffEligible`/`buildHandoffTask`, `server/services/autonomousJobs/layeredIntelligenceHandler.js`, `server/lib/validation.js`, `server/services/apps.js`, `client/src/components/apps/LayeredIntelligenceTab.jsx`)- **[issue-2262] A dedicated Layered Intelligence page now surfaces the self-improvement loop's status across every app.** The perpetual per-app loop was previously visible only inside each app's Edit-App → Intelligence drawer tab, so there was no single place to see which apps had it enabled, when each last ran / is next due, or whether the global sweep job is even on. The new `/layered-intelligence` route (Chief of Staff → Layered Intelligence, `⌘K`/voice-navigable) reads a deterministic cross-app overview — each active app's effective config plus scheduler bookkeeping (`lastRunAt`/`nextDueAt`/due) and the global job's on/off state — with no LLM or forge I/O. It warns when the global job is disabled (per-app configs are inert until it's on), lists enabled apps with their interval, telemetry sources, allowed scopes, and provider, and deep-links each app's "Configure" action straight into its Intelligence tab (`/apps/:id?edit=1&appTab=intelligence`, via a new auto-open trigger on the app-detail drawer). (`server/routes/apps.js`, `server/services/layeredIntelligence.js` `summarizeLoopStatus`, `client/src/pages/LayeredIntelligence.jsx`, `client/src/components/apps/AppDetailView.jsx`, `server/lib/navManifest.js`)- **[issue-2262] The loop now catches near-duplicate proposals worded differently, not just exact-slug repeats.** The DECIDE layer's dedup was purely the reasoner-chosen slug (plus label) — so if the model proposed the same work under a fresh slug ("introduce-widget" vs an open "add-widget"), it slipped past and filed a second tracker issue. A semantic guard now runs *after* the slug guard passes: it embeds the proposal's title+body and each open (or recently-closed, within the same 30-day window) tracker issue via the local embeddings provider, and suppresses the proposal when a candidate's cosine similarity meets a conservative floor (`SEMANTIC_DEDUP_THRESHOLD = 0.9`). It's strictly best-effort and self-gating: when no embeddings provider is configured (or the proposal embed is skipped/fails) the check reports `available:false` and filing proceeds — slug dedup already guarded the exact case, so an unavailable semantic layer only restores prior behavior, never files a slug-duplicate. No cold-bootstrap risk (embeddings degrade to a no-op with no provider, and this only runs inside the user-enabled scheduled sweep), no new config field, and plan-tracked slug-only issues are simply not embeddable so they're skipped. Candidate embedding is capped per run (`SEMANTIC_DEDUP_MAX_CANDIDATES = 50`) so a large backlog can't fan out unboundedly, and the shared `isIssueWithinDedupWindow` helper keeps the semantic and slug guards agreeing on which issues still count. (`server/services/layeredIntelligence.js` `checkSemanticDuplicate`/`findSemanticDuplicate`/`cosineSimilarity`, `server/services/autonomousJobs/layeredIntelligenceHandler.js`)