@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
|
@@ -107,8 +107,12 @@ function getWorkspaceRoot() {
|
|
|
107
107
|
function peekWorkspaceRoot() {
|
|
108
108
|
return hostSlot.peek()?.workspaceRoot ?? null;
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
/** The user-scope skills dir for a root, or `null` when it has none. The one
|
|
111
|
+
* place the pre-3.3.0 `string` binding is normalized, so nothing downstream
|
|
112
|
+
* has to know the host might not have upgraded its shape yet. */
|
|
113
|
+
function userSkillsDir(workspaceRoot) {
|
|
114
|
+
const binding = requireHost().paths.userSkillsDir;
|
|
115
|
+
return typeof binding === "string" ? binding : binding(workspaceRoot);
|
|
112
116
|
}
|
|
113
117
|
function projectSkillsDir(workspaceRoot) {
|
|
114
118
|
return requireHost().paths.projectSkillsDir(workspaceRoot);
|
|
@@ -2718,6 +2722,14 @@ async function collectFromDir(skillsRoot, source, workspaceRoot) {
|
|
|
2718
2722
|
}
|
|
2719
2723
|
return results;
|
|
2720
2724
|
}
|
|
2725
|
+
/** The user-scope dir this call should scan, or `null` for none. The single
|
|
2726
|
+
* place the "explicit override beats the host binding, and either may say
|
|
2727
|
+
* none" rule is spelled — `??` cannot express it, because `undefined` there
|
|
2728
|
+
* means "ask the host" and would silently re-enable a scope the caller
|
|
2729
|
+
* passed `null` to switch off. */
|
|
2730
|
+
function resolveUserDir(opts, workspaceRoot) {
|
|
2731
|
+
return opts.userSkillsDir !== void 0 ? opts.userSkillsDir : userSkillsDir(workspaceRoot);
|
|
2732
|
+
}
|
|
2721
2733
|
/** Discover every schema-driven collection available to this
|
|
2722
2734
|
* workspace. Project-scope collections override user-scope on slug
|
|
2723
2735
|
* collision. The `workspaceRoot` override also flows into each
|
|
@@ -2727,10 +2739,10 @@ async function collectFromDir(skillsRoot, source, workspaceRoot) {
|
|
|
2727
2739
|
* regardless of override). */
|
|
2728
2740
|
async function discoverCollections(opts = {}) {
|
|
2729
2741
|
const workspaceRoot = opts.workspaceRoot ?? getWorkspaceRoot();
|
|
2730
|
-
const userDir = opts
|
|
2742
|
+
const userDir = resolveUserDir(opts, workspaceRoot);
|
|
2731
2743
|
const projectDir = projectSkillsDir(workspaceRoot);
|
|
2732
2744
|
const feedCollections = await collectFromDir(feedsRoot(workspaceRoot), "feed", workspaceRoot);
|
|
2733
|
-
const userCollections = await collectFromDir(userDir, "user", workspaceRoot);
|
|
2745
|
+
const userCollections = userDir === null ? [] : await collectFromDir(userDir, "user", workspaceRoot);
|
|
2734
2746
|
const projectCollections = await collectFromDir(projectDir, "project", workspaceRoot);
|
|
2735
2747
|
const merged = /* @__PURE__ */ new Map();
|
|
2736
2748
|
for (const entry of feedCollections) merged.set(entry.slug, entry);
|
|
@@ -2744,10 +2756,10 @@ async function loadCollection(slug, opts = {}) {
|
|
|
2744
2756
|
const safeName = safeSlugName(slug);
|
|
2745
2757
|
if (safeName === null) return null;
|
|
2746
2758
|
const workspaceRoot = opts.workspaceRoot ?? getWorkspaceRoot();
|
|
2747
|
-
const userDir = opts
|
|
2759
|
+
const userDir = resolveUserDir(opts, workspaceRoot);
|
|
2748
2760
|
const projectCollection = await loadOneCollection(projectSkillsDir(workspaceRoot), safeName, "project", workspaceRoot);
|
|
2749
2761
|
if (projectCollection) return projectCollection;
|
|
2750
|
-
const userCollection = await loadOneCollection(userDir, safeName, "user", workspaceRoot);
|
|
2762
|
+
const userCollection = userDir === null ? null : await loadOneCollection(userDir, safeName, "user", workspaceRoot);
|
|
2751
2763
|
if (userCollection) return userCollection;
|
|
2752
2764
|
return loadOneCollection(feedsRoot(workspaceRoot), safeName, "feed", workspaceRoot);
|
|
2753
2765
|
}
|
|
@@ -3122,4 +3134,4 @@ Object.defineProperty(exports, "writeItem", {
|
|
|
3122
3134
|
}
|
|
3123
3135
|
});
|
|
3124
3136
|
|
|
3125
|
-
//# sourceMappingURL=discovery-
|
|
3137
|
+
//# sourceMappingURL=discovery-CrA_EqUJ.cjs.map
|