@fdcn/sourcefed 0.2.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 (220) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +51 -0
  3. package/dist/chunk-B7T6IZYS.js +5155 -0
  4. package/dist/chunk-MLKGABMK.js +9 -0
  5. package/dist/chunk-NGJ6F5ST.js +766 -0
  6. package/dist/cli.js +30491 -0
  7. package/dist/core-storage.js +13 -0
  8. package/dist/core.js +643 -0
  9. package/dist/daemon.js +5190 -0
  10. package/dist/data/core/SKILL.md +71 -0
  11. package/dist/data/core/references/commands.md +75 -0
  12. package/dist/data/sourcefed/SKILL.md +31 -0
  13. package/dist/guidance.md +71 -0
  14. package/dist/mcp.js +4800 -0
  15. package/dist/opencode.js +12646 -0
  16. package/dist/pi.js +249 -0
  17. package/dist/tui-compiled.mjs +4096 -0
  18. package/dist.dts/adapters/opencode/bridge.d.ts +20 -0
  19. package/dist.dts/adapters/opencode/index.d.ts +3 -0
  20. package/dist.dts/adapters/opencode/tool-result.d.ts +1 -0
  21. package/dist.dts/adapters/opencode/tools/monitor_create.d.ts +3 -0
  22. package/dist.dts/adapters/opencode/tools/monitor_list.d.ts +3 -0
  23. package/dist.dts/adapters/opencode/tools/monitor_start.d.ts +3 -0
  24. package/dist.dts/adapters/opencode/tools/monitor_status.d.ts +3 -0
  25. package/dist.dts/adapters/opencode/tools/monitor_stop.d.ts +3 -0
  26. package/dist.dts/adapters/opencode/tui/plugin.d.ts +3 -0
  27. package/dist.dts/adapters/opencode/tui/sidebar.d.ts +13 -0
  28. package/dist.dts/adapters/opencode/tui.d.ts +7 -0
  29. package/dist.dts/adapters/pi/src/dialog.d.ts +12 -0
  30. package/dist.dts/adapters/pi/src/index.d.ts +2 -0
  31. package/dist.dts/index.d.ts +1 -0
  32. package/dist.dts/packages/cli/src/index.d.ts +2 -0
  33. package/dist.dts/packages/cli/src/skills/command.d.ts +1 -0
  34. package/dist.dts/packages/cli/src/skills/discovery.d.ts +7 -0
  35. package/dist.dts/packages/cli/src/skills/frontmatter.d.ts +5 -0
  36. package/dist.dts/packages/cli/src/skills/index.d.ts +1 -0
  37. package/dist.dts/packages/core/src/events.d.ts +24 -0
  38. package/dist.dts/packages/core/src/events.test.d.ts +1 -0
  39. package/dist.dts/packages/core/src/index.d.ts +9 -0
  40. package/dist.dts/packages/core/src/monitors/index.d.ts +6 -0
  41. package/dist.dts/packages/core/src/monitors/monitor.d.ts +26 -0
  42. package/dist.dts/packages/core/src/monitors/poll/index.d.ts +1 -0
  43. package/dist.dts/packages/core/src/monitors/poll/monitor.d.ts +12 -0
  44. package/dist.dts/packages/core/src/monitors/poll/types/index.d.ts +2 -0
  45. package/dist.dts/packages/core/src/monitors/poll/types/poll-monitor-options.d.ts +6 -0
  46. package/dist.dts/packages/core/src/monitors/poll/types/poll-runner.d.ts +3 -0
  47. package/dist.dts/packages/core/src/monitors/poll/types/routed-event-cursor.d.ts +2 -0
  48. package/dist.dts/packages/core/src/monitors/poll/utils/event-delivery-id.d.ts +2 -0
  49. package/dist.dts/packages/core/src/monitors/poll/utils/tick.d.ts +2 -0
  50. package/dist.dts/packages/core/src/monitors/schema.d.ts +37 -0
  51. package/dist.dts/packages/core/src/monitors/service.d.ts +35 -0
  52. package/dist.dts/packages/core/src/monitors/service.test.d.ts +1 -0
  53. package/dist.dts/packages/core/src/monitors/transport.test.d.ts +1 -0
  54. package/dist.dts/packages/core/src/monitors/types/index.d.ts +2 -0
  55. package/dist.dts/packages/core/src/monitors/types/monitor-record.d.ts +3 -0
  56. package/dist.dts/packages/core/src/monitors/types/monitor-registry.d.ts +3 -0
  57. package/dist.dts/packages/core/src/monitors/utils/monitor-identity.d.ts +5 -0
  58. package/dist.dts/packages/core/src/monitors/utils/monitor-identity.test.d.ts +1 -0
  59. package/dist.dts/packages/core/src/monitors/webhook/index.d.ts +1 -0
  60. package/dist.dts/packages/core/src/monitors/webhook/monitor.d.ts +24 -0
  61. package/dist.dts/packages/core/src/monitors/webhook/types/index.d.ts +3 -0
  62. package/dist.dts/packages/core/src/monitors/webhook/types/pending-webhook-event.d.ts +19 -0
  63. package/dist.dts/packages/core/src/monitors/webhook/types/webhook-monitor-options.d.ts +13 -0
  64. package/dist.dts/packages/core/src/monitors/webhook/utils/constants.d.ts +2 -0
  65. package/dist.dts/packages/core/src/monitors/webhook/utils/deliver-webhook.d.ts +3 -0
  66. package/dist.dts/packages/core/src/monitors/webhook/utils/handle-webhook.d.ts +2 -0
  67. package/dist.dts/packages/core/src/monitors/webhook/utils/handle-webhook.test.d.ts +1 -0
  68. package/dist.dts/packages/core/src/monitors/webhook/utils/heartbeat-webhooks.d.ts +3 -0
  69. package/dist.dts/packages/core/src/runtime.d.ts +23 -0
  70. package/dist.dts/packages/core/src/runtime.test.d.ts +1 -0
  71. package/dist.dts/packages/core/src/sources/index.d.ts +1 -0
  72. package/dist.dts/packages/core/src/sources/schema.d.ts +4 -0
  73. package/dist.dts/packages/core/src/sources/types/index.d.ts +3 -0
  74. package/dist.dts/packages/core/src/sources/types/monitor-source.d.ts +3 -0
  75. package/dist.dts/packages/core/src/sources/types/source-input.d.ts +4 -0
  76. package/dist.dts/packages/core/src/sources/types/source-registry.d.ts +2 -0
  77. package/dist.dts/packages/core/src/storage/in-memory-monitor-store.d.ts +8 -0
  78. package/dist.dts/packages/core/src/storage/index.d.ts +2 -0
  79. package/dist.dts/packages/core/src/storage/json.d.ts +30 -0
  80. package/dist.dts/packages/core/src/storage/json.test.d.ts +1 -0
  81. package/dist.dts/packages/core/src/types/delivery.d.ts +1 -0
  82. package/dist.dts/packages/core/src/types/event-sink.d.ts +12 -0
  83. package/dist.dts/packages/core/src/types/index.d.ts +11 -0
  84. package/dist.dts/packages/core/src/types/monitor-context.d.ts +10 -0
  85. package/dist.dts/packages/core/src/types/monitor-create-input.d.ts +8 -0
  86. package/dist.dts/packages/core/src/types/monitor-event-queue.d.ts +18 -0
  87. package/dist.dts/packages/core/src/types/monitor-event.d.ts +10 -0
  88. package/dist.dts/packages/core/src/types/monitor-options.d.ts +7 -0
  89. package/dist.dts/packages/core/src/types/monitor-store.d.ts +6 -0
  90. package/dist.dts/packages/core/src/types/monitor-target.d.ts +4 -0
  91. package/dist.dts/packages/core/src/types/source-event.d.ts +9 -0
  92. package/dist.dts/packages/core/src/types/source-poll-result.d.ts +6 -0
  93. package/dist.dts/packages/core/src/utils/event-to-text.d.ts +2 -0
  94. package/dist.dts/packages/core/src/utils/to-monitor-event.d.ts +3 -0
  95. package/dist.dts/packages/daemon/src/client.d.ts +2 -0
  96. package/dist.dts/packages/daemon/src/client.test.d.ts +1 -0
  97. package/dist.dts/packages/daemon/src/daemon.d.ts +36 -0
  98. package/dist.dts/packages/daemon/src/daemon.test.d.ts +1 -0
  99. package/dist.dts/packages/daemon/src/dispatch.d.ts +2 -0
  100. package/dist.dts/packages/daemon/src/http.d.ts +5 -0
  101. package/dist.dts/packages/daemon/src/index.d.ts +8 -0
  102. package/dist.dts/packages/daemon/src/registry.d.ts +14 -0
  103. package/dist.dts/packages/daemon/src/types/client.d.ts +21 -0
  104. package/dist.dts/packages/daemon/src/types/daemon.d.ts +58 -0
  105. package/dist.dts/packages/daemon/src/types/index.d.ts +3 -0
  106. package/dist.dts/packages/daemon/src/types/protocol.d.ts +21 -0
  107. package/dist.dts/packages/daemon/src/utils/env.d.ts +1 -0
  108. package/dist.dts/packages/daemon/src/utils/http-server.d.ts +10 -0
  109. package/dist.dts/packages/daemon/src/utils/index.d.ts +6 -0
  110. package/dist.dts/packages/daemon/src/utils/request-router.d.ts +11 -0
  111. package/dist.dts/packages/daemon/src/utils/sink.d.ts +13 -0
  112. package/dist.dts/packages/daemon/src/utils/spawn.d.ts +19 -0
  113. package/dist.dts/packages/daemon/src/utils/target.d.ts +4 -0
  114. package/dist.dts/packages/mcp/src/index.d.ts +2 -0
  115. package/dist.dts/packages/mcp/src/server.d.ts +14 -0
  116. package/dist.dts/packages/mcp/src/server.test.d.ts +1 -0
  117. package/dist.dts/packages/mcp/src/uris.d.ts +3 -0
  118. package/dist.dts/packages/sourcefed/src/server.d.ts +7 -0
  119. package/dist.dts/providers/github/src/api/client.d.ts +3 -0
  120. package/dist.dts/providers/github/src/api/comments.d.ts +1 -0
  121. package/dist.dts/providers/github/src/api/github-api.test.d.ts +1 -0
  122. package/dist.dts/providers/github/src/api/index.d.ts +4 -0
  123. package/dist.dts/providers/github/src/api/logs.d.ts +5 -0
  124. package/dist.dts/providers/github/src/api/pr.d.ts +8 -0
  125. package/dist.dts/providers/github/src/github.test.d.ts +1 -0
  126. package/dist.dts/providers/github/src/index.d.ts +2 -0
  127. package/dist.dts/providers/github/src/monitor.d.ts +15 -0
  128. package/dist.dts/providers/github/src/poll/index.d.ts +2 -0
  129. package/dist.dts/providers/github/src/poll/monitor.d.ts +3 -0
  130. package/dist.dts/providers/github/src/poll/utils/append-comments.d.ts +2 -0
  131. package/dist.dts/providers/github/src/poll/utils/append-github-ci-event.d.ts +2 -0
  132. package/dist.dts/providers/github/src/poll/utils/append-github-conflict-event.d.ts +2 -0
  133. package/dist.dts/providers/github/src/poll/utils/append-github-reviews.d.ts +2 -0
  134. package/dist.dts/providers/github/src/poll/utils/append-github-state-event.d.ts +2 -0
  135. package/dist.dts/providers/github/src/poll/utils/ci-failure-detail.d.ts +1 -0
  136. package/dist.dts/providers/github/src/poll/utils/clean-ci-log.d.ts +1 -0
  137. package/dist.dts/providers/github/src/poll/utils/confirm-still-failing.d.ts +1 -0
  138. package/dist.dts/providers/github/src/poll/utils/empty-cursor.d.ts +2 -0
  139. package/dist.dts/providers/github/src/poll/utils/failure-run-ids.d.ts +1 -0
  140. package/dist.dts/providers/github/src/poll/utils/failure-run-log.d.ts +1 -0
  141. package/dist.dts/providers/github/src/poll/utils/format-failed-check.d.ts +1 -0
  142. package/dist.dts/providers/github/src/poll/utils/index.d.ts +1 -0
  143. package/dist.dts/providers/github/src/poll/utils/poll-github.d.ts +6 -0
  144. package/dist.dts/providers/github/src/poll/utils/poll-helpers.test.d.ts +1 -0
  145. package/dist.dts/providers/github/src/schema.d.ts +17 -0
  146. package/dist.dts/providers/github/src/types/cursor.d.ts +11 -0
  147. package/dist.dts/providers/github/src/types/event.d.ts +11 -0
  148. package/dist.dts/providers/github/src/types/index.d.ts +3 -0
  149. package/dist.dts/providers/github/src/types/source-record.d.ts +5 -0
  150. package/dist.dts/providers/github/src/webhook/index.d.ts +3 -0
  151. package/dist.dts/providers/github/src/webhook/monitor.d.ts +3 -0
  152. package/dist.dts/providers/github/src/webhook/types/context.d.ts +7 -0
  153. package/dist.dts/providers/github/src/webhook/types/event-handler.d.ts +3 -0
  154. package/dist.dts/providers/github/src/webhook/types/event-shape.d.ts +7 -0
  155. package/dist.dts/providers/github/src/webhook/types/index.d.ts +1 -0
  156. package/dist.dts/providers/github/src/webhook/utils/fallback-github-event.d.ts +3 -0
  157. package/dist.dts/providers/github/src/webhook/utils/github-event-handlers.d.ts +2 -0
  158. package/dist.dts/providers/github/src/webhook/utils/index.d.ts +2 -0
  159. package/dist.dts/providers/github/src/webhook/utils/parse-check-run.d.ts +3 -0
  160. package/dist.dts/providers/github/src/webhook/utils/parse-check-suite.d.ts +3 -0
  161. package/dist.dts/providers/github/src/webhook/utils/parse-github-comment.d.ts +3 -0
  162. package/dist.dts/providers/github/src/webhook/utils/parse-github-webhook.d.ts +2 -0
  163. package/dist.dts/providers/github/src/webhook/utils/parse-pull-request-review.d.ts +3 -0
  164. package/dist.dts/providers/github/src/webhook/utils/parse-pull-request.d.ts +3 -0
  165. package/dist.dts/providers/github/src/webhook/utils/pull-request-number.d.ts +1 -0
  166. package/dist.dts/providers/github/src/webhook/utils/update-github-cursor.d.ts +3 -0
  167. package/dist.dts/providers/github/src/webhook/utils/verify-github-webhook.d.ts +1 -0
  168. package/dist.dts/providers/github/src/webhook/utils/verify-hmac.d.ts +1 -0
  169. package/dist.dts/providers/jira/src/index.d.ts +2 -0
  170. package/dist.dts/providers/jira/src/monitor.d.ts +14 -0
  171. package/dist.dts/providers/jira/src/poll/index.d.ts +2 -0
  172. package/dist.dts/providers/jira/src/poll/monitor.d.ts +3 -0
  173. package/dist.dts/providers/jira/src/poll/utils/adf-text.d.ts +1 -0
  174. package/dist.dts/providers/jira/src/poll/utils/append-jira-changelog.d.ts +2 -0
  175. package/dist.dts/providers/jira/src/poll/utils/append-jira-comments.d.ts +2 -0
  176. package/dist.dts/providers/jira/src/poll/utils/append-jira-description.d.ts +2 -0
  177. package/dist.dts/providers/jira/src/poll/utils/empty-cursor.d.ts +2 -0
  178. package/dist.dts/providers/jira/src/poll/utils/format-jira-changelog-item.d.ts +1 -0
  179. package/dist.dts/providers/jira/src/poll/utils/index.d.ts +1 -0
  180. package/dist.dts/providers/jira/src/poll/utils/is-terminal-status.d.ts +1 -0
  181. package/dist.dts/providers/jira/src/poll/utils/jira-auth.d.ts +1 -0
  182. package/dist.dts/providers/jira/src/poll/utils/jira-change-value.d.ts +1 -0
  183. package/dist.dts/providers/jira/src/poll/utils/jira-changelog-event.d.ts +2 -0
  184. package/dist.dts/providers/jira/src/poll/utils/jira-fetch.d.ts +1 -0
  185. package/dist.dts/providers/jira/src/poll/utils/meaningful-changelog-items.d.ts +1 -0
  186. package/dist.dts/providers/jira/src/poll/utils/poll-helpers.test.d.ts +1 -0
  187. package/dist.dts/providers/jira/src/poll/utils/poll-jira.d.ts +6 -0
  188. package/dist.dts/providers/jira/src/schema.d.ts +10 -0
  189. package/dist.dts/providers/jira/src/types/cursor.d.ts +5 -0
  190. package/dist.dts/providers/jira/src/types/event.d.ts +11 -0
  191. package/dist.dts/providers/jira/src/types/index.d.ts +3 -0
  192. package/dist.dts/providers/jira/src/types/source-record.d.ts +4 -0
  193. package/dist.dts/providers/slack/src/index.d.ts +2 -0
  194. package/dist.dts/providers/slack/src/monitor.d.ts +15 -0
  195. package/dist.dts/providers/slack/src/poll/index.d.ts +2 -0
  196. package/dist.dts/providers/slack/src/poll/monitor.d.ts +3 -0
  197. package/dist.dts/providers/slack/src/poll/utils/index.d.ts +2 -0
  198. package/dist.dts/providers/slack/src/poll/utils/parse-slack-read-result.d.ts +5 -0
  199. package/dist.dts/providers/slack/src/poll/utils/poll-slack.d.ts +6 -0
  200. package/dist.dts/providers/slack/src/poll/utils/slack-api.d.ts +4 -0
  201. package/dist.dts/providers/slack/src/schema.d.ts +11 -0
  202. package/dist.dts/providers/slack/src/slack.test.d.ts +1 -0
  203. package/dist.dts/providers/slack/src/types/cursor.d.ts +5 -0
  204. package/dist.dts/providers/slack/src/types/event.d.ts +8 -0
  205. package/dist.dts/providers/slack/src/types/index.d.ts +4 -0
  206. package/dist.dts/providers/slack/src/types/message.d.ts +6 -0
  207. package/dist.dts/providers/slack/src/types/read-result.d.ts +10 -0
  208. package/dist.dts/providers/slack/src/types/source-record.d.ts +5 -0
  209. package/dist.dts/providers/slack/src/utils/index.d.ts +2 -0
  210. package/dist.dts/providers/slack/src/utils/message-at.d.ts +1 -0
  211. package/dist.dts/providers/slack/src/utils/message-timestamp.d.ts +1 -0
  212. package/dist.dts/providers/slack/src/webhook/index.d.ts +2 -0
  213. package/dist.dts/providers/slack/src/webhook/monitor.d.ts +3 -0
  214. package/dist.dts/providers/slack/src/webhook/utils/index.d.ts +3 -0
  215. package/dist.dts/providers/slack/src/webhook/utils/parse-slack-webhook.d.ts +2 -0
  216. package/dist.dts/providers/slack/src/webhook/utils/slack-signature.d.ts +1 -0
  217. package/dist.dts/providers/slack/src/webhook/utils/update-slack-cursor.d.ts +3 -0
  218. package/dist.dts/providers/slack/src/webhook/utils/valid-slack-signature.d.ts +1 -0
  219. package/dist.dts/tui.d.ts +1 -0
  220. package/package.json +68 -0
