@fdcn/sourcefed 0.3.8 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/README.md +36 -1
  2. package/dist/{chunk-5JL3UV72.js → chunk-L4SMC2NT.js} +29 -6
  3. package/dist/cli.js +4485 -2511
  4. package/dist/daemon.js +31 -6
  5. package/dist/mcp.js +2281 -1105
  6. package/dist/opencode.js +1 -1
  7. package/dist/pi.js +1 -1
  8. package/dist.dts/adapters/opencode/bridge.d.ts +1 -1
  9. package/dist.dts/adapters/opencode/subscriptions.d.ts +2 -2
  10. package/dist.dts/adapters/opencode/tui/sidebar.d.ts +1 -1
  11. package/dist.dts/adapters/pi/src/dialog.d.ts +1 -1
  12. package/dist.dts/adapters/pi/src/monitors-dialog.d.ts +1 -1
  13. package/dist.dts/packages/cli/src/commands/monitor/index.d.ts +1 -1
  14. package/dist.dts/packages/cli/src/utils/daemon.d.ts +1 -1
  15. package/dist.dts/packages/cli/src/utils/format.d.ts +1 -1
  16. package/dist.dts/packages/cli/src/utils/webhooks.d.ts +1 -1
  17. package/dist.dts/packages/core/src/events.d.ts +2 -2
  18. package/dist.dts/packages/core/src/index.d.ts +4 -4
  19. package/dist.dts/packages/core/src/monitors/index.d.ts +3 -3
  20. package/dist.dts/packages/core/src/monitors/monitor.d.ts +6 -6
  21. package/dist.dts/packages/core/src/monitors/poll/monitor.d.ts +5 -5
  22. package/dist.dts/packages/core/src/monitors/poll/types/poll-monitor-options.d.ts +1 -1
  23. package/dist.dts/packages/core/src/monitors/poll/types/poll-runner.d.ts +2 -2
  24. package/dist.dts/packages/core/src/monitors/poll/utils/event-delivery-id.d.ts +1 -1
  25. package/dist.dts/packages/core/src/monitors/poll/utils/tick.d.ts +1 -1
  26. package/dist.dts/packages/core/src/monitors/service.d.ts +3 -3
  27. package/dist.dts/packages/core/src/monitors/utils/monitor-identity.d.ts +3 -3
  28. package/dist.dts/packages/core/src/monitors/webhook/monitor.d.ts +5 -5
  29. package/dist.dts/packages/core/src/monitors/webhook/types/pending-webhook-event.d.ts +1 -1
  30. package/dist.dts/packages/core/src/monitors/webhook/types/webhook-monitor-options.d.ts +1 -1
  31. package/dist.dts/packages/core/src/monitors/webhook/utils/deliver-webhook.d.ts +2 -2
  32. package/dist.dts/packages/core/src/monitors/webhook/utils/handle-webhook.d.ts +1 -1
  33. package/dist.dts/packages/core/src/monitors/webhook/utils/heartbeat-webhooks.d.ts +2 -2
  34. package/dist.dts/packages/core/src/runtime.d.ts +3 -3
  35. package/dist.dts/packages/core/src/sources/index.d.ts +1 -1
  36. package/dist.dts/packages/core/src/sources/types/source-registry.d.ts +1 -1
  37. package/dist.dts/packages/core/src/storage/json.d.ts +2 -2
  38. package/dist.dts/packages/core/src/types/monitor-context.d.ts +2 -2
  39. package/dist.dts/packages/core/src/types/monitor-options.d.ts +1 -1
  40. package/dist.dts/packages/core/src/utils/event-to-text.d.ts +1 -1
  41. package/dist.dts/packages/core/src/utils/to-monitor-event.d.ts +2 -2
  42. package/dist.dts/packages/daemon/src/client.d.ts +1 -1
  43. package/dist.dts/packages/daemon/src/daemon.d.ts +3 -3
  44. package/dist.dts/packages/daemon/src/event-stream.d.ts +1 -1
  45. package/dist.dts/packages/daemon/src/event-transport.d.ts +4 -0
  46. package/dist.dts/packages/daemon/src/event-transport.test.d.ts +1 -0
  47. package/dist.dts/packages/daemon/src/fetch-isolation.test.d.ts +1 -0
  48. package/dist.dts/packages/daemon/src/index.d.ts +3 -3
  49. package/dist.dts/packages/daemon/src/registry.d.ts +5 -5
  50. package/dist.dts/packages/daemon/src/types/client.d.ts +1 -1
  51. package/dist.dts/packages/daemon/src/types/daemon.d.ts +1 -1
  52. package/dist.dts/packages/daemon/src/types/protocol.d.ts +1 -1
  53. package/dist.dts/packages/daemon/src/utils/sink.d.ts +2 -2
  54. package/dist.dts/packages/daemon/src/utils/target.d.ts +1 -1
  55. package/dist.dts/packages/mcp/src/server.d.ts +1 -1
  56. package/dist.dts/packages/mcp/src/uris.d.ts +2 -2
  57. package/dist.dts/providers/github/src/index.d.ts +1 -1
  58. package/dist.dts/providers/github/src/monitor.d.ts +6 -6
  59. package/dist.dts/providers/github/src/poll/index.d.ts +1 -1
  60. package/dist.dts/providers/github/src/poll/monitor.d.ts +2 -2
  61. package/dist.dts/providers/github/src/poll/utils/append-comments.d.ts +1 -1
  62. package/dist.dts/providers/github/src/poll/utils/append-github-ci-event.d.ts +1 -1
  63. package/dist.dts/providers/github/src/poll/utils/append-github-conflict-event.d.ts +1 -1
  64. package/dist.dts/providers/github/src/poll/utils/append-github-reviews.d.ts +1 -1
  65. package/dist.dts/providers/github/src/poll/utils/append-github-state-event.d.ts +1 -1
  66. package/dist.dts/providers/github/src/poll/utils/empty-cursor.d.ts +1 -1
  67. package/dist.dts/providers/github/src/poll/utils/poll-github.d.ts +1 -1
  68. package/dist.dts/providers/github/src/webhook/index.d.ts +2 -2
  69. package/dist.dts/providers/github/src/webhook/monitor.d.ts +2 -2
  70. package/dist.dts/providers/github/src/webhook/utils/github-event-handlers.d.ts +1 -1
  71. package/dist.dts/providers/github/src/webhook/utils/parse-github-webhook.d.ts +1 -1
  72. package/dist.dts/providers/github/src/webhook/utils/update-github-cursor.d.ts +2 -2
  73. package/dist.dts/providers/jira/src/index.d.ts +1 -1
  74. package/dist.dts/providers/jira/src/monitor.d.ts +5 -5
  75. package/dist.dts/providers/jira/src/poll/index.d.ts +1 -1
  76. package/dist.dts/providers/jira/src/poll/monitor.d.ts +2 -2
  77. package/dist.dts/providers/jira/src/poll/utils/append-jira-changelog.d.ts +1 -1
  78. package/dist.dts/providers/jira/src/poll/utils/append-jira-comments.d.ts +1 -1
  79. package/dist.dts/providers/jira/src/poll/utils/append-jira-description.d.ts +1 -1
  80. package/dist.dts/providers/jira/src/poll/utils/empty-cursor.d.ts +1 -1
  81. package/dist.dts/providers/jira/src/poll/utils/jira-changelog-event.d.ts +1 -1
  82. package/dist.dts/providers/jira/src/poll/utils/poll-jira.d.ts +1 -1
  83. package/dist.dts/providers/slack/src/index.d.ts +1 -1
  84. package/dist.dts/providers/slack/src/monitor.d.ts +6 -6
  85. package/dist.dts/providers/slack/src/poll/index.d.ts +1 -1
  86. package/dist.dts/providers/slack/src/poll/monitor.d.ts +2 -2
  87. package/dist.dts/providers/slack/src/poll/utils/parse-slack-read-result.d.ts +1 -1
  88. package/dist.dts/providers/slack/src/poll/utils/poll-slack.d.ts +1 -1
  89. package/dist.dts/providers/slack/src/webhook/index.d.ts +1 -1
  90. package/dist.dts/providers/slack/src/webhook/monitor.d.ts +2 -2
  91. package/dist.dts/providers/slack/src/webhook/utils/parse-slack-webhook.d.ts +1 -1
  92. package/dist.dts/providers/slack/src/webhook/utils/update-slack-cursor.d.ts +2 -2
  93. package/dist.dts/providers/yab/src/index.d.ts +1 -1
  94. package/dist.dts/providers/yab/src/monitor.d.ts +5 -5
  95. package/dist.dts/providers/yab/src/poll/index.d.ts +1 -1
  96. package/dist.dts/providers/yab/src/poll/monitor.d.ts +2 -2
  97. package/dist.dts/providers/yab/src/poll/utils/feed-events.d.ts +1 -1
  98. package/dist.dts/providers/yab/src/poll/utils/parse-feed.d.ts +1 -1
  99. package/dist.dts/providers/yab/src/poll/utils/poll-yab.d.ts +1 -1
  100. package/dist.dts/providers/yab/src/poll/utils/yab-mcp.d.ts +1 -1
  101. package/package.json +27 -9
