@mulmoclaude/core 1.2.1 → 1.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/README.md +49 -0
- package/assets/helps/google-calendar-collection.md +13 -2
- package/assets/helps/google.md +94 -0
- package/assets/helps/index.md +1 -0
- package/dist/collection/registry/server/index.cjs +3 -2
- package/dist/collection/registry/server/index.cjs.map +1 -1
- package/dist/collection/registry/server/index.js +3 -2
- package/dist/collection/registry/server/index.js.map +1 -1
- package/dist/collection/server/index.cjs +1 -1
- package/dist/collection/server/index.js +1 -1
- package/dist/collection-watchers/index.cjs +1 -1
- package/dist/collection-watchers/index.js +1 -1
- package/dist/feeds/server/index.cjs +2 -2
- package/dist/feeds/server/index.js +2 -2
- package/dist/files/index.cjs +3 -0
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.d.ts +1 -0
- package/dist/files/index.js +2 -1
- package/dist/files/index.js.map +1 -1
- package/dist/files/relPath.d.ts +23 -0
- package/dist/google/calendar.d.ts +28 -0
- package/dist/google/collectionSync.d.ts +88 -4
- package/dist/google/index.cjs +235 -17
- package/dist/google/index.cjs.map +1 -1
- package/dist/google/index.d.ts +3 -3
- package/dist/google/index.js +223 -18
- package/dist/google/index.js.map +1 -1
- package/dist/google/tasks.d.ts +21 -0
- package/dist/relPath-CgGi4-Nv.cjs +46 -0
- package/dist/relPath-CgGi4-Nv.cjs.map +1 -0
- package/dist/relPath-DW8MC8VO.js +33 -0
- package/dist/relPath-DW8MC8VO.js.map +1 -0
- package/dist/{server-BZJCw2HU.js → server-D_6FLygK.js} +6 -2
- package/dist/server-D_6FLygK.js.map +1 -0
- package/dist/{server-w5ZZRLju.cjs → server-gEOeV_Nv.cjs} +6 -2
- package/dist/server-gEOeV_Nv.cjs.map +1 -0
- package/package.json +10 -1
- package/dist/server-BZJCw2HU.js.map +0 -1
- package/dist/server-w5ZZRLju.cjs.map +0 -1
package/dist/google/tasks.d.ts
CHANGED
|
@@ -26,10 +26,31 @@ export interface CompleteTaskInput {
|
|
|
26
26
|
taskId: string;
|
|
27
27
|
taskListId?: string;
|
|
28
28
|
}
|
|
29
|
+
export interface UpdateTaskInput {
|
|
30
|
+
taskId: string;
|
|
31
|
+
title?: string;
|
|
32
|
+
/** `""` clears the notes; omit to leave them untouched. */
|
|
33
|
+
notes?: string;
|
|
34
|
+
/** RFC3339. Same DATE-only caveat as `CreateTaskInput.due`. Google rejects
|
|
35
|
+
* `""`, so a due date can be changed but not removed through this call. */
|
|
36
|
+
due?: string;
|
|
37
|
+
taskListId?: string;
|
|
38
|
+
}
|
|
29
39
|
export declare const toTaskListSummary: (value: unknown) => TaskListSummary;
|
|
30
40
|
export declare const toTaskSummary: (value: unknown) => TaskSummary;
|
|
41
|
+
/** Resolve a declared taskListId to the one the API addresses. `||` (not `??`)
|
|
42
|
+
* so a blank string also falls back instead of building a malformed
|
|
43
|
+
* `/lists//tasks` URL — the same rule, and the same reason, as
|
|
44
|
+
* `canonicalCalendarId`. */
|
|
45
|
+
export declare const canonicalTaskListId: (taskListId: string | undefined) => string;
|
|
31
46
|
export declare function listTaskLists(accessToken: string): Promise<TaskListSummary[]>;
|
|
32
47
|
export declare function listTasks(accessToken: string, input?: ListTasksInput): Promise<TaskSummary[]>;
|
|
33
48
|
export declare function createTask(accessToken: string, input: CreateTaskInput): Promise<TaskSummary>;
|
|
49
|
+
/** PATCH body for a task edit — only the fields the caller supplied. As with
|
|
50
|
+
* events, `undefined` means "leave as is" and `""` means "clear it", so the
|
|
51
|
+
* two must stay distinct. `status` is deliberately absent: `completeTask`
|
|
52
|
+
* owns that transition, and two ways to set it would drift apart. */
|
|
53
|
+
export declare const buildTaskPatch: (input: UpdateTaskInput) => Record<string, unknown>;
|
|
54
|
+
export declare function updateTask(accessToken: string, input: UpdateTaskInput): Promise<TaskSummary>;
|
|
34
55
|
export declare function completeTask(accessToken: string, input: CompleteTaskInput): Promise<TaskSummary>;
|
|
35
56
|
export declare function deleteTask(accessToken: string, input: CompleteTaskInput): Promise<void>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
|
|
2
|
+
let node_path = require("node:path");
|
|
3
|
+
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
4
|
+
//#region src/files/relPath.ts
|
|
5
|
+
/** Convert a host-shaped workspace-relative path to the POSIX form.
|
|
6
|
+
*
|
|
7
|
+
* Splits on the host separator rather than rewriting every `\` — on POSIX a
|
|
8
|
+
* backslash is a legal filename character, so a blanket replace would turn the
|
|
9
|
+
* single directory `we\ird` into the two segments `we/ird` and send the write
|
|
10
|
+
* somewhere else. Splitting on `path.sep` is a no-op on POSIX and correct on
|
|
11
|
+
* Windows.
|
|
12
|
+
*
|
|
13
|
+
* `sep` is a parameter so the Windows rule is assertable from a POSIX runner:
|
|
14
|
+
* bound to the host's own separator, the whole rule is invisible outside
|
|
15
|
+
* Windows CI, which is how the backslash form reached main twice (#2540).
|
|
16
|
+
*
|
|
17
|
+
* Separator shape only — it neither validates nor contains. A traversal or a
|
|
18
|
+
* drive-absolute input survives as one, deliberately, so `resolveWithinRoot`
|
|
19
|
+
* downstream can still see the escape it has to refuse. */
|
|
20
|
+
function toPosixRelPath(hostRelPath, sep = node_path.default.sep) {
|
|
21
|
+
return hostRelPath.split(sep).join("/");
|
|
22
|
+
}
|
|
23
|
+
/** Append a single path segment to a POSIX workspace-relative path.
|
|
24
|
+
*
|
|
25
|
+
* Separate from `toPosixRelPath` because the inputs differ: this one joins
|
|
26
|
+
* segments that are ALREADY POSIX-shaped (a parent rel path plus one
|
|
27
|
+
* `Dirent.name`), so it must not touch the characters inside them. Use
|
|
28
|
+
* `toPosixRelPath` first when the parent came out of `node:path`. */
|
|
29
|
+
function joinPosixRelPath(dirRelPosix, segment) {
|
|
30
|
+
return node_path.default.posix.join(dirRelPosix, segment);
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
Object.defineProperty(exports, "joinPosixRelPath", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function() {
|
|
36
|
+
return joinPosixRelPath;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "toPosixRelPath", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function() {
|
|
42
|
+
return toPosixRelPath;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=relPath-CgGi4-Nv.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relPath-CgGi4-Nv.cjs","names":[],"sources":["../src/files/relPath.ts"],"sourcesContent":["// Workspace-relative paths are a POSIX contract (#2542). Every surface that\n// carries one — the Files tree, the upload response, the `file:` pubsub\n// channel, `<collection_paths>` in the agent prompt, export manifests, wiki\n// link hrefs — is `/`-separated on every host. Only the host filesystem layer\n// speaks `path.sep`.\n//\n// `node:path` produces host-shaped strings: `path.relative` / `path.join`\n// return `sub\\dir` on Windows. Anything derived from them has to cross back to\n// the POSIX contract before it leaves the filesystem layer, and this is where\n// that conversion is defined.\n\nimport path from \"node:path\";\n\n/** Convert a host-shaped workspace-relative path to the POSIX form.\n *\n * Splits on the host separator rather than rewriting every `\\` — on POSIX a\n * backslash is a legal filename character, so a blanket replace would turn the\n * single directory `we\\ird` into the two segments `we/ird` and send the write\n * somewhere else. Splitting on `path.sep` is a no-op on POSIX and correct on\n * Windows.\n *\n * `sep` is a parameter so the Windows rule is assertable from a POSIX runner:\n * bound to the host's own separator, the whole rule is invisible outside\n * Windows CI, which is how the backslash form reached main twice (#2540).\n *\n * Separator shape only — it neither validates nor contains. A traversal or a\n * drive-absolute input survives as one, deliberately, so `resolveWithinRoot`\n * downstream can still see the escape it has to refuse. */\nexport function toPosixRelPath(hostRelPath: string, sep: string = path.sep): string {\n return hostRelPath.split(sep).join(\"/\");\n}\n\n/** Append a single path segment to a POSIX workspace-relative path.\n *\n * Separate from `toPosixRelPath` because the inputs differ: this one joins\n * segments that are ALREADY POSIX-shaped (a parent rel path plus one\n * `Dirent.name`), so it must not touch the characters inside them. Use\n * `toPosixRelPath` first when the parent came out of `node:path`. */\nexport function joinPosixRelPath(dirRelPosix: string, segment: string): string {\n return path.posix.join(dirRelPosix, segment);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA4BA,SAAgB,eAAe,aAAqB,MAAc,UAAA,QAAK,KAAa;CAClF,OAAO,YAAY,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG;AACxC;;;;;;;AAQA,SAAgB,iBAAiB,aAAqB,SAAyB;CAC7E,OAAO,UAAA,QAAK,MAAM,KAAK,aAAa,OAAO;AAC7C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
//#region src/files/relPath.ts
|
|
3
|
+
/** Convert a host-shaped workspace-relative path to the POSIX form.
|
|
4
|
+
*
|
|
5
|
+
* Splits on the host separator rather than rewriting every `\` — on POSIX a
|
|
6
|
+
* backslash is a legal filename character, so a blanket replace would turn the
|
|
7
|
+
* single directory `we\ird` into the two segments `we/ird` and send the write
|
|
8
|
+
* somewhere else. Splitting on `path.sep` is a no-op on POSIX and correct on
|
|
9
|
+
* Windows.
|
|
10
|
+
*
|
|
11
|
+
* `sep` is a parameter so the Windows rule is assertable from a POSIX runner:
|
|
12
|
+
* bound to the host's own separator, the whole rule is invisible outside
|
|
13
|
+
* Windows CI, which is how the backslash form reached main twice (#2540).
|
|
14
|
+
*
|
|
15
|
+
* Separator shape only — it neither validates nor contains. A traversal or a
|
|
16
|
+
* drive-absolute input survives as one, deliberately, so `resolveWithinRoot`
|
|
17
|
+
* downstream can still see the escape it has to refuse. */
|
|
18
|
+
function toPosixRelPath(hostRelPath, sep = path.sep) {
|
|
19
|
+
return hostRelPath.split(sep).join("/");
|
|
20
|
+
}
|
|
21
|
+
/** Append a single path segment to a POSIX workspace-relative path.
|
|
22
|
+
*
|
|
23
|
+
* Separate from `toPosixRelPath` because the inputs differ: this one joins
|
|
24
|
+
* segments that are ALREADY POSIX-shaped (a parent rel path plus one
|
|
25
|
+
* `Dirent.name`), so it must not touch the characters inside them. Use
|
|
26
|
+
* `toPosixRelPath` first when the parent came out of `node:path`. */
|
|
27
|
+
function joinPosixRelPath(dirRelPosix, segment) {
|
|
28
|
+
return path.posix.join(dirRelPosix, segment);
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { toPosixRelPath as n, joinPosixRelPath as t };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=relPath-DW8MC8VO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relPath-DW8MC8VO.js","names":[],"sources":["../src/files/relPath.ts"],"sourcesContent":["// Workspace-relative paths are a POSIX contract (#2542). Every surface that\n// carries one — the Files tree, the upload response, the `file:` pubsub\n// channel, `<collection_paths>` in the agent prompt, export manifests, wiki\n// link hrefs — is `/`-separated on every host. Only the host filesystem layer\n// speaks `path.sep`.\n//\n// `node:path` produces host-shaped strings: `path.relative` / `path.join`\n// return `sub\\dir` on Windows. Anything derived from them has to cross back to\n// the POSIX contract before it leaves the filesystem layer, and this is where\n// that conversion is defined.\n\nimport path from \"node:path\";\n\n/** Convert a host-shaped workspace-relative path to the POSIX form.\n *\n * Splits on the host separator rather than rewriting every `\\` — on POSIX a\n * backslash is a legal filename character, so a blanket replace would turn the\n * single directory `we\\ird` into the two segments `we/ird` and send the write\n * somewhere else. Splitting on `path.sep` is a no-op on POSIX and correct on\n * Windows.\n *\n * `sep` is a parameter so the Windows rule is assertable from a POSIX runner:\n * bound to the host's own separator, the whole rule is invisible outside\n * Windows CI, which is how the backslash form reached main twice (#2540).\n *\n * Separator shape only — it neither validates nor contains. A traversal or a\n * drive-absolute input survives as one, deliberately, so `resolveWithinRoot`\n * downstream can still see the escape it has to refuse. */\nexport function toPosixRelPath(hostRelPath: string, sep: string = path.sep): string {\n return hostRelPath.split(sep).join(\"/\");\n}\n\n/** Append a single path segment to a POSIX workspace-relative path.\n *\n * Separate from `toPosixRelPath` because the inputs differ: this one joins\n * segments that are ALREADY POSIX-shaped (a parent rel path plus one\n * `Dirent.name`), so it must not touch the characters inside them. Use\n * `toPosixRelPath` first when the parent came out of `node:path`. */\nexport function joinPosixRelPath(dirRelPosix: string, segment: string): string {\n return path.posix.join(dirRelPosix, segment);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,SAAgB,eAAe,aAAqB,MAAc,KAAK,KAAa;CAClF,OAAO,YAAY,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG;AACxC;;;;;;;AAQA,SAAgB,iBAAiB,aAAqB,SAAyB;CAC7E,OAAO,KAAK,MAAM,KAAK,aAAa,OAAO;AAC7C"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { t as errorMessage } from "./dist-Cwk0e12G.js";
|
|
2
2
|
import { t as writeFileAtomic } from "./atomic-DPpdrJzO.js";
|
|
3
|
+
import { n as toPosixRelPath } from "./relPath-DW8MC8VO.js";
|
|
3
4
|
import { c as COMPUTED_TYPES, d as embedTargetId, f as isFieldDrivenEvery, g as fieldTextOrNull, h as fieldText, m as storageKindFor } from "./ids-s4GfmE93.js";
|
|
4
5
|
import { A as uniqueEmbedTargets, E as itemIsDone, F as rollupValue, L as actionVisible, M as backlinkRows, N as coerceNumeric, P as projectBacklinkRow, S as selectDynamicRecord, b as firstDateField, d as parseIsoDateTime, g as deriveAll, j as uniqueRefTargets, k as uniqueBacklinkSources, t as defangForPrompt, u as parseIsoDate, v as ownProp, x as resolveIcon } from "./promptSafety-CQ5Un4wi.js";
|
|
5
6
|
import { $ as skillsStagingDir, F as resolveCreateItemId, G as archiveDir, H as resolveTemplatePath, J as getWorkspaceRoot, L as SCHEMA_FILE$1, M as isRegularFile, R as isContainedInRoot, S as queryCsv, T as CollectionQueryZ, V as resolveDataDir, W as safeSlugName, X as log, Y as isPresetSlug$1, c as resolveMutateSet, d as storeFor, f as checkpointSqliteDatabase, g as cacheDir, i as resolvePrimaryField, k as isBackendUnavailable, n as discoverCollections, r as loadCollection, s as CollectionSchemaZ, u as readOnlyRefusal, w as compileJsonlQuery, x as normalizeCsvValue } from "./discovery-CKR4TOX3.js";
|
|
7
|
+
import { ingestStatePath } from "./feeds/paths.js";
|
|
6
8
|
import { dataSkillDir, mirrorSkillWrite } from "./skill-bridge/index.js";
|
|
7
9
|
import path from "node:path";
|
|
8
10
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
@@ -136,7 +138,7 @@ function sanitizeDeep(value) {
|
|
|
136
138
|
* collections, so it reflects what the host actually reads/writes. */
|
|
137
139
|
function promptPathsFor(collection, workspaceRoot) {
|
|
138
140
|
const rel = path.relative(workspaceRoot, collection.skillDir);
|
|
139
|
-
const skillDir = (rel === "" || rel.startsWith("..") ? collection.skillDir : rel)
|
|
141
|
+
const skillDir = toPosixRelPath(rel === "" || rel.startsWith("..") ? collection.skillDir : rel);
|
|
140
142
|
return {
|
|
141
143
|
slug: collection.slug,
|
|
142
144
|
dataPath: collection.schema.dataPath ?? collection.schema.dataSource?.path ?? "",
|
|
@@ -1042,6 +1044,7 @@ function deleteTargets(collection, workspaceRoot) {
|
|
|
1042
1044
|
stagingSkillDir(workspaceRoot, collection.slug),
|
|
1043
1045
|
collection.skillDir,
|
|
1044
1046
|
collection.dataDir,
|
|
1047
|
+
ingestStatePath(collection.slug, workspaceRoot),
|
|
1045
1048
|
...collection.storageFile !== void 0 ? [collection.storageFile] : []
|
|
1046
1049
|
];
|
|
1047
1050
|
}
|
|
@@ -1154,6 +1157,7 @@ async function removeLocations(collection, workspaceRoot) {
|
|
|
1154
1157
|
force: true
|
|
1155
1158
|
});
|
|
1156
1159
|
await rmdir(path.dirname(collection.dataDir)).catch(() => void 0);
|
|
1160
|
+
await rm(ingestStatePath(collection.slug, workspaceRoot), { force: true });
|
|
1157
1161
|
if (collection.storageFile !== void 0) {
|
|
1158
1162
|
await rm(collection.storageFile, { force: true });
|
|
1159
1163
|
await rm(`${collection.storageFile}-wal`, { force: true });
|
|
@@ -1924,4 +1928,4 @@ function makeManageCollectionTool(deps = {}) {
|
|
|
1924
1928
|
//#endregion
|
|
1925
1929
|
export { buildCollectionActionSeedPrompt as A, validateRecordObject as C, enrichItems as D, runCollectionQuery as E, readCustomViewHtml as M, readCustomViewI18n as N, runQueryOverRows as O, readSkillTemplate as P, validateCollectionRecords as S, recordFieldProblem as T, computeCollectionIcon as _, deleteCollection as a, applyMutateAction as b, computeSuccessor as c, isTriggerDue as d, maybeSpawnSuccessor as f, ONE_SECOND_MS as g, successorId as h, deleteCustomView as i, promptPathsFor as j, buildActionSeedPrompt as k, daysInMonth as l, resolveEvery as m, MAX_UNSELECTIVE_ITEMS as n, deleteCollectionRefusalMessage as o, parseCivil as p, makeManageCollectionTool as r, advanceTriggerDate as s, MAX_SCHEMA_ISSUES as t, formatCivil as u, buildWorkspaceOntology as v, compileRecordZ as w, firstMutateParamProblem as x, schemaRelations as y };
|
|
1926
1930
|
|
|
1927
|
-
//# sourceMappingURL=server-
|
|
1931
|
+
//# sourceMappingURL=server-D_6FLygK.js.map
|