@@ -0,0 +1,2 @@
1
+ export { parseGithubWebhook } from "./parse-github-webhook.js";
2
+ export { verifyGithubWebhook } from "./verify-github-webhook.js";
@@ -0,0 +1,3 @@
1
+ import type { GithubEventShape } from "../types/event-shape.js";
2
+ import type { GithubWebhookContext } from "../types/context.js";
3
+ export declare function parseCheckRun({ payload, repo, prNumber }: GithubWebhookContext): GithubEventShape;
@@ -0,0 +1,3 @@
1
+ import type { GithubEventShape } from "../types/event-shape.js";
2
+ import type { GithubWebhookContext } from "../types/context.js";
3
+ export declare function parseCheckSuite({ payload, repo, prNumber }: GithubWebhookContext): GithubEventShape;
@@ -0,0 +1,3 @@
1
+ import type { GithubEventShape } from "../types/event-shape.js";
2
+ import type { GithubWebhookContext } from "../types/context.js";
3
+ export declare function parseGithubComment({ payload, actor, repo, prNumber, eventName }: GithubWebhookContext): GithubEventShape;
@@ -0,0 +1,2 @@
1
+ import type { MonitorEvent } from "@fdcn/sourcefed/core";
2
+ export declare function parseGithubWebhook(payload: any, eventName: string, _deliveryId: string): MonitorEvent | undefined;
@@ -0,0 +1,3 @@
1
+ import type { GithubEventShape } from "../types/event-shape.js";
2
+ import type { GithubWebhookContext } from "../types/context.js";
3
+ export declare function parsePullRequestReview({ payload, actor, repo, prNumber }: GithubWebhookContext): GithubEventShape;
@@ -0,0 +1,3 @@
1
+ import type { GithubEventShape } from "../types/event-shape.js";
2
+ import type { GithubWebhookContext } from "../types/context.js";
3
+ export declare function parsePullRequest({ payload, repo, prNumber }: GithubWebhookContext): GithubEventShape;
@@ -0,0 +1 @@
1
+ export declare function githubPullRequestNumber(payload: any, eventName: string): number | undefined;
@@ -0,0 +1,3 @@
1
+ import type { MonitorEvent } from "@fdcn/sourcefed/core";
2
+ import type { GithubCursor } from "../../types";
3
+ export declare function updateGithubCursor(event: MonitorEvent, cursorRaw: unknown): GithubCursor;
@@ -0,0 +1 @@
1
+ export declare function verifyGithubWebhook(body: string, request: Request): boolean;
@@ -0,0 +1 @@
1
+ export declare function verifyHmac(body: string, signature: string | null, secret: string | undefined): boolean;
@@ -0,0 +1,2 @@
1
+ export { JiraMonitor } from "./monitor.js";
2
+ export type { JiraSourceRecord, JiraEvent, JiraCursor } from "./types";
@@ -0,0 +1,14 @@
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";
5
+ export declare class JiraMonitor extends Monitor<JiraSourceRecord> {
6
+ readonly poll: import("@fdcn/sourcefed/core").PollMonitor<JiraSourceRecord>;
7
+ constructor();
8
+ readonly key: (source: JiraSourceRecord) => string;
9
+ readonly icon = "\uDB80\uDF03";
10
+ readonly label: (source: JiraSourceRecord) => string;
11
+ readonly detail: (source: JiraSourceRecord) => string;
12
+ readonly describe: (source: JiraSourceRecord) => string;
13
+ build(input: MonitorCreateInput): SourceInput;
14
+ }
@@ -0,0 +1,2 @@
1
+ export { jiraPollMonitor } from "./monitor.js";
2
+ export * from "./utils";
@@ -0,0 +1,3 @@
1
+ import { PollMonitor } from "@fdcn/sourcefed/core";
2
+ import type { JiraSourceRecord } from "../types";
3
+ export declare const jiraPollMonitor: PollMonitor<JiraSourceRecord>;
@@ -0,0 +1 @@
1
+ export declare function adfText(node: any): string;
@@ -0,0 +1,2 @@
1
+ import type { JiraCursor, JiraEvent } from "../../types";
2
+ export declare function appendJiraChangelog(issueKey: string, cursor: JiraCursor, events: JiraEvent[], histories: any[]): void;
@@ -0,0 +1,2 @@
1
+ import type { JiraCursor, JiraEvent } from "../../types";
2
+ export declare function appendJiraComments(issueKey: string, cursor: JiraCursor, events: JiraEvent[], comments: any[]): void;
@@ -0,0 +1,2 @@
1
+ import type { JiraCursor, JiraEvent } from "../../types";
2
+ export declare function appendJiraDescription(issueKey: string, cursor: JiraCursor, events: JiraEvent[], description: any): void;
@@ -0,0 +1,2 @@
1
+ import type { JiraCursor } from "../../types";
2
+ export declare function emptyJiraCursor(): JiraCursor;
@@ -0,0 +1 @@
1
+ export declare function formatJiraChangelogItem(item: any): string;
@@ -0,0 +1 @@
1
+ export { pollJira } from "./poll-jira.js";
@@ -0,0 +1 @@
1
+ export declare function isTerminalStatus(status: unknown): boolean;
@@ -0,0 +1 @@
1
+ export declare function jiraAuth(): string;
@@ -0,0 +1 @@
1
+ export declare function jiraChangeValue(item: any, side: "from" | "to"): string;
@@ -0,0 +1,2 @@
1
+ import type { JiraEvent } from "../../types";
2
+ export declare function jiraChangelogEvent(issueKey: string, history: any): JiraEvent | undefined;
@@ -0,0 +1 @@
1
+ export declare function jiraFetch(path: string): Promise<any>;
@@ -0,0 +1 @@
1
+ export declare function meaningfulChangelogItems(items: any[]): any[];
@@ -0,0 +1,6 @@
1
+ import type { JiraCursor, JiraEvent } from "../../types";
2
+ export declare function pollJira(issueKey: string, cursorRaw: unknown): Promise<{
3
+ events: JiraEvent[];
4
+ cursor: JiraCursor;
5
+ terminal: boolean;
6
+ }>;
@@ -0,0 +1,10 @@
1
+ import * as v from "valibot";
2
+ export declare const JiraSourceSchema: v.ObjectSchema<{
3
+ readonly type: v.LiteralSchema<"jira", undefined>;
4
+ readonly issueKey: v.StringSchema<undefined>;
5
+ }, undefined>;
6
+ export declare const JiraCursorSchema: v.ObjectSchema<{
7
+ readonly commentIds: v.ArraySchema<v.NumberSchema<undefined>, undefined>;
8
+ readonly descriptionVersion: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
9
+ readonly changelogCount: v.NumberSchema<undefined>;
10
+ }, undefined>;
@@ -0,0 +1,5 @@
1
+ export interface JiraCursor {
2
+ commentIds: number[];
3
+ descriptionVersion?: string;
4
+ changelogCount: number;
5
+ }
@@ -0,0 +1,11 @@
1
+ export interface JiraEvent {
2
+ kind: "comment" | "description" | "changelog";
3
+ id?: string;
4
+ issueKey: string;
5
+ at: string;
6
+ summary: string;
7
+ body?: string;
8
+ author?: string;
9
+ actionable: boolean;
10
+ terminal?: boolean;
11
+ }
@@ -0,0 +1,3 @@
1
+ export type { JiraCursor } from "./cursor.js";
2
+ export type { JiraEvent } from "./event.js";
3
+ export type { JiraSourceRecord } from "./source-record.js";
@@ -0,0 +1,4 @@
1
+ export type JiraSourceRecord = {
2
+ type: "jira";
3
+ issueKey: string;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { SlackMonitor } from "./monitor.js";
2
+ export type { SlackSourceRecord, SlackEvent, SlackCursor } from "./types";
@@ -0,0 +1,15 @@
1
+ import { Monitor } from "@fdcn/sourcefed/core";
2
+ import type { MonitorCreateInput } from "@fdcn/sourcefed/core";
3
+ import type { SlackSourceRecord } from "./types";
4
+ import type { SourceInput } from "@fdcn/sourcefed/core";
5
+ export declare class SlackMonitor extends Monitor<SlackSourceRecord> {
6
+ readonly poll: import("@fdcn/sourcefed/core").PollMonitor<SlackSourceRecord>;
7
+ readonly webhook: import("@fdcn/sourcefed/core").WebhookMonitor<SlackSourceRecord>;
8
+ constructor();
9
+ readonly key: (source: SlackSourceRecord) => string;
10
+ readonly icon = "\uDB81\uDCB1";
11
+ readonly label: () => string;
12
+ readonly detail: (source: SlackSourceRecord) => string;
13
+ readonly describe: (source: SlackSourceRecord) => string;
14
+ build(input: MonitorCreateInput): SourceInput;
15
+ }
@@ -0,0 +1,2 @@
1
+ export { slackPollMonitor } from "./monitor.js";
2
+ export * from "./utils";
@@ -0,0 +1,3 @@
1
+ import { PollMonitor } from "@fdcn/sourcefed/core";
2
+ import type { SlackSourceRecord } from "../types";
3
+ export declare const slackPollMonitor: PollMonitor<SlackSourceRecord>;
@@ -0,0 +1,2 @@
1
+ export { parseSlackReadResult } from "./parse-slack-read-result.js";
2
+ export { pollSlack } from "./poll-slack.js";
@@ -0,0 +1,5 @@
1
+ import type { SlackCursor, SlackEvent, SlackReadResult } from "../../types";
2
+ export declare function parseSlackReadResult(result: SlackReadResult, cursorRaw: unknown): {
3
+ events: SlackEvent[];
4
+ cursor: SlackCursor;
5
+ };
@@ -0,0 +1,6 @@
1
+ import type { SlackCursor, SlackEvent, SlackSourceRecord } from "../../types";
2
+ export declare function pollSlack(source: SlackSourceRecord, cursorRaw: unknown): Promise<{
3
+ events: SlackEvent[];
4
+ cursor: SlackCursor;
5
+ terminal: false;
6
+ }>;
@@ -0,0 +1,4 @@
1
+ export declare function fetchSlackThread(channelId: string, threadTs: string): Promise<{
2
+ messages: any[];
3
+ users: any[];
4
+ } | undefined>;
@@ -0,0 +1,11 @@
1
+ import * as v from "valibot";
2
+ export declare const SlackSourceSchema: v.ObjectSchema<{
3
+ readonly type: v.LiteralSchema<"slack", undefined>;
4
+ readonly channelId: v.StringSchema<undefined>;
5
+ readonly threadTs: v.StringSchema<undefined>;
6
+ }, undefined>;
7
+ export declare const SlackCursorSchema: v.ObjectSchema<{
8
+ readonly primed: v.BooleanSchema<undefined>;
9
+ readonly messageIds: v.ArraySchema<v.StringSchema<undefined>, undefined>;
10
+ readonly latestTs: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
11
+ }, undefined>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface SlackCursor {
2
+ primed: boolean;
3
+ messageIds: string[];
4
+ latestTs?: string;
5
+ }
@@ -0,0 +1,8 @@
1
+ export interface SlackEvent {
2
+ kind: "message";
3
+ id?: string;
4
+ at: string;
5
+ summary: string;
6
+ body: string;
7
+ actionable: boolean;
8
+ }
@@ -0,0 +1,4 @@
1
+ export type { SlackCursor } from "./cursor.js";
2
+ export type { SlackEvent } from "./event.js";
3
+ export type { SlackReadResult } from "./read-result.js";
4
+ export type { SlackSourceRecord } from "./source-record.js";
@@ -0,0 +1,6 @@
1
+ export interface SlackMessage {
2
+ ts?: string;
3
+ thread_ts?: string;
4
+ user?: string;
5
+ text?: string;
6
+ }
@@ -0,0 +1,10 @@
1
+ import type { SlackMessage } from "./message.js";
2
+ export interface SlackUser {
3
+ id?: string;
4
+ name?: string;
5
+ real_name?: string;
6
+ }
7
+ export interface SlackReadResult {
8
+ messages?: SlackMessage[];
9
+ users?: SlackUser[];
10
+ }
@@ -0,0 +1,5 @@
1
+ export type SlackSourceRecord = {
2
+ type: "slack";
3
+ channelId: string;
4
+ threadTs: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ export { messageAt } from "./message-at.js";
2
+ export { messageTimestamp } from "./message-timestamp.js";
@@ -0,0 +1 @@
1
+ export declare function messageAt(ts: string | undefined): string;
@@ -0,0 +1 @@
1
+ export declare function messageTimestamp(ts: string | undefined): number;
@@ -0,0 +1,2 @@
1
+ export { slackWebhookMonitor } from "./monitor.js";
2
+ export * from "./utils";
@@ -0,0 +1,3 @@
1
+ import { WebhookMonitor } from "@fdcn/sourcefed/core";
2
+ import type { SlackSourceRecord } from "../types";
3
+ export declare const slackWebhookMonitor: WebhookMonitor<SlackSourceRecord>;
@@ -0,0 +1,3 @@
1
+ export { parseSlackWebhook } from "./parse-slack-webhook.js";
2
+ export { slackSignature } from "./slack-signature.js";
3
+ export { validSlackSignature } from "./valid-slack-signature.js";
@@ -0,0 +1,2 @@
1
+ import type { MonitorEvent } from "@fdcn/sourcefed/core";
2
+ export declare function parseSlackWebhook(payload: any, _eventName: string, deliveryId: string): MonitorEvent | undefined;
@@ -0,0 +1 @@
1
+ export declare function slackSignature(body: string, timestamp: string, secret: string): string;
@@ -0,0 +1,3 @@
1
+ import type { MonitorEvent } from "@fdcn/sourcefed/core";
2
+ import type { SlackCursor } from "../../types";
3
+ export declare function updateSlackCursor(event: MonitorEvent, cursorRaw: unknown): SlackCursor;
@@ -0,0 +1 @@
1
+ export declare function validSlackSignature(body: string, request: Request, secret?: string | undefined): boolean;
@@ -0,0 +1 @@
1
+ export { default } from "./adapters/opencode/tui.js";
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@fdcn/sourcefed",
3
+ "version": "0.2.0",
4
+ "description": "Live Jira, GitHub, and Slack monitoring for agent hosts: CLI, daemon, MCP server, and host plugins.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "sourcefed": "./dist/cli.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "dist.dts",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist.dts/packages/cli/src/index.d.ts",
19
+ "default": "./dist/cli.js"
20
+ },
21
+ "./core": {
22
+ "types": "./dist.dts/packages/core/src/index.d.ts",
23
+ "default": "./dist/core.js"
24
+ },
25
+ "./core/storage": {
26
+ "types": "./dist.dts/packages/core/src/storage/index.d.ts",
27
+ "default": "./dist/core-storage.js"
28
+ },
29
+ "./daemon": {
30
+ "types": "./dist.dts/packages/daemon/src/index.d.ts",
31
+ "default": "./dist/daemon.js"
32
+ },
33
+ "./mcp": {
34
+ "types": "./dist.dts/packages/mcp/src/index.d.ts",
35
+ "default": "./dist/mcp.js"
36
+ },
37
+ "./server": {
38
+ "types": "./dist.dts/packages/sourcefed/src/server.d.ts",
39
+ "default": "./dist/opencode.js"
40
+ },
41
+ "./opencode": {
42
+ "types": "./dist.dts/adapters/opencode/index.d.ts",
43
+ "default": "./dist/opencode.js"
44
+ },
45
+ "./opencode/tui": "./dist/tui-compiled.mjs",
46
+ "./tui": "./dist/tui-compiled.mjs",
47
+ "./pi": "./dist/pi.js",
48
+ "./package.json": "./package.json"
49
+ },
50
+ "dependencies": {
51
+ "@earendil-works/pi-coding-agent": "0.83.0",
52
+ "@earendil-works/pi-tui": "0.83.0",
53
+ "@modelcontextprotocol/server": "2.0.0",
54
+ "@opencode-ai/plugin": "1.18.13",
55
+ "typebox": "1.3.10"
56
+ },
57
+ "engines": {
58
+ "node": ">=22.19.0"
59
+ },
60
+ "publishConfig": {
61
+ "access": "public"
62
+ },
63
+ "pi": {
64
+ "extensions": [
65
+ "./dist/pi.js"
66
+ ]
67
+ }
68
+ }