@mulmoclaude/core 0.2.9 → 0.2.10
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.
- package/dist/collection/core/actionVisible.d.ts +34 -0
- package/dist/collection/core/calendarGrid.d.ts +120 -0
- package/dist/collection/core/deriveAll.d.ts +38 -0
- package/dist/collection/core/derivedFormula.d.ts +18 -0
- package/dist/collection/core/draft.d.ts +18 -0
- package/dist/collection/core/enumColors.d.ts +33 -0
- package/dist/collection/core/errorMessage.d.ts +4 -0
- package/dist/collection/core/itemLabel.d.ts +12 -0
- package/dist/collection/core/presentCollection.d.ts +13 -0
- package/dist/collection/core/promptSafety.d.ts +1 -0
- package/dist/collection/core/schema.d.ts +382 -0
- package/dist/collection/core/shortHexId.d.ts +8 -0
- package/dist/collection/core/sortItems.d.ts +29 -0
- package/dist/collection/core/uiTypes.d.ts +106 -0
- package/dist/collection/index.cjs +794 -0
- package/dist/collection/index.cjs.map +1 -0
- package/dist/collection/index.d.ts +14 -0
- package/dist/collection/paths.cjs +44 -0
- package/dist/collection/paths.cjs.map +1 -0
- package/dist/collection/server/atomic.d.ts +1 -0
- package/dist/collection/server/delete.d.ts +38 -0
- package/dist/collection/server/derive.d.ts +8 -0
- package/dist/collection/server/discoveredCollection.d.ts +18 -0
- package/dist/collection/server/discovery.d.ts +239 -0
- package/dist/collection/server/host.d.ts +77 -0
- package/dist/collection/server/index.cjs +51 -0
- package/dist/collection/server/io.d.ts +120 -0
- package/dist/collection/server/paths.d.ts +52 -0
- package/dist/collection/server/spawn.d.ts +55 -0
- package/dist/collection/server/util.d.ts +3 -0
- package/dist/collection/server/validate.d.ts +19 -0
- package/dist/collection/server/views.d.ts +20 -0
- package/dist/collection-watchers/config.d.ts +49 -0
- package/dist/collection-watchers/index.cjs +553 -0
- package/dist/collection-watchers/index.cjs.map +1 -0
- package/dist/collection-watchers/index.d.ts +3 -0
- package/dist/collection-watchers/reconciler.d.ts +33 -0
- package/dist/collection-watchers/watcher.d.ts +34 -0
- package/dist/deriveAll-VRWrs3SF.cjs +413 -0
- package/dist/deriveAll-VRWrs3SF.cjs.map +1 -0
- package/dist/feeds/index.cjs +8 -0
- package/dist/feeds/index.d.ts +1 -0
- package/dist/feeds/ingestTypes.d.ts +57 -0
- package/dist/feeds/paths.cjs +48 -0
- package/dist/feeds/paths.cjs.map +1 -0
- package/dist/feeds/paths.d.ts +22 -0
- package/dist/feeds/server/fetch/httpClient.d.ts +8 -0
- package/dist/feeds/server/fetch/rssParser.d.ts +12 -0
- package/dist/feeds/server/index.cjs +839 -0
- package/dist/feeds/server/index.cjs.map +1 -0
- package/dist/feeds/server/index.js +4 -5
- package/dist/feeds/server/index.js.map +1 -1
- package/dist/feeds/server/pathResolver.d.ts +6 -0
- package/dist/feeds/server/projectItem.d.ts +8 -0
- package/dist/feeds/server/refreshResult.d.ts +17 -0
- package/dist/feeds/server/retrievers/httpJson.d.ts +3 -0
- package/dist/feeds/server/retrievers/index.d.ts +12 -0
- package/dist/feeds/server/retrievers/registerAll.d.ts +0 -0
- package/dist/feeds/server/retrievers/rss.d.ts +3 -0
- package/dist/feeds/server/scheduledRefresh.d.ts +1 -1
- package/dist/file-change/index.cjs +72 -0
- package/dist/file-change/index.cjs.map +1 -0
- package/dist/file-change/index.d.ts +43 -0
- package/dist/ingestTypes-DDOVhOYC.cjs +32 -0
- package/dist/ingestTypes-DDOVhOYC.cjs.map +1 -0
- package/dist/notifier/engine.d.ts +72 -0
- package/dist/notifier/index.cjs +21 -0
- package/dist/notifier/index.d.ts +3 -0
- package/dist/notifier/store.d.ts +18 -0
- package/dist/notifier/types.d.ts +118 -0
- package/dist/notifier/validate.d.ts +17 -0
- package/dist/notifier-bS8IEeLA.cjs +577 -0
- package/dist/notifier-bS8IEeLA.cjs.map +1 -0
- package/dist/rolldown-runtime-D6vf50IK.cjs +28 -0
- package/dist/scheduler/adapter.d.ts +48 -0
- package/dist/scheduler/index.cjs +352 -0
- package/dist/scheduler/index.cjs.map +1 -0
- package/dist/scheduler/index.d.ts +2 -0
- package/dist/scheduler/task-manager.d.ts +51 -0
- package/dist/server-Db-x7OXz.cjs +1993 -0
- package/dist/server-Db-x7OXz.cjs.map +1 -0
- package/dist/skill-bridge/index.cjs +88 -0
- package/dist/skill-bridge/index.cjs.map +1 -0
- package/dist/skill-bridge/index.d.ts +30 -0
- package/dist/whisper/client.cjs +241 -0
- package/dist/whisper/client.cjs.map +1 -0
- package/dist/whisper/client.d.ts +35 -0
- package/dist/whisper/ffmpeg.d.ts +6 -0
- package/dist/whisper/index.cjs +433 -0
- package/dist/whisper/index.cjs.map +1 -0
- package/dist/whisper/index.d.ts +5 -0
- package/dist/whisper/internal.d.ts +11 -0
- package/dist/whisper/models.d.ts +49 -0
- package/dist/whisper/sidecar.d.ts +8 -0
- package/dist/whisper/whisper.d.ts +28 -0
- package/dist/workspace-setup/assets.d.ts +10 -0
- package/dist/workspace-setup/index.d.ts +3 -0
- package/dist/workspace-setup/index.js +560 -0
- package/dist/workspace-setup/index.js.map +1 -0
- package/dist/workspace-setup/slug.d.ts +6 -0
- package/dist/workspace-setup/slug.js +13 -0
- package/dist/workspace-setup/slug.js.map +1 -0
- package/dist/workspace-setup/sync.d.ts +94 -0
- package/package.json +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CollectionIngest, INGEST_KINDS, FEED_SCHEDULES, IngestKind, FeedSchedule } from '../collection/index.js';
|
|
2
|
+
export declare const AGENT_INGEST_KIND: "agent";
|
|
3
|
+
export type AgentIngestKind = typeof AGENT_INGEST_KIND;
|
|
4
|
+
export { INGEST_KINDS, FEED_SCHEDULES, type IngestKind, type FeedSchedule };
|
|
5
|
+
export declare function isFeedSchedule(value: unknown): value is FeedSchedule;
|
|
6
|
+
/** Default cap on stored records per feed when `ingest.maxItems` is
|
|
7
|
+
* omitted. Keeps high-volume feeds (news / podcasts) bounded. */
|
|
8
|
+
export declare const DEFAULT_FEED_MAX_ITEMS = 100;
|
|
9
|
+
/** Declarative field map: target collection field name → source path
|
|
10
|
+
* into the raw item (dot/bracket path, e.g. `"title"` or
|
|
11
|
+
* `"data.name"`). */
|
|
12
|
+
export type IngestFieldMap = Record<string, string>;
|
|
13
|
+
/** Declarative retrieval (`rss`/`atom`/`http-json`): the host fetches `url`
|
|
14
|
+
* and projects each item through `map`. The canonical schema (in
|
|
15
|
+
* `../collection`) only promises the minimal `CollectionIngest`; this
|
|
16
|
+
* feeds-only subtype narrows those + adds the retrieval fields the engine
|
|
17
|
+
* needs. */
|
|
18
|
+
export interface DeclarativeIngestSpec extends CollectionIngest {
|
|
19
|
+
/** Which declarative retriever handles this feed. */
|
|
20
|
+
kind: IngestKind;
|
|
21
|
+
/** Endpoint to fetch (http/https). */
|
|
22
|
+
url: string;
|
|
23
|
+
/** Refresh cadence. */
|
|
24
|
+
schedule: FeedSchedule;
|
|
25
|
+
/** `http-json` only: dot/bracket path to the array of items in the
|
|
26
|
+
* response (e.g. `"hourly[]"` or `"data.results[]"`). Ignored for
|
|
27
|
+
* `rss`/`atom`, which yield items natively. */
|
|
28
|
+
itemsAt?: string;
|
|
29
|
+
/** target field → source path. Projects each raw item into a record
|
|
30
|
+
* whose keys match the schema's `fields`. */
|
|
31
|
+
map: IngestFieldMap;
|
|
32
|
+
/** Optional source path used to derive the primaryKey value when the
|
|
33
|
+
* mapped record's primaryKey is empty (e.g. `"feedId"`). Falls back
|
|
34
|
+
* to a content hash of the record. */
|
|
35
|
+
idFrom?: string;
|
|
36
|
+
/** Cap on stored records. After each fetch the feed keeps only the
|
|
37
|
+
* newest `maxItems` (ordered by the schema's first `date` field) and
|
|
38
|
+
* deletes the rest. Defaults to {@link DEFAULT_FEED_MAX_ITEMS} when
|
|
39
|
+
* omitted; `0` disables the cap (keep everything). Pruning is skipped
|
|
40
|
+
* when the schema has no `date` field to order by. */
|
|
41
|
+
maxItems?: number;
|
|
42
|
+
}
|
|
43
|
+
/** Agent-performed retrieval (`kind: "agent"`). No `url`/`map`: the host seeds
|
|
44
|
+
* a hidden background worker (origin `system`) in `role` with `template` + a
|
|
45
|
+
* summary of every record, and the worker edits the records itself via the
|
|
46
|
+
* collections io layer. Valid on any collection (primarily skill-backed). */
|
|
47
|
+
export interface AgentIngestSpec extends CollectionIngest {
|
|
48
|
+
kind: AgentIngestKind;
|
|
49
|
+
/** Refresh cadence (same vocabulary as declarative feeds). */
|
|
50
|
+
schedule: FeedSchedule;
|
|
51
|
+
/** Role id the scheduled hidden worker runs in. */
|
|
52
|
+
role: string;
|
|
53
|
+
/** Skill-relative template path (under `templates/`) seeding the worker. */
|
|
54
|
+
template: string;
|
|
55
|
+
}
|
|
56
|
+
/** The `ingest` block carried on a `CollectionSchema`, discriminated on `kind`. */
|
|
57
|
+
export type IngestSpec = DeclarativeIngestSpec | AgentIngestSpec;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_rolldown_runtime = require("../rolldown-runtime-D6vf50IK.cjs");
|
|
3
|
+
let node_path = require("node:path");
|
|
4
|
+
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
5
|
+
//#region src/feeds/paths.ts
|
|
6
|
+
var FEEDS_DIR = "feeds";
|
|
7
|
+
var FEED_STATE_FILE = "_state.json";
|
|
8
|
+
/** Where retrieval state for NON-feed collections with an `ingest` block
|
|
9
|
+
* (`kind: "agent"`) lives — one file per collection, OUTSIDE the collection's
|
|
10
|
+
* dataDir (where `listItems` would read it as a record) and outside `feeds/`
|
|
11
|
+
* (a schema-less `feeds/<slug>/` dir confuses feed discovery). Mirrors the
|
|
12
|
+
* host's `WORKSPACE_DIRS.ingestState`. */
|
|
13
|
+
var INGEST_STATE_DIR = "data/ingest-state";
|
|
14
|
+
/** Absolute path to the feeds registry root for a workspace. */
|
|
15
|
+
function feedsRoot(workspaceRoot) {
|
|
16
|
+
return node_path.default.join(workspaceRoot, FEEDS_DIR);
|
|
17
|
+
}
|
|
18
|
+
/** Absolute path to one feed's directory (`<root>/<slug>/`). */
|
|
19
|
+
function feedDir(slug, workspaceRoot) {
|
|
20
|
+
return node_path.default.join(feedsRoot(workspaceRoot), slug);
|
|
21
|
+
}
|
|
22
|
+
/** Absolute path to one feed's retrieval-state file. */
|
|
23
|
+
function feedStatePath(slug, workspaceRoot) {
|
|
24
|
+
return node_path.default.join(feedsRoot(workspaceRoot), slug, FEED_STATE_FILE);
|
|
25
|
+
}
|
|
26
|
+
/** Directory holding retrieval state for NON-feed collections with an
|
|
27
|
+
* `ingest` block (`kind: "agent"`). One file per collection. */
|
|
28
|
+
function ingestStateDir(workspaceRoot) {
|
|
29
|
+
return node_path.default.join(workspaceRoot, INGEST_STATE_DIR);
|
|
30
|
+
}
|
|
31
|
+
/** Absolute path to a non-feed collection's ingest-state file
|
|
32
|
+
* (`data/ingest-state/<slug>.json`). Kept OUT of the collection's dataDir
|
|
33
|
+
* (where `listItems` would read it as a record) and out of `feeds/` (a
|
|
34
|
+
* schema-less `feeds/<slug>/` dir confuses feed discovery). */
|
|
35
|
+
function ingestStatePath(slug, workspaceRoot) {
|
|
36
|
+
return node_path.default.join(ingestStateDir(workspaceRoot), `${slug}.json`);
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.FEEDS_DIR = FEEDS_DIR;
|
|
40
|
+
exports.FEED_STATE_FILE = FEED_STATE_FILE;
|
|
41
|
+
exports.INGEST_STATE_DIR = INGEST_STATE_DIR;
|
|
42
|
+
exports.feedDir = feedDir;
|
|
43
|
+
exports.feedStatePath = feedStatePath;
|
|
44
|
+
exports.feedsRoot = feedsRoot;
|
|
45
|
+
exports.ingestStateDir = ingestStateDir;
|
|
46
|
+
exports.ingestStatePath = ingestStatePath;
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=paths.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.cjs","names":[],"sources":["../../src/feeds/paths.ts"],"sourcesContent":["// Path helpers for the non-skill Feeds registry. Each feed lives at\n// `<workspace>/feeds/<slug>/schema.json` (a CollectionSchema + `ingest`\n// block) with its retrieval state alongside at\n// `<workspace>/feeds/<slug>/_state.json`. Records land wherever the\n// schema's `dataPath` points (validated by `resolveDataDir`), exactly\n// like every other collection.\n//\n// Pure root→path functions: `workspaceRoot` is always passed in (the host\n// supplies its default). Slugs reaching these helpers must already have\n// passed `safeSlugName` — these joins do not re-sanitize.\n\nimport path from \"node:path\";\n\nexport const FEEDS_DIR = \"feeds\";\nexport const FEED_STATE_FILE = \"_state.json\";\n\n/** Where retrieval state for NON-feed collections with an `ingest` block\n * (`kind: \"agent\"`) lives — one file per collection, OUTSIDE the collection's\n * dataDir (where `listItems` would read it as a record) and outside `feeds/`\n * (a schema-less `feeds/<slug>/` dir confuses feed discovery). Mirrors the\n * host's `WORKSPACE_DIRS.ingestState`. */\nexport const INGEST_STATE_DIR = \"data/ingest-state\";\n\n/** Absolute path to the feeds registry root for a workspace. */\nexport function feedsRoot(workspaceRoot: string): string {\n return path.join(workspaceRoot, FEEDS_DIR);\n}\n\n/** Absolute path to one feed's directory (`<root>/<slug>/`). */\nexport function feedDir(slug: string, workspaceRoot: string): string {\n return path.join(feedsRoot(workspaceRoot), slug);\n}\n\n/** Absolute path to one feed's retrieval-state file. */\nexport function feedStatePath(slug: string, workspaceRoot: string): string {\n return path.join(feedsRoot(workspaceRoot), slug, FEED_STATE_FILE);\n}\n\n/** Directory holding retrieval state for NON-feed collections with an\n * `ingest` block (`kind: \"agent\"`). One file per collection. */\nexport function ingestStateDir(workspaceRoot: string): string {\n return path.join(workspaceRoot, INGEST_STATE_DIR);\n}\n\n/** Absolute path to a non-feed collection's ingest-state file\n * (`data/ingest-state/<slug>.json`). Kept OUT of the collection's dataDir\n * (where `listItems` would read it as a record) and out of `feeds/` (a\n * schema-less `feeds/<slug>/` dir confuses feed discovery). */\nexport function ingestStatePath(slug: string, workspaceRoot: string): string {\n return path.join(ingestStateDir(workspaceRoot), `${slug}.json`);\n}\n"],"mappings":";;;;;AAaA,IAAa,YAAY;AACzB,IAAa,kBAAkB;;;;;;AAO/B,IAAa,mBAAmB;;AAGhC,SAAgB,UAAU,eAA+B;CACvD,OAAO,UAAA,QAAK,KAAK,eAAe,SAAS;AAC3C;;AAGA,SAAgB,QAAQ,MAAc,eAA+B;CACnE,OAAO,UAAA,QAAK,KAAK,UAAU,aAAa,GAAG,IAAI;AACjD;;AAGA,SAAgB,cAAc,MAAc,eAA+B;CACzE,OAAO,UAAA,QAAK,KAAK,UAAU,aAAa,GAAG,MAAM,eAAe;AAClE;;;AAIA,SAAgB,eAAe,eAA+B;CAC5D,OAAO,UAAA,QAAK,KAAK,eAAe,gBAAgB;AAClD;;;;;AAMA,SAAgB,gBAAgB,MAAc,eAA+B;CAC3E,OAAO,UAAA,QAAK,KAAK,eAAe,aAAa,GAAG,GAAG,KAAK,MAAM;AAChE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const FEEDS_DIR = "feeds";
|
|
2
|
+
export declare const FEED_STATE_FILE = "_state.json";
|
|
3
|
+
/** Where retrieval state for NON-feed collections with an `ingest` block
|
|
4
|
+
* (`kind: "agent"`) lives — one file per collection, OUTSIDE the collection's
|
|
5
|
+
* dataDir (where `listItems` would read it as a record) and outside `feeds/`
|
|
6
|
+
* (a schema-less `feeds/<slug>/` dir confuses feed discovery). Mirrors the
|
|
7
|
+
* host's `WORKSPACE_DIRS.ingestState`. */
|
|
8
|
+
export declare const INGEST_STATE_DIR = "data/ingest-state";
|
|
9
|
+
/** Absolute path to the feeds registry root for a workspace. */
|
|
10
|
+
export declare function feedsRoot(workspaceRoot: string): string;
|
|
11
|
+
/** Absolute path to one feed's directory (`<root>/<slug>/`). */
|
|
12
|
+
export declare function feedDir(slug: string, workspaceRoot: string): string;
|
|
13
|
+
/** Absolute path to one feed's retrieval-state file. */
|
|
14
|
+
export declare function feedStatePath(slug: string, workspaceRoot: string): string;
|
|
15
|
+
/** Directory holding retrieval state for NON-feed collections with an
|
|
16
|
+
* `ingest` block (`kind: "agent"`). One file per collection. */
|
|
17
|
+
export declare function ingestStateDir(workspaceRoot: string): string;
|
|
18
|
+
/** Absolute path to a non-feed collection's ingest-state file
|
|
19
|
+
* (`data/ingest-state/<slug>.json`). Kept OUT of the collection's dataDir
|
|
20
|
+
* (where `listItems` would read it as a record) and out of `feeds/` (a
|
|
21
|
+
* schema-less `feeds/<slug>/` dir confuses feed discovery). */
|
|
22
|
+
export declare function ingestStatePath(slug: string, workspaceRoot: string): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Identifies the bot to site operators. */
|
|
2
|
+
export declare const FEED_USER_AGENT = "MulmoClaude-FeedBot/1.0 (+https://github.com/receptron/mulmoclaude)";
|
|
3
|
+
/** Per-request wall-clock cap so a hung server can't wedge a refresh. */
|
|
4
|
+
export declare const DEFAULT_FEED_TIMEOUT_MS: number;
|
|
5
|
+
/** Fetch a URL as text, throwing on guard rejection, network error, or non-2xx. */
|
|
6
|
+
export declare function fetchText(url: string, timeoutMs?: number): Promise<string>;
|
|
7
|
+
/** Fetch a URL as parsed JSON, throwing on guard rejection, network error, or non-2xx. */
|
|
8
|
+
export declare function fetchJson(url: string, timeoutMs?: number): Promise<unknown>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ParsedFeedItem {
|
|
2
|
+
/** The raw parsed XML <item>/<entry> object, verbatim. */
|
|
3
|
+
raw: Record<string, unknown>;
|
|
4
|
+
}
|
|
5
|
+
export interface ParsedFeed {
|
|
6
|
+
kind: "rss" | "atom";
|
|
7
|
+
title: string | null;
|
|
8
|
+
items: ParsedFeedItem[];
|
|
9
|
+
}
|
|
10
|
+
/** Parse an RSS/Atom/RDF feed body. Returns null when the input doesn't
|
|
11
|
+
* look like a feed we understand. */
|
|
12
|
+
export declare function parseFeed(body: string): ParsedFeed | null;
|