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
Run the GitHub notifications check as a System task (#12937)
[._.]/4eae283b84c3
diff --git a/client/src/components/github/GitHubAutomationsTab.jsx b/client/src/components/github/GitHubAutomationsTab.jsxindex 47aa581e44..09ef99d1a8 100644--- a/client/src/components/github/GitHubAutomationsTab.jsx+++ b/client/src/components/github/GitHubAutomationsTab.jsx@@ -26,17 +26,17 @@ function modeHint(account) {const where = account.trust === 'private'? 'Text goes only to local AI providers unless you allow others in Accounts.': 'Text goes to the GitHub notifications provider in Models › LLMs › Abuse Guard.';- const assist = `Screens and sorts notifications no rule decided, marks CI noise done and closed threads read. Never acts on outside or suspect threads. ${where}`;+ const assist = `Screens and sorts notifications no rule decided, marks CI noise and closed threads done. Never acts on outside or suspect threads. ${where}`;if (account.mode !== 'autopilot') return assist;const handoff = account.trust === 'private'? 'Private accounts never hand threads off.'- : 'Also hands outside review requests and issues in your PortOS apps to Untrusted:Review and the issue watcher, when those are on for the app. Nothing outside your apps is ever started.';+ : 'Also hands outside review requests, outside issues and security alerts in your PortOS apps to Untrusted:Review, the issue watcher and dependency updates when those are on for the app, one run per app for each. Nothing outside your apps is ever started.';return `${assist} ${handoff}`;}const CADENCE_TEXT = {'weekdays-15m': 'Every 15 minutes on weekdays',- custom: 'On a custom schedule (CoS › Schedule)',+ custom: 'On a custom schedule (CoS › System Tasks)',off: 'Only when you tap Run now',};diff --git a/client/src/hooks/useOnDemandTaskToast.js b/client/src/hooks/useOnDemandTaskToast.jsindex 9f15cb5b02..098cfe558e 100644--- a/client/src/hooks/useOnDemandTaskToast.js+++ b/client/src/hooks/useOnDemandTaskToast.js@@ -148,9 +148,9 @@ export function useOnDemandTaskToast() {});return;}- // error-log-triage's and github-notifications' deterministic pass IS- // the run; the reason is its result line.- if (['error-log-triage', 'github-notifications'].includes(data?.taskType) && data?.reason) {+ // error-log-triage's deterministic pass IS the run; the reason is its+ // result line.+ if (data?.taskType === 'error-log-triage' && data?.reason) {toast(`${task}: ${data.reason}.`, { duration: 7000, icon: '🩺' });return;}diff --git a/scripts/migrations/437-github-notifications-system-task.js b/scripts/migrations/437-github-notifications-system-task.jsnew file mode 100644index 0000000000..864806e3fb--- /dev/null+++ b/scripts/migrations/437-github-notifications-system-task.js@@ -0,0 +1,73 @@+/**+ * Move the GitHub notifications check from the CoS scheduled task+ * `github-notifications` to the System task `job-github-notifications`.+ *+ * The check is one pass for the whole install (the accounts on Dev Tools ›+ * GitHub belong to the machine), so it belongs with the other System tasks+ * rather than beside the per-app scheduled tasks. The scheduled task type, its+ * hook and registry entry were removed; the schedule store keeps unknown task+ * types it loads, so without this migration a stale enabled entry would linger.+ *+ * This migration:+ * 1. In `data/cos/task-schedule.json`: read `tasks['github-notifications']`,+ * remove it, its `executions` entry and any queued on-demand request.+ * 2. When that task was on a cron cadence (the Automations tab's weekday+ * check, or a custom cron), seed `job-github-notifications` in+ * `data/cos/autonomous-jobs.json` as enabled with the same cron. The job+ * service fills in every other field from its shipped default at boot.+ *+ * An install that never turned the check on keeps the shipped default (off).+ * Idempotent: a re-run finds no scheduled task to move, and an existing job+ * record is never overwritten. An unreadable jobs file is left alone, and the+ * schedule entry is then kept so the move can be retried.+ */++import { existsSync } from 'fs';+import { join } from 'path';+import { readJsonOrNull, writeJsonAtomic } from './_lib.js';++const SCHEDULE_REL = 'data/cos/task-schedule.json';+const JOBS_REL = 'data/cos/autonomous-jobs.json';+const TASK_TYPE = 'github-notifications';+const JOB_ID = 'job-github-notifications';++const isObject = (value) => value && typeof value === 'object' && !Array.isArray(value);++/** The cron the scheduled task ran on, or null when it was on-demand or off. */+function scheduledCron(task) {+ if (!isObject(task) || task.enabled === false || task.type !== 'cron') return null;+ return typeof task.cronExpression === 'string' && task.cronExpression.trim() ? task.cronExpression.trim() : null;+}++export default {+ async up({ rootDir }) {+ const schedulePath = join(rootDir, SCHEDULE_REL);+ const schedule = await readJsonOrNull(schedulePath);+ if (!isObject(schedule) || !isObject(schedule.tasks) || !(TASK_TYPE in schedule.tasks)) return;+ const cron = scheduledCron(schedule.tasks[TASK_TYPE]);++ if (cron) {+ const jobsPath = join(rootDir, JOBS_REL);+ const jobs = await readJsonOrNull(jobsPath);+ if (jobs === null && existsSync(jobsPath)) {+ console.log(`⏭️ github-notifications: ${JOBS_REL} is not valid JSON; left the scheduled task in place to retry`);+ return;+ }+ const doc = isObject(jobs) && Array.isArray(jobs.jobs) ? jobs : { version: 1, lastUpdated: new Date().toISOString(), jobs: [] };+ if (!doc.jobs.some((job) => isObject(job) && job.id === JOB_ID)) {+ const now = new Date().toISOString();+ doc.jobs.push({ id: JOB_ID, enabled: true, cronExpression: cron, createdAt: now, updatedAt: now });+ await writeJsonAtomic(jobsPath, doc);+ console.log(`📝 github-notifications: carried the ${cron} schedule over to the ${JOB_ID} System task`);+ }+ }++ delete schedule.tasks[TASK_TYPE];+ if (isObject(schedule.executions)) delete schedule.executions[`task:${TASK_TYPE}`];+ if (Array.isArray(schedule.onDemandRequests)) {+ schedule.onDemandRequests = schedule.onDemandRequests.filter((request) => request?.taskType !== TASK_TYPE);+ }+ await writeJsonAtomic(schedulePath, schedule);+ console.log(`📝 github-notifications: removed the retired scheduled task`);+ },+};diff --git a/scripts/migrations/437-github-notifications-system-task.test.js b/scripts/migrations/437-github-notifications-system-task.test.jsnew file mode 100644index 0000000000..bd7234185b--- /dev/null+++ b/scripts/migrations/437-github-notifications-system-task.test.js@@ -0,0 +1,65 @@+import { describe, it, expect, beforeEach, afterEach } from 'vitest';+import { mkdtempSync, rmSync, writeFileSync, readFileSync, mkdirSync, existsSync } from 'fs';+import { tmpdir } from 'os';+import { join } from 'path';++import migration from './437-github-notifications-system-task.js';++const writeJson = (path, value) => writeFileSync(path, JSON.stringify(value, null, 2) + '\n');+const readJson = (path) => JSON.parse(readFileSync(path, 'utf-8'));++describe('migration 437 — GitHub notifications check becomes a System task', () => {+ let rootDir, jobsPath, schedulePath;++ beforeEach(() => {+ rootDir = mkdtempSync(join(tmpdir(), 'migration-437-'));+ mkdirSync(join(rootDir, 'data', 'cos'), { recursive: true });+ jobsPath = join(rootDir, 'data', 'cos', 'autonomous-jobs.json');+ schedulePath = join(rootDir, 'data', 'cos', 'task-schedule.json');+ });++ afterEach(() => {+ rmSync(rootDir, { recursive: true, force: true });+ });++ const schedule = (task) => ({+ version: 2,+ tasks: { 'github-notifications': task, security: { type: 'on-demand', enabled: true } },+ executions: { 'task:github-notifications': { lastRun: 1 }, 'task:security': { lastRun: 2 } },+ onDemandRequests: [{ id: 'demand-1', taskType: 'github-notifications' }, { id: 'demand-2', taskType: 'security' }],+ });++ it('carries a weekday schedule over to an enabled System task and removes the scheduled task', async () => {+ writeJson(schedulePath, schedule({ type: 'cron', cronExpression: '*/15 * * * 1-5', enabled: true }));+ writeJson(jobsPath, { version: 1, jobs: [{ id: 'job-system-health-check', enabled: true }] });++ await migration.up({ rootDir });++ const jobs = readJson(jobsPath).jobs;+ expect(jobs.find((job) => job.id === 'job-github-notifications')).toMatchObject({ enabled: true, cronExpression: '*/15 * * * 1-5' });+ expect(jobs.find((job) => job.id === 'job-system-health-check')).toEqual({ id: 'job-system-health-check', enabled: true });+ const after = readJson(schedulePath);+ expect(Object.keys(after.tasks)).toEqual(['security']);+ expect(Object.keys(after.executions)).toEqual(['task:security']);+ expect(after.onDemandRequests.map((request) => request.id)).toEqual(['demand-2']);++ // A re-run finds nothing to move and leaves the job as it is.+ await migration.up({ rootDir });+ expect(readJson(jobsPath).jobs.filter((job) => job.id === 'job-github-notifications')).toHaveLength(1);+ });++ it('leaves an install that never turned the check on to the shipped default (off)', async () => {+ writeJson(schedulePath, schedule({ type: 'on-demand', cronExpression: null, enabled: true }));+ await migration.up({ rootDir });+ expect(existsSync(jobsPath)).toBe(false);+ expect(readJson(schedulePath).tasks['github-notifications']).toBeUndefined();+ });++ it('keeps the scheduled task to retry when the jobs file cannot be parsed', async () => {+ writeJson(schedulePath, schedule({ type: 'cron', cronExpression: '0 9 * * *', enabled: true }));+ writeFileSync(jobsPath, '{ not json');+ await migration.up({ rootDir });+ expect(readFileSync(jobsPath, 'utf-8')).toBe('{ not json');+ expect(readJson(schedulePath).tasks['github-notifications']).toMatchObject({ cronExpression: '0 9 * * *' });+ });+});diff --git a/server/lib/scheduledTaskTypes.js b/server/lib/scheduledTaskTypes.jsindex d96e2a544a..ebd45bba9e 100644--- a/server/lib/scheduledTaskTypes.js+++ b/server/lib/scheduledTaskTypes.js@@ -188,11 +188,6 @@ export const SELF_IMPROVEMENT_TASK_TYPES = [// Install-wide only; its buildTaskInput hook (errorLogTriageHooks.js) does// the whole pass deterministically and never spawns a coordinator agent.'error-log-triage',- // Syncs each configured GitHub account's notifications and records a- // rule-based triage decision per thread (#12871). Install-wide only; its- // buildTaskInput hook (githubNotificationsHooks.js) does the whole pass- // without a model and never spawns a coordinator agent.- 'github-notifications',// layered-intelligence is a PROGRAMMATIC-I/O task: it spawns a NORMAL reasoning// agent (visible in the CoS queue + Active Agents, TUI-attachable) with two// deterministic hooks around it — buildTaskInput gathers the app's goals +diff --git a/server/lib/taskTargetScope.js b/server/lib/taskTargetScope.jsindex 7522882d3e..7be0b9f54e 100644--- a/server/lib/taskTargetScope.js+++ b/server/lib/taskTargetScope.js@@ -22,7 +22,7 @@* instead of forcing every run through the app picker (which would make the* install-wide lane unreachable on any install that has apps).*/-export const INSTALL_WIDE_TASK_TYPES = new Set(['repo-sync', 'user-action-review', 'model-comparison-refresh', 'error-log-triage', 'github-notifications']);+export const INSTALL_WIDE_TASK_TYPES = new Set(['repo-sync', 'user-action-review', 'model-comparison-refresh', 'error-log-triage']);// Task types that only make sense when pointed at a managed app. Keeping this// alongside the install-wide registry gives both the on-demand request gate@@ -66,8 +66,6 @@ const INSTALL_WIDE_ONLY_TASK_TYPES = new Set(['model-comparison-refresh',// Triage reads PortOS's own PM2 logs, which belong to no managed app.'error-log-triage',- // The configured GitHub accounts belong to the machine, not to a managed app.- 'github-notifications',...PROGRAMMATIC_SCHEDULED_TASK_TYPES,]);diff --git a/server/services/autonomousJobs/defaults.js b/server/services/autonomousJobs/defaults.jsindex 97233e0e53..93b27cad1d 100644--- a/server/services/autonomousJobs/defaults.js+++ b/server/services/autonomousJobs/defaults.js@@ -227,6 +227,28 @@ Phase 4 — Report:createdAt: null,updatedAt: null},+ {+ // Syncs and triages the accounts on Dev Tools › GitHub (#12871). One pass+ // for the whole install, so a System task rather than a per-app scheduled+ // task. Off by default so other installs do not start polling GitHub on+ // upgrade; the GitHub Automations tab turns it on in one tap. The cron is+ // GITHUB_NOTIFICATION_CADENCES['weekdays-15m'] (lib/validation.js).+ id: 'job-github-notifications',+ name: 'GitHub Notifications Check',+ description: 'Check each GitHub account on Dev Tools › GitHub for new notifications and apply its triage rules. Observe accounts only record decisions; Assist and Autopilot accounts also act. Never polls faster than GitHub allows.',+ category: 'github-notifications',+ interval: 'custom',+ intervalMs: 15 * 60 * 1000,+ cronExpression: '*/15 * * * 1-5',+ enabled: false,+ priority: 'LOW',+ type: 'script',+ scriptHandler: 'github-notifications',+ lastRun: null,+ runCount: 0,+ createdAt: null,+ updatedAt: null+ },{id: 'job-eidoverse-projection',name: 'Eidoverse PortOS World Projection',diff --git a/server/services/autonomousJobs/scriptHandlers.js b/server/services/autonomousJobs/scriptHandlers.jsindex f1744d1e95..9e4ce2ac9f 100644--- a/server/services/autonomousJobs/scriptHandlers.js+++ b/server/services/autonomousJobs/scriptHandlers.js@@ -27,6 +27,16 @@ async function eidoverseProjection(options = {}) {return projectEidoverseWorld({ ...options, compact: true })}+// Loaded lazily: the inbox pulls in Postgres and the gh client, which this+// registry must not load at import time. Deterministic, no provider call.+async function githubNotificationsCheck() {+ const { describeScheduledCheck, runScheduledNotificationCheck } = await import('../githubNotifications.js')+ const results = await runScheduledNotificationCheck()+ const summary = describeScheduledCheck(results)+ console.log(`📬 GitHub notifications check: ${summary}`)+ return { summary, accounts: results.length }+}+/*** Run the moltworld-explore.mjs script as a child process (no AI agent needed).* Returns a summary object when the script exits.@@ -217,7 +227,8 @@ const SCRIPT_HANDLERS = {// record-level divergence the cursor-based sync cycle cannot see. Default// job ships disabled — deterministic, no LLM calls.'brain-parity-sweep': runBrainParitySweep,- 'eidoverse-projection': eidoverseProjection+ 'eidoverse-projection': eidoverseProjection,+ 'github-notifications': githubNotificationsCheck// 'layered-intelligence' retired here (#2322): LI is now a per-app scheduled// task, not a global autonomous-job sweep. It runs as a normal reasoning agent// with programmatic-I/O hooks — see taskTypeHooks.js +diff --git a/server/services/cosTaskGenerator.js b/server/services/cosTaskGenerator.jsindex 31e658c42a..fdd56a112e 100644--- a/server/services/cosTaskGenerator.js+++ b/server/services/cosTaskGenerator.js@@ -2037,10 +2037,6 @@ export async function emitOnDemandEmpty({ taskScheduleMod, request, targetApp, tconst { readLastTriageSummary } = await import('./errorLogTriage.js');reason = await readLastTriageSummary().catch(() => null);}- if (outcome === 'idle' && request.taskType === 'github-notifications') {- const { readLastScheduledSummary } = await import('./githubNotifications.js');- reason = readLastScheduledSummary();- }// 'transient' says "the forge probe failed, try again shortly" — only true when// the forge is momentarily flaky. A gh that is missing, unauthenticated, ordiff --git a/server/services/githubNotifications.db.test.js b/server/services/githubNotifications.db.test.jsindex e70d878a43..dd5d5a12d1 100644--- a/server/services/githubNotifications.db.test.js+++ b/server/services/githubNotifications.db.test.js@@ -44,10 +44,9 @@ const { addNotification } = await import('./notifications.js');const { runUntrustedContentAnalysis } = await import('./untrustedContent.js');const { createAccount, updateAccount } = await import('./githubAccounts.js');const {- syncAccountNotifications, listNotifications, applyNotificationAction, getNotification, runScheduledNotificationCheck,- listAutomationActivity, undoAutomationAction, listLearnedRules, resolveWithAgent,+ syncAccountNotifications, listNotifications, applyNotificationAction, getNotification, runScheduledNotificationCheck, describeScheduledCheck,+ listAutomationActivity, undoAutomationAction, listLearnedRules, resolveWithAgent, getAutomationsOverview, setNotificationCadence,} = await import('./githubNotifications.js');-const { buildTaskInput } = await import('./githubNotificationsHooks.js');const { runAccountAudit, applyAuditSuggestion, listAuditChanges, undoAuditChange, sendDueAuditReports } = await import('./githubNotificationAudit.js');let dbReady = false;@@ -575,15 +574,22 @@ describe.skipIf(!runDb)('GitHub notifications inbox against Postgres', () => {await updateAccount(account.id, { auditReport: false });});+ it('turns the System task on and off from the Automations tab, keeping its cron', async () => {+ const { getJob } = await import('./autonomousJobs.js');+ expect(await getJob('job-github-notifications')).toMatchObject({ enabled: false, type: 'script', scriptHandler: 'github-notifications' });+ expect((await getAutomationsOverview()).cadence).toBe('off');+ expect(await setNotificationCadence('weekdays-15m')).toMatchObject({ cadence: 'weekdays-15m', cronExpression: '*/15 * * * 1-5' });+ expect(await getJob('job-github-notifications')).toMatchObject({ enabled: true, cronExpression: '*/15 * * * 1-5' });+ expect(await setNotificationCadence('off')).toMatchObject({ cadence: 'off', cronExpression: '*/15 * * * 1-5' });+ });+it('runs the scheduled pass without any model call, respecting the poll interval', async () => {mockGh(() => listing([thread('801')]));const fetchSpy = vi.spyOn(globalThis, 'fetch').mockRejectedValue(new Error('no network in this test'));- const first = await buildTaskInput({ app: { id: null } });- expect(first.skip.reason).toMatch(/^checked \d+ of \d+ account\(s\)/);+ expect(describeScheduledCheck(await runScheduledNotificationCheck())).toMatch(/^checked \d+ of \d+ account\(s\)/);const second = await runScheduledNotificationCheck();expect(second.find((result) => result.accountId === account.id)).toMatchObject({ skipped: 'poll-interval' });expect(fetchSpy).not.toHaveBeenCalled();- expect(await buildTaskInput({ app: { id: 'app-1' } })).toEqual({ skip: { reason: 'install-wide-only' } });fetchSpy.mockRestore();});});diff --git a/server/services/githubNotifications.js b/server/services/githubNotifications.jsindex 3243529af1..87b12400a8 100644--- a/server/services/githubNotifications.js+++ b/server/services/githubNotifications.js@@ -417,10 +417,9 @@ export async function getNotification(accountId, threadId) {}let lastScheduledSummary = null;-export const readLastScheduledSummary = () => lastScheduledSummary;/**- * The `github-notifications` scheduled pass: sync and triage every enabled+ * The GitHub Notifications Check System task: sync and triage every enabled* account whose poll interval has elapsed. Observe mode records decisions* only; an Assist account also sorts and acts (githubNotificationAssist.js).*/@@ -464,18 +463,19 @@ export function describeScheduledCheck(results) {return parts.join(', ');}-const CADENCE_TASK_TYPE = 'github-notifications';+// The check is the CoS System task `job-github-notifications`+// (autonomousJobs/defaults.js): one pass for the whole install.+const NOTIFICATION_CHECK_JOB_ID = 'job-github-notifications';-function cadenceOf(interval) {- if (interval?.enabled && interval.type === 'cron' && interval.cronExpression === GITHUB_NOTIFICATION_CADENCES['weekdays-15m']) return 'weekdays-15m';- if (interval?.enabled && interval.type === 'cron') return 'custom';- return 'off';+function cadenceOf(job) {+ if (!job?.enabled) return 'off';+ return job.cronExpression === GITHUB_NOTIFICATION_CADENCES['weekdays-15m'] ? 'weekdays-15m' : 'custom';}/** What the Automations tab shows: the check's cadence and each account's last run. */export async function getAutomationsOverview() {- const { getTaskInterval } = await import('./taskSchedule.js');- const [accounts, interval] = await Promise.all([listAccounts(), getTaskInterval(CADENCE_TASK_TYPE)]);+ const { getJob } = await import('./autonomousJobs.js');+ const [accounts, job] = await Promise.all([listAccounts(), getJob(NOTIFICATION_CHECK_JOB_ID)]);const ids = accounts.map((account) => account.id);const [syncRows, countRows] = await Promise.all([query('SELECT account_id, last_sync_at, last_error, poll_interval_seconds FROM github_notification_sync WHERE account_id = ANY($1::text[])', [ids]),@@ -489,8 +489,8 @@ export async function getAutomationsOverview() {const syncById = new Map(syncRows.rows.map((row) => [row.account_id, row]));const countsById = new Map(countRows.rows.map((row) => [row.account_id, row]));return {- cadence: cadenceOf(interval),- cronExpression: interval?.type === 'cron' ? interval.cronExpression || null : null,+ cadence: cadenceOf(job),+ cronExpression: job?.cronExpression || null,lastSummary: lastScheduledSummary,accounts: accounts.map((account) => {const sync = syncById.get(account.id);@@ -513,13 +513,13 @@ export async function getAutomationsOverview() {};}-/** Turn the weekday 15-minute check on, or back to Run now only. */+/** Turn the weekday 15-minute check on, or off. */export async function setNotificationCadence(cadence) {- const { updateTaskInterval } = await import('./taskSchedule.js');+ const { updateJob } = await import('./autonomousJobs.js');const cron = GITHUB_NOTIFICATION_CADENCES[cadence];- await updateTaskInterval(CADENCE_TASK_TYPE, cron- ? { type: 'cron', cronExpression: cron, enabled: true }- : { type: 'on-demand', cronExpression: null, enabled: true });+ // Off keeps the job's cron, so turning it back on restores the same cadence.+ const job = await updateJob(NOTIFICATION_CHECK_JOB_ID, cron ? { enabled: true, cronExpression: cron } : { enabled: false });+ if (!job) throw new ServerError('The GitHub notifications System task is missing; restart PortOS to restore it', { status: 409, code: 'GITHUB_NOTIFICATION_JOB_MISSING' });return getAutomationsOverview();}diff --git a/server/services/githubNotificationsHooks.js b/server/services/githubNotificationsHooks.jsdeleted file mode 100644index b73ab98a21..0000000000--- a/server/services/githubNotificationsHooks.js+++ /dev/null@@ -1,18 +0,0 @@-/**- * Pre-agent hook for the `github-notifications` scheduled task (#12871).- *- * The pass is deterministic (services/githubNotifications.js): sync each- * enabled account, then record a rule-based triage decision per thread. It- * starts no agent and calls no model, so the hook always answers `skip`;- * `resolveTaskInputHook` records the execution, advancing the cadence.- */-import { describeScheduledCheck, runScheduledNotificationCheck } from './githubNotifications.js';--export async function buildTaskInput({ app } = {}) {- // The accounts belong to this machine; a per-app dispatch would sync them- // once per app.- if (app?.id) return { skip: { reason: 'install-wide-only' } };- const line = describeScheduledCheck(await runScheduledNotificationCheck());- console.log(`📬 github-notifications: ${line}`);- return { skip: { reason: line } };-}diff --git a/server/services/taskSchedule.test.js b/server/services/taskSchedule.test.jsindex e648ee6bbe..c6c26df818 100644--- a/server/services/taskSchedule.test.js+++ b/server/services/taskSchedule.test.js@@ -306,7 +306,7 @@ describe('taskSchedule', () => {// repo-sync sweeps every managed checkout; user-action-review reads the// install-wide operator-action ledger; error-log-triage reads PortOS's own// PM2 logs — none is a per-app run.- expect([...INSTALL_WIDE_TASK_TYPES]).toEqual(['repo-sync', 'user-action-review', 'model-comparison-refresh', 'error-log-triage', 'github-notifications'])+ expect([...INSTALL_WIDE_TASK_TYPES]).toEqual(['repo-sync', 'user-action-review', 'model-comparison-refresh', 'error-log-triage'])})it('every install-wide type is a registered task type', () => {diff --git a/server/services/taskScheduleRegistry.js b/server/services/taskScheduleRegistry.jsindex 4e956a543a..4bf02141d7 100644--- a/server/services/taskScheduleRegistry.js+++ b/server/services/taskScheduleRegistry.js@@ -440,11 +440,6 @@ const TASK_INTERVAL_DEFAULTS = {// buildTaskInput hook never spawns a coordinator agent — hence no prompt.// taskMetadata holds the run caps (lib/cosValidation.js clamps them).'error-log-triage': { type: INTERVAL_TYPES.ON_DEMAND, enabled: true, providerId: null, model: null, prompt: null, taskMetadata: Object.fromEntries(Object.entries(ERROR_LOG_TRIAGE_LIMITS).map(([key, limit]) => [key, limit.default])) },- // github-notifications (#12871) syncs and triages the GitHub accounts on- // Dev Tools › GitHub. Off by default like every shipped task (other installs- // must not start polling GitHub on upgrade); the Automations tab sets the- // weekday cadence in one tap. No provider call and no coordinator agent.- 'github-notifications': { type: INTERVAL_TYPES.ON_DEMAND, enabled: true, providerId: null, model: null, prompt: null },// layered-intelligence is a programmatic-I/O task (agent-backed, hooked). On-demand// by default; per-app scheduling (enabled/interval/provider/model) is set in the// Intelligence tab and stored on the app's taskTypeOverrides['layered-intelligence'].@@ -680,7 +675,6 @@ export const TASK_TYPE_DESCRIPTIONS = {'media-render-research': 'Research local Apple Silicon image/video models, runtimes and settings; file ready-to-work issues for improvements (no code)','user-action-review': 'Review the operator-action log for repeated manual work and propose automations — file issues (default) or queue CoS tasks','error-log-triage': 'Triage new stderr lines from PortOS processes — fingerprint and dedupe against issues, then queue one investigation agent per new fault',- 'github-notifications': 'Check each GitHub account\'s notifications and record a rule-based triage decision per thread — no model, no GitHub writes in Observe mode','layered-intelligence': "Use app goals + performance metrics to file at most one deduplicated improvement issue; inspect read-only context and file a visibility gap when evidence is insufficient — no code",'development-watchdog': 'Inspect maintainer repository ownership and queue eligible work without an inference call','music-video-autopilot': 'Turn the next unused Brain idea into a fully autonomous music video — lyrics, Suno song, mood board and video. No agent',@@ -716,10 +710,6 @@ export const TASK_TYPE_PROMPT_INFO = Object.freeze({mode: 'runtime-generated',description: 'PortOS reads its own stderr logs, fingerprints and redacts each new fault, and dedupes it against the issue tracker with no model call. Each new fault seen at least the configured number of times queues one investigation agent on the provider and model below, up to the per-run cap; that prompt is generated from the redacted excerpt.'}),- 'github-notifications': Object.freeze({- mode: 'runtime-generated',- description: 'No prompt: PortOS fetches notification metadata for each account on Dev Tools › GitHub and applies fixed trust, spam and routing rules. Observe mode only records the decisions.'- }),'layered-intelligence': Object.freeze({mode: 'runtime-generated',description: 'Generated for each run from the app\'s configured goals, metrics, and repository context.'diff --git a/server/services/taskTypeHooks.js b/server/services/taskTypeHooks.jsindex 478e9b6bec..a048c8992c 100644--- a/server/services/taskTypeHooks.js+++ b/server/services/taskTypeHooks.js@@ -86,11 +86,6 @@ const HOOK_MODULES = {'error-log-triage': {load: () => import('./errorLogTriageHooks.js')},- // buildTaskInput only: syncs and triages the GitHub notification inboxes- // and always skips — the pass is the run.- 'github-notifications': {- load: () => import('./githubNotificationsHooks.js')- },};const PAYLOAD_OPTIONAL_OUTPUT_HOOKS = new Set();