package/dist/opencode.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  daemonCommand,
8
8
  daemonEnvironment,
9
9
  spawnLocalDaemon
10
- } from "./chunk-5JL3UV72.js";
10
+ } from "./chunk-L4SMC2NT.js";
11
11
  import "./chunk-MLKGABMK.js";
12
12
 
13
13
  // packages/sourcefed/src/server.ts
package/dist/pi.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  daemonCommand,
7
7
  daemonEnvironment,
8
8
  spawnLocalDaemon
9
- } from "./chunk-5JL3UV72.js";
9
+ } from "./chunk-L4SMC2NT.js";
10
10
  import "./chunk-MLKGABMK.js";
11
11
 
12
12
  // adapters/pi/src/index.ts
@@ -1,4 +1,4 @@
1
- import { type QueuedMonitorEvent } from "@fdcn/sourcefed/core";
1
+ import { type QueuedMonitorEvent } from "../../packages/core/src/index.js";
2
2
  import { type Plugin } from "@opencode/plugin";
3
3
  import { OpenCodeSubscriptions, type SessionLocation } from "./subscriptions.js";
4
4
  type SessionDomain = Plugin.Context["session"];
@@ -1,5 +1,5 @@
1
- import type { QueuedMonitorEvent } from "@fdcn/sourcefed/core";
2
- import type { DaemonClient } from "@fdcn/sourcefed/daemon";
1
+ import type { QueuedMonitorEvent } from "../../packages/core/src/index.js";
2
+ import type { DaemonClient } from "../../packages/daemon/src/index.js";
3
3
  export type SessionLocation = {
4
4
  directory: string;
5
5
  project: {
@@ -1,5 +1,5 @@
1
1
  /** @jsxImportSource @opentui/solid */
2
- import { type MonitorView } from "@fdcn/sourcefed/daemon";
2
+ import { type MonitorView } from "../../../packages/daemon/src/index.js";
3
3
  import type { Plugin } from "@opencode/plugin/tui";
4
4
  type ThemeTokens = Plugin.Context["theme"];
5
5
  type Color = ThemeTokens["text"]["base"];
@@ -1,6 +1,6 @@
1
1
  import type { Theme } from "@earendil-works/pi-coding-agent";
2
2
  import type { Component, TUI } from "@earendil-works/pi-tui";
3
- import type { LogEntryView } from "@fdcn/sourcefed/daemon";
3
+ import type { LogEntryView } from "../../../packages/daemon/src/index.js";
4
4
  type Line = {
5
5
  text: string;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import type { Theme } from "@earendil-works/pi-coding-agent";
2
2
  import type { Component, KeybindingsManager } from "@earendil-works/pi-tui";
3
- import type { MonitorView } from "@fdcn/sourcefed/daemon";
3
+ import type { MonitorView } from "../../../packages/daemon/src/index.js";
4
4
  export type MonitorAction = "stop" | "start" | "remove";
5
5
  /** Runs one action on a monitor and answers the target's monitors afterwards. */
6
6
  export type RunMonitorAction = (action: MonitorAction, id: string) => Promise<MonitorView[]>;
@@ -1,4 +1,4 @@
1
- import type { DaemonClient } from "@fdcn/sourcefed/daemon";
1
+ import type { DaemonClient } from "../../../../daemon/src/index.js";
2
2
  export declare function runMonitor(argv: string[]): Promise<void>;
3
3
  export type MonitorContext = {
4
4
  client: DaemonClient;
@@ -1,2 +1,2 @@
1
- import { SourcefedDaemon } from "@fdcn/sourcefed/daemon";
1
+ import { SourcefedDaemon } from "../../../daemon/src/index.js";
2
2
  export declare function createDaemon(): SourcefedDaemon;
@@ -1,4 +1,4 @@
1
- import type { LogEntryView, MonitorView } from "@fdcn/sourcefed/daemon";
1
+ import type { LogEntryView, MonitorView } from "../../../daemon/src/index.js";
2
2
  export declare function printMonitors(monitors: MonitorView[]): void;
3
3
  export declare function printLogs(logs: LogEntryView[]): void;
4
4
  export declare function printResult(result: unknown): void;
@@ -1,2 +1,2 @@
1
- import type { HttpServer, SourcefedDaemon } from "@fdcn/sourcefed/daemon";
1
+ import type { HttpServer, SourcefedDaemon } from "../../../daemon/src/index.js";
2
2
  export declare function startWebhookServer(runtime: SourcefedDaemon["runtime"]): Promise<HttpServer | undefined>;
@@ -1,5 +1,5 @@
1
- import type { MonitorRecord } from "./monitors";
2
- import type { MonitorEvent, MonitorEventQueue, MonitorEventSink, MonitorTarget, QueuedMonitorEvent } from "./types";
1
+ import type { MonitorRecord } from "./monitors/index.js";
2
+ import type { MonitorEvent, MonitorEventQueue, MonitorEventSink, MonitorTarget, QueuedMonitorEvent } from "./types/index.js";
3
3
  export declare class QueueMonitorEventSink implements MonitorEventSink {
4
4
  readonly queue: MonitorEventQueue;
5
5
  constructor(queue: MonitorEventQueue);
@@ -1,9 +1,9 @@
1
- export * from "./monitors";
1
+ export * from "./monitors/index.js";
2
2
  export * from "./runtime.js";
3
3
  export * from "./events.js";
4
- export * from "./sources";
5
- export * from "./types";
6
- export * from "./storage";
4
+ export * from "./sources/index.js";
5
+ export * from "./types/index.js";
6
+ export * from "./storage/index.js";
7
7
  export { eventToText } from "./utils/event-to-text.js";
8
8
  export { toMonitorEvent } from "./utils/to-monitor-event.js";
9
9
  export { MonitorRecordSchema, MonitorRegistrySchema } from "./monitors/schema.js";
@@ -1,6 +1,6 @@
1
1
  export { Monitor } from "./monitor.js";
2
2
  export { MonitorService, type CreateMonitorInput, type CreateMonitorResult } from "./service.js";
3
3
  export { dedupeActiveMonitors, monitorIdentity } from "./utils/monitor-identity.js";
4
- export { PollMonitor, mergeCursors } from "./poll";
5
- export { WebhookMonitor } from "./webhook";
6
- export type { MonitorRecord, MonitorRegistry } from "./types";
4
+ export { PollMonitor, mergeCursors } from "./poll/index.js";
5
+ export { WebhookMonitor } from "./webhook/index.js";
6
+ export type { MonitorRecord, MonitorRegistry } from "./types/index.js";
@@ -1,9 +1,9 @@
1
- import type { MonitorContext, MonitorEvent, MonitorOptions } from "#sourcefed/types";
2
- import type { MonitorSource, SourceInput } from "#sourcefed/sources";
3
- import type { Delivery, MonitorCreateInput } from "#sourcefed/types";
4
- import type { MonitorRecord } from "./types";
5
- import type { PollMonitor } from "./poll";
6
- import type { WebhookMonitor } from "./webhook";
1
+ import type { MonitorContext, MonitorEvent, MonitorOptions } from "../types/index.js";
2
+ import type { MonitorSource, SourceInput } from "../sources/index.js";
3
+ import type { Delivery, MonitorCreateInput } from "../types/index.js";
4
+ import type { MonitorRecord } from "./types/index.js";
5
+ import type { PollMonitor } from "./poll/index.js";
6
+ import type { WebhookMonitor } from "./webhook/index.js";
7
7
  export declare abstract class Monitor<TSource extends MonitorSource = MonitorSource> {
8
8
  readonly type: TSource["type"];
9
9
  private readonly schema;
@@ -1,8 +1,8 @@
1
- import type { MonitorSource } from "#sourcefed/sources";
2
- import type { MonitorContext } from "#sourcefed/types";
3
- import type { MonitorRecord } from "../types";
4
- import type { Monitor } from "../monitor";
5
- import { type PollMonitorOptions } from "./types";
1
+ import type { MonitorSource } from "../../sources/index.js";
2
+ import type { MonitorContext } from "../../types/index.js";
3
+ import type { MonitorRecord } from "../types/index.js";
4
+ import type { Monitor } from "../monitor.js";
5
+ import { type PollMonitorOptions } from "./types/index.js";
6
6
  export declare class PollMonitor<TSource extends MonitorSource = MonitorSource> {
7
7
  private readonly options;
8
8
  constructor(options: PollMonitorOptions<TSource>);
@@ -1,4 +1,4 @@
1
- import type { MonitorSource } from "#sourcefed/sources";
1
+ import type { MonitorSource } from "../../../sources/index.js";
2
2
  import type { PollRunner } from "./poll-runner.js";
3
3
  export type PollMonitorOptions<TSource extends MonitorSource> = {
4
4
  run: PollRunner<TSource>;
@@ -1,3 +1,3 @@
1
- import type { MonitorSource } from "#sourcefed/sources";
2
- import type { SourcePollResult } from "#sourcefed/types";
1
+ import type { MonitorSource } from "../../../sources/index.js";
2
+ import type { SourcePollResult } from "../../../types/index.js";
3
3
  export type PollRunner<TSource extends MonitorSource> = (source: TSource, cursor: unknown) => Promise<SourcePollResult>;
@@ -1,2 +1,2 @@
1
- import type { MonitorEvent } from "#sourcefed/types";
1
+ import type { MonitorEvent } from "../../../types/index.js";
2
2
  export declare function eventDeliveryId(event: MonitorEvent): string;
@@ -1,2 +1,2 @@
1
- import type { MonitorContext } from "#sourcefed/types";
1
+ import type { MonitorContext } from "../../../types/index.js";
2
2
  export declare function tick(context: MonitorContext): Promise<void>;
@@ -1,6 +1,6 @@
1
- import type { MonitorSource } from "#sourcefed/sources";
2
- import type { MonitorStore, MonitorTarget } from "#sourcefed/types";
3
- import type { MonitorRecord } from "./types";
1
+ import type { MonitorSource } from "../sources/index.js";
2
+ import type { MonitorStore, MonitorTarget } from "../types/index.js";
3
+ import type { MonitorRecord } from "./types/index.js";
4
4
  export type CreateMonitorInput = {
5
5
  name: string;
6
6
  source: MonitorSource;
@@ -1,5 +1,5 @@
1
- import type { MonitorSource } from "#sourcefed/sources";
2
- import type { MonitorTarget } from "#sourcefed/types";
3
- import type { MonitorRecord } from "../types";
1
+ import type { MonitorSource } from "../../sources/index.js";
2
+ import type { MonitorTarget } from "../../types/index.js";
3
+ import type { MonitorRecord } from "../types/index.js";
4
4
  export declare function monitorIdentity(target: MonitorTarget, source: MonitorSource): string;
5
5
  export declare function dedupeActiveMonitors(monitors: MonitorRecord[]): MonitorRecord[];
@@ -1,8 +1,8 @@
1
- import type { MonitorContext, MonitorEvent } from "#sourcefed/types";
2
- import type { MonitorSource } from "#sourcefed/sources";
3
- import type { MonitorRecord } from "../types";
4
- import type { Monitor } from "../monitor";
5
- import { type WebhookMonitorOptions } from "./types";
1
+ import type { MonitorContext, MonitorEvent } from "../../types/index.js";
2
+ import type { MonitorSource } from "../../sources/index.js";
3
+ import type { MonitorRecord } from "../types/index.js";
4
+ import type { Monitor } from "../monitor.js";
5
+ import { type WebhookMonitorOptions } from "./types/index.js";
6
6
  export declare class WebhookMonitor<TSource extends MonitorSource = MonitorSource> {
7
7
  readonly path: string;
8
8
  readonly preferred: boolean;
@@ -1,5 +1,5 @@
1
1
  import * as v from "valibot";
2
- import type { MonitorEvent } from "#sourcefed/types";
2
+ import type { MonitorEvent } from "../../../types/index.js";
3
3
  export type PendingWebhookEvent = {
4
4
  deliveryId: string;
5
5
  event: MonitorEvent;
@@ -1,4 +1,4 @@
1
- import type { MonitorEvent } from "#sourcefed/types";
1
+ import type { MonitorEvent } from "../../../types/index.js";
2
2
  export type WebhookMonitorOptions = {
3
3
  path: string;
4
4
  preferred?: boolean;
@@ -1,3 +1,3 @@
1
- import type { MonitorContext, MonitorEvent } from "#sourcefed/types";
2
- import type { Monitor } from "../../monitor";
1
+ import type { MonitorContext, MonitorEvent } from "../../../types/index.js";
2
+ import type { Monitor } from "../../monitor.js";
3
3
  export declare function deliverWebhook(context: MonitorContext, source: Monitor, event: MonitorEvent, deliveryId: string): Promise<number>;
@@ -1,2 +1,2 @@
1
- import type { MonitorContext } from "#sourcefed/types";
1
+ import type { MonitorContext } from "../../../types/index.js";
2
2
  export declare function handleWebhook(request: Request, context: MonitorContext): Promise<Response>;
@@ -1,3 +1,3 @@
1
- import type { MonitorContext } from "#sourcefed/types";
2
- import type { Monitor } from "../../monitor";
1
+ import type { MonitorContext } from "../../../types/index.js";
2
+ import type { Monitor } from "../../monitor.js";
3
3
  export declare function heartbeatWebhooks(context: MonitorContext, source: Monitor, eventSource: unknown): Promise<void>;
@@ -1,7 +1,7 @@
1
- import type { MonitorContext, MonitorEventSink, MonitorStore } from "./types";
2
- import type { MonitorSourceRegistry } from "./sources";
1
+ import type { MonitorContext, MonitorEventSink, MonitorStore } from "./types/index.js";
2
+ import type { MonitorSourceRegistry } from "./sources/index.js";
3
3
  import { MonitorService } from "./monitors/service.js";
4
- import type { Monitor } from "./monitors";
4
+ import type { Monitor } from "./monitors/index.js";
5
5
  export type MonitorRuntimeOptions = {
6
6
  store: MonitorStore;
7
7
  sink: MonitorEventSink;
@@ -1 +1 @@
1
- export type { MonitorSource, MonitorSourceRegistry, SourceInput } from "./types";
1
+ export type { MonitorSource, MonitorSourceRegistry, SourceInput } from "./types/index.js";
@@ -1,2 +1,2 @@
1
- import type { Monitor } from "#sourcefed/monitors";
1
+ import type { Monitor } from "../../monitors/index.js";
2
2
  export type MonitorSourceRegistry = Record<string, Monitor<any>>;
@@ -1,5 +1,5 @@
1
- import type { MonitorRecord, MonitorRegistry } from "../monitors/types";
2
- import type { MonitorEvent, MonitorEventQueue, MonitorStore, MonitorTarget, QueuedMonitorEvent } from "../types";
1
+ import type { MonitorRecord, MonitorRegistry } from "../monitors/types/index.js";
2
+ import type { MonitorEvent, MonitorEventQueue, MonitorStore, MonitorTarget, QueuedMonitorEvent } from "../types/index.js";
3
3
  export type JsonMonitorStoreOptions = {
4
4
  stateDir?: string;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import type { MonitorEventSink } from "./event-sink.js";
2
- import type { Monitor } from "#sourcefed/monitors";
3
- import type { MonitorSourceRegistry } from "#sourcefed/sources";
2
+ import type { Monitor } from "../monitors/index.js";
3
+ import type { MonitorSourceRegistry } from "../sources/index.js";
4
4
  import type { MonitorService } from "../monitors/service.js";
5
5
  export type MonitorContext = {
6
6
  service: MonitorService;
@@ -1,5 +1,5 @@
1
1
  import type * as v from "valibot";
2
- import type { MonitorSource } from "#sourcefed/sources";
2
+ import type { MonitorSource } from "../sources/index.js";
3
3
  export type MonitorSchema<TSource extends MonitorSource> = v.BaseSchema<unknown, TSource, v.BaseIssue<unknown>>;
4
4
  export type MonitorOptions<TSource extends MonitorSource> = {
5
5
  type: TSource["type"];
@@ -1,2 +1,2 @@
1
- import type { MonitorEvent } from "#sourcefed/types";
1
+ import type { MonitorEvent } from "../types/index.js";
2
2
  export declare function eventToText(event: MonitorEvent): string;
@@ -1,3 +1,3 @@
1
- import type { MonitorEvent, SourceEvent } from "#sourcefed/types";
2
- import type { MonitorSource } from "#sourcefed/sources";
1
+ import type { MonitorEvent, SourceEvent } from "../types/index.js";
2
+ import type { MonitorSource } from "../sources/index.js";
3
3
  export declare function toMonitorEvent(event: SourceEvent, source: MonitorSource): MonitorEvent;
@@ -1,2 +1,2 @@
1
- import type { DaemonClient, DaemonClientOptions } from "./types";
1
+ import type { DaemonClient, DaemonClientOptions } from "./types/index.js";
2
2
  export declare function connectDaemonClient(options: DaemonClientOptions): Promise<DaemonClient>;
@@ -1,5 +1,5 @@
1
- import { MonitorRuntime, type MonitorRecord, type MonitorTarget, type QueuedMonitorEvent } from "@fdcn/sourcefed/core";
2
- import type { DaemonCreateInput, DaemonResult, LogEntryView, MonitorView, SourcefedDaemonOptions } from "./types";
1
+ import { MonitorRuntime, type MonitorRecord, type MonitorTarget, type QueuedMonitorEvent } from "../../core/src/index.js";
2
+ import type { DaemonCreateInput, DaemonResult, LogEntryView, MonitorView, SourcefedDaemonOptions } from "./types/index.js";
3
3
  export declare class SourcefedDaemon {
4
4
  readonly runtime: MonitorRuntime;
5
5
  private readonly store;
@@ -12,7 +12,7 @@ export declare class SourcefedDaemon {
12
12
  private releaseExclusive?;
13
13
  private started;
14
14
  constructor(options?: SourcefedDaemonOptions);
15
- get service(): import("@fdcn/sourcefed/core").MonitorService;
15
+ get service(): import("../../core/src/index.js").MonitorService;
16
16
  get sourceTypes(): readonly string[];
17
17
  start(): Promise<void>;
18
18
  stop(): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { QueuedMonitorEvent } from "@fdcn/sourcefed/core";
1
+ import type { QueuedMonitorEvent } from "../../core/src/index.js";
2
2
  /** Owns one SSE connection, its setup, serialized delivery and reconnect loop. */
3
3
  export declare class DaemonEventStream {
4
4
  private readonly url;
@@ -0,0 +1,4 @@
1
+ import { type IncomingMessage } from "node:http";
2
+ /** Dedicated streaming sockets must not occupy the host's process-wide fetch queue. */
3
+ export declare function openEventResponse(url: string, headers: Record<string, string>, signal: AbortSignal): Promise<IncomingMessage>;
4
+ export declare function eventReader(response: IncomingMessage): import("node:stream/web").ReadableStreamDefaultReader<Uint8Array>;
@@ -1,8 +1,8 @@
1
1
  export { SourcefedDaemon, monitorView } from "./daemon.js";
2
2
  export { SOURCE_TYPES } from "./registry.js";
3
3
  export { connectDaemonClient } from "./client.js";
4
- export { defaultDaemonUrl } from "./utils";
4
+ export { defaultDaemonUrl } from "./utils/index.js";
5
5
  export { dispatchDaemonRequest } from "./dispatch.js";
6
6
  export { handleDaemonHttpRequest } from "./http.js";
7
- export { daemonCommand, daemonEnvironment, DEFAULT_DAEMON_URL, decodeTarget, encodeTarget, serveHttp, spawnLocalDaemon, type HttpServer, type HttpServerOptions } from "./utils";
8
- export type { DaemonClient, DaemonClientOptions, DaemonCreateInput, DaemonEventFrame, DaemonFrame, DaemonRequest, DaemonResponse, DaemonResult, LogEntryView, MonitorView, SourcefedDaemonOptions, SpawnDaemonResult } from "./types";
7
+ export { daemonCommand, daemonEnvironment, DEFAULT_DAEMON_URL, decodeTarget, encodeTarget, serveHttp, spawnLocalDaemon, type HttpServer, type HttpServerOptions } from "./utils/index.js";
8
+ export type { DaemonClient, DaemonClientOptions, DaemonCreateInput, DaemonEventFrame, DaemonFrame, DaemonRequest, DaemonResponse, DaemonResult, LogEntryView, MonitorView, SourcefedDaemonOptions, SpawnDaemonResult } from "./types/index.js";
@@ -1,8 +1,8 @@
1
- import type { Monitor, MonitorCreateInput, MonitorSource, SourceInput } from "@fdcn/sourcefed/core";
2
- import { GithubMonitor } from "@fdcn/sourcefed/provider-github";
3
- import { JiraMonitor } from "@fdcn/sourcefed/provider-jira";
4
- import { SlackMonitor } from "@fdcn/sourcefed/provider-slack";
5
- import { YabMonitor } from "@fdcn/sourcefed/provider-yab";
1
+ import type { Monitor, MonitorCreateInput, MonitorSource, SourceInput } from "../../core/src/index.js";
2
+ import { GithubMonitor } from "../../../providers/github/src/index.js";
3
+ import { JiraMonitor } from "../../../providers/jira/src/index.js";
4
+ import { SlackMonitor } from "../../../providers/slack/src/index.js";
5
+ import { YabMonitor } from "../../../providers/yab/src/index.js";
6
6
  export declare const SOURCE_MAP: {
7
7
  jira: JiraMonitor;
8
8
  github: GithubMonitor;
@@ -1,5 +1,5 @@
1
1
  import type { ChildProcess } from "node:child_process";
2
- import type { MonitorTarget, QueuedMonitorEvent } from "@fdcn/sourcefed/core";
2
+ import type { MonitorTarget, QueuedMonitorEvent } from "../../../core/src/index.js";
3
3
  export type DaemonClientOptions = {
4
4
  name: string;
5
5
  url?: string;
@@ -1,4 +1,4 @@
1
- import type { MonitorEventQueue, MonitorRecord, MonitorStore, QueuedMonitorEvent } from "@fdcn/sourcefed/core";
1
+ import type { MonitorEventQueue, MonitorRecord, MonitorStore, QueuedMonitorEvent } from "../../../core/src/index.js";
2
2
  export type DaemonCreateInput = {
3
3
  name: string;
4
4
  sourceType: string;
@@ -1,4 +1,4 @@
1
- import type { MonitorTarget, QueuedMonitorEvent } from "@fdcn/sourcefed/core";
1
+ import type { MonitorTarget, QueuedMonitorEvent } from "../../../core/src/index.js";
2
2
  export type DaemonRequest = {
3
3
  id?: number;
4
4
  method: string;
@@ -1,11 +1,11 @@
1
- import type { MonitorEventQueue, MonitorEventSink, MonitorRecord, MonitorTarget } from "@fdcn/sourcefed/core";
1
+ import type { MonitorEventQueue, MonitorEventSink, MonitorRecord, MonitorTarget } from "../../../core/src/index.js";
2
2
  export declare class NotifyingEventSink implements MonitorEventSink {
3
3
  private readonly queue;
4
4
  private readonly notify;
5
5
  constructor(queue: MonitorEventQueue, notify: (target: MonitorTarget) => void);
6
6
  deliver(input: {
7
7
  monitor: MonitorRecord;
8
- event: import("@fdcn/sourcefed/core").MonitorEvent;
8
+ event: import("../../../core/src/index.js").MonitorEvent;
9
9
  }): Promise<{
10
10
  ok: boolean;
11
11
  error?: string;
@@ -1,4 +1,4 @@
1
- import type { MonitorTarget } from "@fdcn/sourcefed/core";
1
+ import type { MonitorTarget } from "../../../core/src/index.js";
2
2
  export declare function encodeTarget(target: MonitorTarget): string;
3
3
  export declare function decodeTarget(value: string): MonitorTarget | undefined;
4
4
  export declare function targetKey(target: MonitorTarget): string;
@@ -1,5 +1,5 @@
1
1
  import { createMcpHandler, McpServer } from "@modelcontextprotocol/server";
2
- import type { SourcefedDaemon } from "@fdcn/sourcefed/daemon";
2
+ import type { SourcefedDaemon } from "../../daemon/src/index.js";
3
3
  export type SourcefedMcp = {
4
4
  runtime: SourcefedDaemon["runtime"];
5
5
  handler: ReturnType<typeof createMcpHandler>;
@@ -1,3 +1,3 @@
1
- import type { MonitorTarget } from "@fdcn/sourcefed/core";
1
+ import type { MonitorTarget } from "../../core/src/index.js";
2
2
  export declare function eventResourceUri(target: MonitorTarget): string;
3
- export { decodeTarget, encodeTarget } from "@fdcn/sourcefed/daemon";
3
+ export { decodeTarget, encodeTarget } from "../../daemon/src/index.js";
@@ -1,2 +1,2 @@
1
1
  export { GithubMonitor } from "./monitor.js";
2
- export type { GithubSourceRecord, GithubEvent, GithubCursor } from "./types";
2
+ export type { GithubSourceRecord, GithubEvent, GithubCursor } from "./types/index.js";
@@ -1,10 +1,10 @@
1
- import { Monitor } from "@fdcn/sourcefed/core";
2
- import type { MonitorCreateInput } from "@fdcn/sourcefed/core";
3
- import type { GithubSourceRecord } from "./types";
4
- import type { SourceInput } from "@fdcn/sourcefed/core";
1
+ import { Monitor } from "../../../packages/core/src/index.js";
2
+ import type { MonitorCreateInput } from "../../../packages/core/src/index.js";
3
+ import type { GithubSourceRecord } from "./types/index.js";
4
+ import type { SourceInput } from "../../../packages/core/src/index.js";
5
5
  export declare class GithubMonitor extends Monitor<GithubSourceRecord> {
6
- readonly poll: import("@fdcn/sourcefed/core").PollMonitor<GithubSourceRecord>;
7
- readonly webhook: import("@fdcn/sourcefed/core").WebhookMonitor<GithubSourceRecord>;
6
+ readonly poll: import("../../../packages/core/src/index.js").PollMonitor<GithubSourceRecord>;
7
+ readonly webhook: import("../../../packages/core/src/index.js").WebhookMonitor<GithubSourceRecord>;
8
8
  constructor();
9
9
  readonly key: (source: GithubSourceRecord) => string;
10
10
  readonly icon = "\uDB80\uDEA4";
@@ -1,2 +1,2 @@
1
1
  export { githubPollMonitor } from "./monitor.js";
2
- export * from "./utils";
2
+ export * from "./utils/index.js";
@@ -1,3 +1,3 @@
1
- import { PollMonitor } from "@fdcn/sourcefed/core";
2
- import type { GithubSourceRecord } from "../types";
1
+ import { PollMonitor } from "../../../../packages/core/src/index.js";
2
+ import type { GithubSourceRecord } from "../types/index.js";
3
3
  export declare const githubPollMonitor: PollMonitor<GithubSourceRecord>;
@@ -1,2 +1,2 @@
1
- import type { GithubCursor, GithubEvent } from "../../types";
1
+ import type { GithubCursor, GithubEvent } from "../../types/index.js";
2
2
  export declare function appendComments(repo: string, prNumber: number, cursor: GithubCursor, events: GithubEvent[], comments: any[], idPrefix: string, historyPrimed: boolean, summary: (comment: any) => string, body: (comment: any) => string): void;
@@ -1,2 +1,2 @@
1
- import type { GithubCursor, GithubEvent } from "../../types";
1
+ import type { GithubCursor, GithubEvent } from "../../types/index.js";
2
2
  export declare function appendGithubCiEvent(repo: string, prNumber: number, cursor: GithubCursor, events: GithubEvent[], rollup: any[]): Promise<void>;
@@ -1,2 +1,2 @@
1
- import type { GithubCursor, GithubEvent } from "../../types";
1
+ import type { GithubCursor, GithubEvent } from "../../types/index.js";
2
2
  export declare function appendGithubConflictEvent(repo: string, prNumber: number, cursor: GithubCursor, events: GithubEvent[], mergeable: string): void;
@@ -1,2 +1,2 @@
1
- import type { GithubCursor, GithubEvent } from "../../types";
1
+ import type { GithubCursor, GithubEvent } from "../../types/index.js";
2
2
  export declare function appendGithubReviews(repo: string, prNumber: number, cursor: GithubCursor, events: GithubEvent[], reviews: any[], historyPrimed: boolean): void;
@@ -1,2 +1,2 @@
1
- import type { GithubCursor, GithubEvent } from "../../types";
1
+ import type { GithubCursor, GithubEvent } from "../../types/index.js";
2
2
  export declare function appendGithubStateEvent(repo: string, prNumber: number, cursor: GithubCursor, events: GithubEvent[], prState: string): boolean;
@@ -1,2 +1,2 @@
1
- import type { GithubCursor } from "../../types";
1
+ import type { GithubCursor } from "../../types/index.js";
2
2
  export declare function emptyGithubCursor(): GithubCursor;
@@ -1,4 +1,4 @@
1
- import type { GithubCursor, GithubEvent } from "../../types";
1
+ import type { GithubCursor, GithubEvent } from "../../types/index.js";
2
2
  export declare function pollGithub(repo: string, prNumber: number, cursorRaw: unknown): Promise<{
3
3
  events: GithubEvent[];
4
4
  cursor: GithubCursor;
@@ -1,3 +1,3 @@
1
1
  export { githubWebhookMonitor } from "./monitor.js";
2
- export * from "./types";
3
- export * from "./utils";
2
+ export * from "./types/index.js";
3
+ export * from "./utils/index.js";
@@ -1,3 +1,3 @@
1
- import { WebhookMonitor } from "@fdcn/sourcefed/core";
2
- import type { GithubSourceRecord } from "../types";
1
+ import { WebhookMonitor } from "../../../../packages/core/src/index.js";
2
+ import type { GithubSourceRecord } from "../types/index.js";
3
3
  export declare const githubWebhookMonitor: WebhookMonitor<GithubSourceRecord>;
@@ -1,2 +1,2 @@
1
- import type { GithubEventHandler } from "../types";
1
+ import type { GithubEventHandler } from "../types/index.js";
2
2
  export declare const githubEventHandlers: Record<string, GithubEventHandler>;
@@ -1,2 +1,2 @@
1
- import type { MonitorEvent } from "@fdcn/sourcefed/core";
1
+ import type { MonitorEvent } from "../../../../../packages/core/src/index.js";
2
2
  export declare function parseGithubWebhook(payload: any, eventName: string, _deliveryId: string): MonitorEvent | undefined;
@@ -1,3 +1,3 @@
1
- import type { MonitorEvent } from "@fdcn/sourcefed/core";
2
- import type { GithubCursor } from "../../types";
1
+ import type { MonitorEvent } from "../../../../../packages/core/src/index.js";
2
+ import type { GithubCursor } from "../../types/index.js";
3
3
  export declare function updateGithubCursor(event: MonitorEvent, cursorRaw: unknown): GithubCursor;
@@ -1,2 +1,2 @@
1
1
  export { JiraMonitor } from "./monitor.js";
2
- export type { JiraSourceRecord, JiraEvent, JiraCursor } from "./types";
2
+ export type { JiraSourceRecord, JiraEvent, JiraCursor } from "./types/index.js";
@@ -1,9 +1,9 @@
1
- import { Monitor } from "@fdcn/sourcefed/core";
2
- import type { MonitorCreateInput } from "@fdcn/sourcefed/core";
3
- import type { JiraSourceRecord } from "./types";
4
- import type { SourceInput } from "@fdcn/sourcefed/core";
1
+ import { Monitor } from "../../../packages/core/src/index.js";
2
+ import type { MonitorCreateInput } from "../../../packages/core/src/index.js";
3
+ import type { JiraSourceRecord } from "./types/index.js";
4
+ import type { SourceInput } from "../../../packages/core/src/index.js";
5
5
  export declare class JiraMonitor extends Monitor<JiraSourceRecord> {
6
- readonly poll: import("@fdcn/sourcefed/core").PollMonitor<JiraSourceRecord>;
6
+ readonly poll: import("../../../packages/core/src/index.js").PollMonitor<JiraSourceRecord>;
7
7
  constructor();
8
8
  readonly key: (source: JiraSourceRecord) => string;
9
9
  readonly icon = "\uDB80\uDF03";