@mulmoclaude/core 5.6.1 → 5.7.1
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 +22 -0
- package/assets/helps/google-calendar-collection.md +8 -3
- package/dist/collection/core/calendarGrid.d.ts +24 -2
- package/dist/collection/index.cjs +5 -2
- package/dist/collection/index.js +3 -3
- package/dist/collection/registry/server/index.cjs +2 -2
- package/dist/collection/registry/server/index.js +2 -2
- package/dist/collection/server/index.cjs +3 -3
- package/dist/collection/server/index.js +3 -3
- package/dist/collection/server/schemaReadReply.d.ts +4 -0
- package/dist/collection-watchers/index.cjs +4 -4
- package/dist/collection-watchers/index.js +4 -4
- package/dist/{discovery-B79IxEM6.cjs → discovery-CwBXvtyn.cjs} +2 -2
- package/dist/{discovery-B79IxEM6.cjs.map → discovery-CwBXvtyn.cjs.map} +1 -1
- package/dist/{discovery-DIGau7M8.js → discovery-XoYJI2Ot.js} +2 -2
- package/dist/{discovery-DIGau7M8.js.map → discovery-XoYJI2Ot.js.map} +1 -1
- package/dist/feeds/index.cjs +2 -2
- package/dist/feeds/index.js +2 -2
- package/dist/feeds/server/index.cjs +4 -4
- package/dist/feeds/server/index.js +4 -4
- package/dist/google/index.cjs +2 -2
- package/dist/google/index.js +2 -2
- package/dist/{ingestTypes-GkG7bJdB.js → ingestTypes-Bs31Xt5c.js} +2 -2
- package/dist/{ingestTypes-GkG7bJdB.js.map → ingestTypes-Bs31Xt5c.js.map} +1 -1
- package/dist/{ingestTypes-DsVH9BYy.cjs → ingestTypes-DS9HiR2I.cjs} +2 -2
- package/dist/{ingestTypes-DsVH9BYy.cjs.map → ingestTypes-DS9HiR2I.cjs.map} +1 -1
- package/dist/{itemId-4P9S_ehz.js → itemId-C9s-Jd5s.js} +58 -23
- package/dist/{itemId-4P9S_ehz.js.map → itemId-C9s-Jd5s.js.map} +1 -1
- package/dist/{itemId-CGT2J7YK.cjs → itemId-CVrNibwT.cjs} +75 -22
- package/dist/{itemId-CGT2J7YK.cjs.map → itemId-CVrNibwT.cjs.map} +1 -1
- package/dist/{promptSafety-BpBTh5xO.js → promptSafety-B5uGroik.js} +2 -2
- package/dist/{promptSafety-BpBTh5xO.js.map → promptSafety-B5uGroik.js.map} +1 -1
- package/dist/{promptSafety-caJWd1ZQ.cjs → promptSafety-BGV1wrE6.cjs} +2 -2
- package/dist/{promptSafety-caJWd1ZQ.cjs.map → promptSafety-BGV1wrE6.cjs.map} +1 -1
- package/dist/{server-DZdM2cLD.cjs → server-CLhww8NL.cjs} +40 -11
- package/dist/server-CLhww8NL.cjs.map +1 -0
- package/dist/{server--34TYvGP.js → server-CTkTHqEL.js} +40 -11
- package/dist/server-CTkTHqEL.js.map +1 -0
- package/package.json +1 -1
- package/dist/server--34TYvGP.js.map +0 -1
- package/dist/server-DZdM2cLD.cjs.map +0 -1
|
@@ -2,9 +2,9 @@ import { a as isErrorWithCode, c as isStringArray, l as isUnknownArray, s as isR
|
|
|
2
2
|
import "./errors-C7TI_t_4.js";
|
|
3
3
|
import { n as writeFileAtomic } from "./root-BcS4-Kge.js";
|
|
4
4
|
import { n as toPosixRelPath } from "./relPath-DW8MC8VO.js";
|
|
5
|
-
import {
|
|
6
|
-
import { C as actionVisible, O as firstUnknownDefault, _ as uniqueRefTargets, b as projectBacklinkRow, c as selectDynamicRecord, f as itemIsDone, g as uniqueEmbedTargets, h as uniqueBacklinkSources, i as ownProp, k as schemaDefaults, n as deriveAll, o as firstDateField, s as resolveIcon, t as defangForPrompt, v as backlinkRows, x as rollupValue, y as coerceNumeric } from "./promptSafety-
|
|
7
|
-
import { B as SCHEMA_FILE$1, C as CollectionQueryZ, G as resolveTemplatePath, H as isUnderRealRoot, O as isRegularFile, S as compileJsonlQuery, V as isContainedInRoot, W as resolveDataDir, Y as isBackendUnavailable, Z as archiveDir, at as isPresetSlug$1, b as queryCsv, c as resolveMutateSet, d as storeFor, f as checkpointSqliteDatabase, gt as stagingSkillDir, i as resolvePrimaryField, j as resolveCreateItemId, m as cacheDir, n as discoverCollections, q as safeSlugName, r as loadCollection, rt as getWorkspaceRoot, s as CollectionSchemaZ, st as log, u as readOnlyRefusal, y as normalizeCsvValue } from "./discovery-
|
|
5
|
+
import { $ as fieldText, D as isCanonicalServerTime, K as COMPUTED_TYPES, Q as storageKindFor, X as isFieldDrivenEvery, Y as embedTargetId, et as fieldTextOrNull, f as parseIsoDate, p as parseIsoDateTime } from "./itemId-C9s-Jd5s.js";
|
|
6
|
+
import { C as actionVisible, O as firstUnknownDefault, _ as uniqueRefTargets, b as projectBacklinkRow, c as selectDynamicRecord, f as itemIsDone, g as uniqueEmbedTargets, h as uniqueBacklinkSources, i as ownProp, k as schemaDefaults, n as deriveAll, o as firstDateField, s as resolveIcon, t as defangForPrompt, v as backlinkRows, x as rollupValue, y as coerceNumeric } from "./promptSafety-B5uGroik.js";
|
|
7
|
+
import { B as SCHEMA_FILE$1, C as CollectionQueryZ, G as resolveTemplatePath, H as isUnderRealRoot, O as isRegularFile, S as compileJsonlQuery, V as isContainedInRoot, W as resolveDataDir, Y as isBackendUnavailable, Z as archiveDir, at as isPresetSlug$1, b as queryCsv, c as resolveMutateSet, d as storeFor, f as checkpointSqliteDatabase, gt as stagingSkillDir, i as resolvePrimaryField, j as resolveCreateItemId, m as cacheDir, n as discoverCollections, q as safeSlugName, r as loadCollection, rt as getWorkspaceRoot, s as CollectionSchemaZ, st as log, u as readOnlyRefusal, y as normalizeCsvValue } from "./discovery-XoYJI2Ot.js";
|
|
8
8
|
import { ingestStatePath } from "./feeds/paths.js";
|
|
9
9
|
import { mirrorSkillWrite } from "./skill-bridge/index.js";
|
|
10
10
|
import { constants } from "node:fs";
|
|
@@ -1603,6 +1603,30 @@ function renderSchemaDocs(rawDoc, topic, variant = "staged") {
|
|
|
1603
1603
|
if (sections.length === 0) return doc;
|
|
1604
1604
|
return clip(requested ? renderTopic(lines, sections, requested) : renderDefault(lines, sections), SCHEMA_DOCS_RESULT_BUDGET);
|
|
1605
1605
|
}
|
|
1606
|
+
//#endregion
|
|
1607
|
+
//#region src/collection/server/schemaReadReply.ts
|
|
1608
|
+
/** The note prefixed when the two copies differ. Kept separate from the JSON by a
|
|
1609
|
+
* blank line so the schema below it is still copyable as-is. */
|
|
1610
|
+
function divergenceNotice(slug) {
|
|
1611
|
+
return [
|
|
1612
|
+
`manageCollection: NOTE — the schema below is data/skills/${slug}/schema.json, and it DIFFERS from .claude/skills/${slug}/schema.json, the copy the server is running.`,
|
|
1613
|
+
"The staging copy was changed without being mirrored (Write / Edit are mirrored; Bash and scripts are not).",
|
|
1614
|
+
`To apply it, pass the JSON below to putSchema. To keep the running schema instead, Read .claude/skills/${slug}/schema.json and putSchema that.`
|
|
1615
|
+
].join("\n");
|
|
1616
|
+
}
|
|
1617
|
+
/** The reply for `getSchema`: the staging copy when there is one, else the active
|
|
1618
|
+
* copy; prefixed with a notice when both exist and differ. `null` when neither
|
|
1619
|
+
* copy could be read. */
|
|
1620
|
+
function schemaReadReply(slug, staging, active) {
|
|
1621
|
+
const primary = staging ?? active;
|
|
1622
|
+
if (primary === null) return null;
|
|
1623
|
+
if (staging === null || active === null || staging === active) return primary;
|
|
1624
|
+
return [
|
|
1625
|
+
divergenceNotice(slug),
|
|
1626
|
+
"",
|
|
1627
|
+
staging
|
|
1628
|
+
].join("\n");
|
|
1629
|
+
}
|
|
1606
1630
|
/** True for a launcher-managed preset slug (`mc-<something>`). The sync logic uses
|
|
1607
1631
|
* this to bound which active skills it may refresh/prune, so user-authored skills are
|
|
1608
1632
|
* never touched. */
|
|
@@ -2220,19 +2244,24 @@ async function handleSchemaDocs(deps, topic) {
|
|
|
2220
2244
|
} catch {}
|
|
2221
2245
|
return `manageCollection: could not read the collection-authoring reference (${SCHEMA_DOCS_FILE}).`;
|
|
2222
2246
|
}
|
|
2247
|
+
async function readTextOrNull(filePath) {
|
|
2248
|
+
try {
|
|
2249
|
+
return await readFile(filePath, "utf-8");
|
|
2250
|
+
} catch {
|
|
2251
|
+
return null;
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2223
2254
|
/** Return the raw schema.json of an existing collection, for editing.
|
|
2224
|
-
*
|
|
2225
|
-
*
|
|
2255
|
+
* A project collection's staging copy (the canonical writable one) first,
|
|
2256
|
+
* else the discovered skill dir's copy. Raw text —
|
|
2226
2257
|
* not the parsed schema — so the agent edits the true on-disk source. */
|
|
2227
2258
|
async function handleGetSchema(slug, deps) {
|
|
2228
2259
|
const collection = await loadCollection(slug, deps);
|
|
2229
2260
|
if (!collection) return unknownCollection(slug);
|
|
2230
2261
|
const { stagingDir } = authoringTarget(deps, collection.slug);
|
|
2231
|
-
const
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
} catch {}
|
|
2235
|
-
return `manageCollection: '${defangForPrompt(slug)}' has no readable ${SCHEMA_FILE}.`;
|
|
2262
|
+
const staging = stagingDir !== null && collection.source === "project" ? await readTextOrNull(path.join(stagingDir, SCHEMA_FILE)) : null;
|
|
2263
|
+
const active = await readTextOrNull(path.join(collection.skillDir, SCHEMA_FILE));
|
|
2264
|
+
return schemaReadReply(collection.slug, staging, active) ?? `manageCollection: '${defangForPrompt(slug)}' has no readable ${SCHEMA_FILE}.`;
|
|
2236
2265
|
}
|
|
2237
2266
|
/** Where the agent should CREATE a collection skill in this root, named in the
|
|
2238
2267
|
* messages that tell it to. Naming `data/skills/` under a root that has no
|
|
@@ -2448,4 +2477,4 @@ function makeManageCollectionTool(deps = {}) {
|
|
|
2448
2477
|
//#endregion
|
|
2449
2478
|
export { recordFieldProblem as A, stagedSkillDir as B, applyMutateAction as C, validateCollectionRecords as D, STORE_UNREADABLE as E, buildCollectionActionSeedPrompt as F, promptPathsFor as I, readCustomViewHtml as L, enrichItems as M, runQueryOverRows as N, validateRecordObject as O, buildActionSeedPrompt as P, readCustomViewI18n as R, schemaRelations as S, MAX_RECORD_ISSUES as T, resolveEvery as _, MAX_UNSELECTIVE_ITEMS as a, computeCollectionIcon as b, deleteCollection as c, computeSuccessor as d, daysInMonth as f, parseCivil as g, maybeSpawnSuccessor as h, MAX_SCHEMA_ISSUES as i, runCollectionQuery as j, compileRecordZ as k, deleteCollectionRefusalMessage as l, isTriggerDue as m, MAX_PUT_ITEMS as n, makeManageCollectionTool as o, formatCivil as p, MAX_PUT_LINT as r, deleteCustomView as s, MAX_ITEMS_FILE_BYTES as t, advanceTriggerDate as u, successorId as v, firstMutateParamProblem as w, buildWorkspaceOntology as x, ONE_SECOND_MS as y, readSkillTemplate as z };
|
|
2450
2479
|
|
|
2451
|
-
//# sourceMappingURL=server
|
|
2480
|
+
//# sourceMappingURL=server-CTkTHqEL.js.map
|