@sodiumhq/mcp-pm 0.1.0-beta.5443 → 0.1.0-beta.5475
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/http.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-CEXQpQbI.mjs → src-BHlMOYGv.mjs} +10 -2
- package/package.json +1 -1
package/dist/http.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as buildServer } from "./src-
|
|
2
|
+
import { t as buildServer } from "./src-BHlMOYGv.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { SUPPORTED_PROTOCOL_VERSIONS, createMcpHandler } from "@modelcontextprotocol/server";
|
|
5
5
|
import { createHash, randomUUID } from "node:crypto";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as buildServer } from "./src-
|
|
2
|
+
import { t as buildServer } from "./src-BHlMOYGv.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
5
5
|
import { parseArgs } from "node:util";
|
|
@@ -6819,7 +6819,8 @@ const ListTimeEntriesInputSchema = {
|
|
|
6819
6819
|
fromDate: z.string().optional().describe("Window start (YYYY-MM-DD), inclusive. Use with dateRange='CustomDateRange'."),
|
|
6820
6820
|
toDate: z.string().optional().describe("Window end (YYYY-MM-DD), inclusive. Use with dateRange='CustomDateRange'."),
|
|
6821
6821
|
isBillable: z.boolean().optional().describe("Filter by billable flag. true for 'billable time only', false for internal/non-chargeable time."),
|
|
6822
|
-
isBilled: z.boolean().optional().describe("Filter by whether the entry has
|
|
6822
|
+
isBilled: z.boolean().optional().describe("Filter by whether the entry has been billed on at least one billing line (a part-settled entry counts as billed)."),
|
|
6823
|
+
hasOpenWip: z.boolean().optional().describe("Filter by whether the entry still has WIP left to bill or write off. isBillable=true + hasOpenWip=true answers 'what unbilled time do we have?' — the WIP question, including part-settled entries."),
|
|
6823
6824
|
search: z.string().min(3, "Search must be at least 3 characters when provided").optional().describe("Search across description, client name, and task name. Minimum 3 characters."),
|
|
6824
6825
|
sortBy: sortByEnum$9.optional().describe("Field to sort by. Defaults to EntryDate. Use DurationMinutes + sortDesc=true for the biggest entries."),
|
|
6825
6826
|
sortDesc: z.boolean().optional().describe("Sort in descending order. Defaults to ascending — pass true with EntryDate for newest first."),
|
|
@@ -6832,11 +6833,18 @@ function fmtMinutes$4(minutes) {
|
|
|
6832
6833
|
const m = minutes % 60;
|
|
6833
6834
|
return h > 0 ? `${h}h${m ? ` ${m}m` : ""}` : `${m}m`;
|
|
6834
6835
|
}
|
|
6836
|
+
function settlementLabel(e, practice) {
|
|
6837
|
+
switch (e.settlementState) {
|
|
6838
|
+
case "PartSettled": return `part-settled, ${money(e.openWip ?? 0, practice)} open`;
|
|
6839
|
+
case "Settled": return (e.billedAmount ?? 0) > 0 ? "billed" : "written off";
|
|
6840
|
+
default: return "unbilled";
|
|
6841
|
+
}
|
|
6842
|
+
}
|
|
6835
6843
|
function formatEntry(e, practice) {
|
|
6836
6844
|
const who = e.user?.name ? ` · ${e.user.name}` : "";
|
|
6837
6845
|
const client = e.client?.name ? ` · ${e.client.name}` : "";
|
|
6838
6846
|
const task = e.taskItem?.name ? ` · task: ${e.taskItem.name}` : "";
|
|
6839
|
-
const billable = e.isBillable ?
|
|
6847
|
+
const billable = e.isBillable ? ` · billable (${settlementLabel(e, practice)})` : " · non-billable";
|
|
6840
6848
|
const rate = e.isBillable && e.hourlyRate != null ? ` @ ${money(e.hourlyRate, practice)}/h` : "";
|
|
6841
6849
|
const desc = e.description ? `\n ${e.description.length > 150 ? `${e.description.slice(0, 150)}…` : e.description}` : "";
|
|
6842
6850
|
return `- ${e.entryDate ?? "?"} · ${fmtMinutes$4(e.durationMinutes)}${who}${client}${task}${billable}${rate} (${e.code ?? "no code"})${desc}`;
|