rowboat/apps/x/packages/shared/src/index.ts

21 lines
854 B
TypeScript
Raw Normal View History

2025-12-29 15:30:57 +05:30
import { PrefixLogger } from './prefix-logger.js';
export * as ipc from './ipc.js';
export * as models from './models.js';
2025-12-29 15:30:57 +05:30
export * as workspace from './workspace.js';
export * as mcp from './mcp.js';
export * as agentSchedule from './agent-schedule.js';
export * as agentScheduleState from './agent-schedule-state.js';
2026-03-04 22:15:15 +05:30
export * as serviceEvents from './service-events.js'
export * as inlineTask from './inline-task.js';
export * as blocks from './blocks.js';
feat: live notes — single objective per note replaces multi-track model Folds the multi-`track:`-array model into one `live:` block per note: a single persistent objective the live-note agent maintains, plus an optional triggers object (`cronExpr` / `windows` / `eventMatchCriteria`, each independently optional). A note is now passive or live — no per-track scopes, no section ownership contract, no `once` trigger. The agent owns the whole body and makes patch-style incremental edits per run. Highlights: - Schema: `track:` array → single `live:` object (`packages/shared/src/live-note.ts`). - Runtime: scheduler / event processor / runner under `core/knowledge/live-note/`, with split `lastAttemptAt` (every run, drives 5-min backoff) vs `lastRunAt` (success only, anchors cycles). `throwOnError` on agent runs surfaces LLM / billing failures into `lastRunError`. - Today.md: regenerated by template v2 (single objective covering overview / calendar / emails / what-you-missed / priorities; existing files renamed to `Today.md.bkp.<stamp>`). - Renderer: `LiveNoteSidebar` mounts inside the editor row (no chat overlap, auto-closes on note switch); toolbar Radio button becomes a status pill; `LiveNotesView` replaces background-agents view. - Copilot: new `live-note` skill with act-first stance, default folder/cadence pickers, and a non-negotiable rule to extend an existing objective rather than add a second one. Shared `KNOWLEDGE_NOTE_STYLE_GUIDE` enforces terse-and-scannable writing across `doc-collab` and the live-note agent. - Analytics: `track_block` use-case → `live_note_agent`; trigger (`manual` / `cron` / `window` / `event`) becomes the Pass-2 sub-use-case, alongside `routing` for Pass 1. Legacy run files with the old value are read-mapped via `LegacyStartEvent` so they stay openable in the runs list. Hard cutover — no back-compat shims for legacy `track:` frontmatter arrays. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 00:26:46 +05:30
export * as liveNote from './live-note.js';
feat: background tasks Adds Background Tasks — recurring background agents the user can set up to either keep a digest current (daily email summary, top HN stories, weather brief) or perform a recurring action (draft a reply, post to Slack, call an API). Each task is a persistent set of instructions plus optional triggers (schedule, time-of-day window, or matching incoming Gmail / calendar event). The agent reads the verbs in the instructions on every run and picks the right mode automatically. User-facing surfaces: - New "Background tasks" entry in the sidebar, with a table listing every task, its schedule, last run, and an active toggle. - A detail page per task with a max-width reader showing the task's current output and a control sidebar for editing instructions, triggers, and reviewing run history. - "New task" can open in a free-form box where the user describes what they want and Copilot sets it up end-to-end, or in a structured form for manual setup. - "Edit with Copilot" hand-off from the detail view, pre-seeded with the task's context. Under the hood: - The event pipeline that previously powered live-notes is now a generic consumer registry. Live-notes and background tasks both subscribe; incoming events are routed to candidates from both concurrently. - Schedule helpers and the agent-message trigger block are factored out of live-notes into shared modules. Both features use the same building blocks now. - Copilot's proactive routing is reframed: anything recurring (cadence words, watch / monitor verbs, action verbs, event-conditional asks) now flows to background tasks. Live-notes load only on explicit mention. - A small reliability fix for the run-creation fallback chain: an empty-string model/provider passed by an LLM tool call now correctly falls through to the default instead of being persisted as a real value. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 17:43:25 +05:30
export * as events from './events.js';
export * as backgroundTask from './background-task.js';
2026-04-20 14:42:13 +05:30
export * as promptBlock from './prompt-block.js';
2026-03-13 10:26:08 +05:30
export * as frontmatter from './frontmatter.js';
export * as bases from './bases.js';
export * as browserControl from './browser-control.js';
feat(skills): single-source skill system with markdown SKILL.md + include directive Skills move out of packages/core/src/application/assistant/skills/*/skill.ts (TS string constants) into apps/skills/<id>/SKILL.md (Agent Skills spec format — YAML frontmatter + markdown body). One directory, one loader, one place to look at every skill the agent can load. Key change vs the old dev system: a `{{include:<skill-id>}}` directive lets one skill transclude another. This removes the parallel TS constant for the knowledge-note style guide — it now lives at apps/skills/knowledge-note-style/ (hidden from catalog) and is pulled into doc-collab + the live-note and background-task agents via the resolver instead of via a TS import. Infrastructure: - packages/core/src/skills/ — types, skill-md-parser, FS-backed official repo, SkillResolver with recursive {{include:<id>}} expansion + cycle detection - packages/shared/src/skill.ts — SkillFrontmatter, SkillCatalogEntry, ResolvedSkill schemas - DI: officialSkillsRepo + skillResolver registered; registerSkillsDir helper wires the path before any consumer resolves - IPC: skills:list / skills:get (read-only) for the Settings UI - Main: resolveSkillsDir picks Resources/skills (packaged) or repo apps/skills (dev). forge.config.cjs ships apps/skills/ as extraResource. Consumer refactor: - buildCopilotInstructions: catalog markdown built from resolver.getCatalog() - builtin-tools: loadSkill uses resolver, new listSkills tool - background-tasks/agent + live-note/agent: now async builders that load the knowledge-note-style skill content via resolver - runtime.loadAgent: awaits the now-async builders - Deleted: assistant/skills/ directory, knowledge-note-style.ts UI: - New SkillsSettings component (read-only list + detail view) wired into Settings dialog as the "Skills" tab.
2026-05-13 12:31:06 +05:30
export * as skill from './skill.js';
export { PrefixLogger };