@mulmoclaude/core 3.2.0 → 3.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.
- package/assets/helps/error-recovery.md +71 -0
- package/assets/helps/google-calendar-collection.md +10 -0
- package/dist/collection/registry/server/index.cjs +3 -3
- package/dist/collection/registry/server/index.cjs.map +1 -1
- package/dist/collection/registry/server/index.js +3 -3
- package/dist/collection/registry/server/index.js.map +1 -1
- package/dist/collection/server/discovery.d.ts +10 -2
- package/dist/collection/server/host.d.ts +27 -3
- package/dist/collection/server/index.cjs +2 -2
- package/dist/collection/server/index.js +2 -2
- package/dist/collection-watchers/index.cjs +2 -2
- package/dist/collection-watchers/index.js +2 -2
- package/dist/{discovery-CDOjfctD.cjs → discovery-CrA_EqUJ.cjs} +19 -7
- package/dist/discovery-CrA_EqUJ.cjs.map +1 -0
- package/dist/{discovery-CC7kuwHf.js → discovery-D7LCN8gJ.js} +19 -7
- package/dist/discovery-D7LCN8gJ.js.map +1 -0
- package/dist/feeds/server/index.cjs +2 -2
- package/dist/feeds/server/index.js +2 -2
- package/dist/google/calendar.d.ts +15 -0
- package/dist/google/calendarBackfillState.d.ts +19 -0
- package/dist/google/calendarSyncStore.d.ts +15 -0
- package/dist/google/collectionSync.d.ts +78 -11
- package/dist/google/index.cjs +207 -35
- package/dist/google/index.cjs.map +1 -1
- package/dist/google/index.d.ts +4 -3
- package/dist/google/index.js +197 -35
- package/dist/google/index.js.map +1 -1
- package/dist/{server-WU35UYlF.cjs → server-CorfPQVQ.cjs} +2 -2
- package/dist/{server-WU35UYlF.cjs.map → server-CorfPQVQ.cjs.map} +1 -1
- package/dist/{server-AA2kfDfk.js → server-D6QY853r.js} +2 -2
- package/dist/{server-AA2kfDfk.js.map → server-D6QY853r.js.map} +1 -1
- package/package.json +1 -1
- package/dist/discovery-CC7kuwHf.js.map +0 -1
- package/dist/discovery-CDOjfctD.cjs.map +0 -1
|
@@ -104,8 +104,12 @@ function getWorkspaceRoot() {
|
|
|
104
104
|
function peekWorkspaceRoot() {
|
|
105
105
|
return hostSlot.peek()?.workspaceRoot ?? null;
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
/** The user-scope skills dir for a root, or `null` when it has none. The one
|
|
108
|
+
* place the pre-3.3.0 `string` binding is normalized, so nothing downstream
|
|
109
|
+
* has to know the host might not have upgraded its shape yet. */
|
|
110
|
+
function userSkillsDir(workspaceRoot) {
|
|
111
|
+
const binding = requireHost().paths.userSkillsDir;
|
|
112
|
+
return typeof binding === "string" ? binding : binding(workspaceRoot);
|
|
109
113
|
}
|
|
110
114
|
function projectSkillsDir(workspaceRoot) {
|
|
111
115
|
return requireHost().paths.projectSkillsDir(workspaceRoot);
|
|
@@ -2715,6 +2719,14 @@ async function collectFromDir(skillsRoot, source, workspaceRoot) {
|
|
|
2715
2719
|
}
|
|
2716
2720
|
return results;
|
|
2717
2721
|
}
|
|
2722
|
+
/** The user-scope dir this call should scan, or `null` for none. The single
|
|
2723
|
+
* place the "explicit override beats the host binding, and either may say
|
|
2724
|
+
* none" rule is spelled — `??` cannot express it, because `undefined` there
|
|
2725
|
+
* means "ask the host" and would silently re-enable a scope the caller
|
|
2726
|
+
* passed `null` to switch off. */
|
|
2727
|
+
function resolveUserDir(opts, workspaceRoot) {
|
|
2728
|
+
return opts.userSkillsDir !== void 0 ? opts.userSkillsDir : userSkillsDir(workspaceRoot);
|
|
2729
|
+
}
|
|
2718
2730
|
/** Discover every schema-driven collection available to this
|
|
2719
2731
|
* workspace. Project-scope collections override user-scope on slug
|
|
2720
2732
|
* collision. The `workspaceRoot` override also flows into each
|
|
@@ -2724,10 +2736,10 @@ async function collectFromDir(skillsRoot, source, workspaceRoot) {
|
|
|
2724
2736
|
* regardless of override). */
|
|
2725
2737
|
async function discoverCollections(opts = {}) {
|
|
2726
2738
|
const workspaceRoot = opts.workspaceRoot ?? getWorkspaceRoot();
|
|
2727
|
-
const userDir = opts
|
|
2739
|
+
const userDir = resolveUserDir(opts, workspaceRoot);
|
|
2728
2740
|
const projectDir = projectSkillsDir(workspaceRoot);
|
|
2729
2741
|
const feedCollections = await collectFromDir(feedsRoot(workspaceRoot), "feed", workspaceRoot);
|
|
2730
|
-
const userCollections = await collectFromDir(userDir, "user", workspaceRoot);
|
|
2742
|
+
const userCollections = userDir === null ? [] : await collectFromDir(userDir, "user", workspaceRoot);
|
|
2731
2743
|
const projectCollections = await collectFromDir(projectDir, "project", workspaceRoot);
|
|
2732
2744
|
const merged = /* @__PURE__ */ new Map();
|
|
2733
2745
|
for (const entry of feedCollections) merged.set(entry.slug, entry);
|
|
@@ -2741,10 +2753,10 @@ async function loadCollection(slug, opts = {}) {
|
|
|
2741
2753
|
const safeName = safeSlugName(slug);
|
|
2742
2754
|
if (safeName === null) return null;
|
|
2743
2755
|
const workspaceRoot = opts.workspaceRoot ?? getWorkspaceRoot();
|
|
2744
|
-
const userDir = opts
|
|
2756
|
+
const userDir = resolveUserDir(opts, workspaceRoot);
|
|
2745
2757
|
const projectCollection = await loadOneCollection(projectSkillsDir(workspaceRoot), safeName, "project", workspaceRoot);
|
|
2746
2758
|
if (projectCollection) return projectCollection;
|
|
2747
|
-
const userCollection = await loadOneCollection(userDir, safeName, "user", workspaceRoot);
|
|
2759
|
+
const userCollection = userDir === null ? null : await loadOneCollection(userDir, safeName, "user", workspaceRoot);
|
|
2748
2760
|
if (userCollection) return userCollection;
|
|
2749
2761
|
return loadOneCollection(feedsRoot(workspaceRoot), safeName, "feed", workspaceRoot);
|
|
2750
2762
|
}
|
|
@@ -2766,4 +2778,4 @@ function toDetail(collection) {
|
|
|
2766
2778
|
//#endregion
|
|
2767
2779
|
export { projectSkillsDir as $, deleteItem as A, resolveDataDir as B, compileCsvQuery as C, MAX_QUERY_ROWS as D, DEFAULT_QUERY_ROWS as E, resolveCreateItemId as F, archiveDir as G, safeRecordId as H, writeItem as I, configureCollectionHost as J, collectionChangePayload as K, SCHEMA_FILE as L, isRegularFile as M, listItems as N, BackendUnavailableError as O, readItem as P, peekWorkspaceRoot as Q, isContainedInRoot as R, queryCsv as S, CollectionQueryZ as T, safeSlugName as U, resolveTemplatePath as V, COLLECTION_ROOT_REQUIRED as W, isPresetSlug as X, getWorkspaceRoot as Y, log as Z, csvRowToItem as _, toDetail as a, createHostSlot as at, encodeCsvRecordId as b, resolveMutateSet as c, storeFor as d, publishCollectionChange as et, checkpointSqliteDatabase as f, cacheDir as g, MAX_CSV_ROWS as h, resolvePrimaryField as i, createForwardingLogger as it, generateItemId as j, isBackendUnavailable as k, collectionWritable as l, projectItemFields as m, discoverCollections as n, skillsStagingDir as nt, toSummary as o, pageFromFullRead as p, collectionsRegistriesConfigPath as q, loadCollection as r, stagingSkillDir as rt, CollectionSchemaZ as s, acceptParsedSchema as t, setCollectionChangePublisher as tt, readOnlyRefusal as u, decodeCsvRecordId as v, compileJsonlQuery as w, normalizeCsvValue as x, dedupeByRecordId as y, itemFilePath as z };
|
|
2768
2780
|
|
|
2769
|
-
//# sourceMappingURL=discovery-
|
|
2781
|
+
//# sourceMappingURL=discovery-D7LCN8gJ.js.map
|