@critical-path/svelte 0.19.0 → 0.19.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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @critical-path/svelte
2
2
 
3
+ ## 0.19.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [da622c9]
8
+ - @critical-path/core@0.52.0
9
+ - @critical-path/mcp@0.20.0
10
+ - @critical-path/client@0.25.2
11
+
3
12
  ## 0.19.0
4
13
 
5
14
  ### Minor Changes
package/dist/index.js CHANGED
@@ -4535,6 +4535,8 @@ var bn = (e, t) => {
4535
4535
  priority: I().describe("urgent, high, medium, low or none"),
4536
4536
  assigneeId: X(I()),
4537
4537
  dueDate: X(I()),
4538
+ deadline: X(I()).describe("Latest acceptable finish, enforced by critical path analysis"),
4539
+ isMilestone: X(R()).describe("A zero-duration checkpoint"),
4538
4540
  estimatedHours: X(L()),
4539
4541
  loggedHours: X(L()),
4540
4542
  isBlocked: X(R())
@@ -4557,7 +4559,7 @@ var bn = (e, t) => {
4557
4559
  projectId: I(),
4558
4560
  title: I(),
4559
4561
  dueDate: X(I())
4560
- }).describe("A deliverable (milestone)"), kn = Y({
4562
+ }).describe("A deliverable"), kn = Y({
4561
4563
  id: I(),
4562
4564
  taskId: I(),
4563
4565
  content: I(),
@@ -4573,20 +4575,24 @@ var bn = (e, t) => {
4573
4575
  }), jn = Y({
4574
4576
  taskId: I(),
4575
4577
  isCritical: R().describe("True when any delay to this task delays the project end"),
4576
- totalSlack: L().describe("Slack in hours; 0 means critical"),
4578
+ totalSlack: L().describe("Slack in hours; 0 means critical, negative means a deadline is missed by that much"),
4577
4579
  slackWorkingHours: X(L()).describe("Slack in working hours on the task calendar"),
4578
4580
  earlyStartDate: X(I()),
4579
4581
  earlyFinishDate: X(I()),
4580
4582
  lateStartDate: X(I()),
4581
4583
  lateFinishDate: X(I()),
4582
4584
  levelingDelayHours: X(L()).describe("With levelling: hours spent waiting for the assignee"),
4583
- waitingOn: X(I()).describe("With levelling: the task this one waited for")
4585
+ waitingOn: X(I()).describe("With levelling: the task this one waited for"),
4586
+ isMilestone: X(R()).describe("True for a milestone"),
4587
+ deadlineDate: X(I()).describe("The task's deadline as an instant"),
4588
+ deadlineVarianceHours: X(L()).describe("Working hours from forecast finish to deadline; negative means it will be missed")
4584
4589
  }), Mn = Y({
4585
4590
  projectId: I(),
4586
4591
  projectStartDate: X(I()),
4587
4592
  projectEndDate: X(I()).describe("Forecast finish date"),
4588
4593
  totalDurationHours: L(),
4589
- criticalTaskIds: z(I()).describe("Tasks with zero slack, in schedule order"),
4594
+ criticalTaskIds: z(I()).describe("Tasks with zero or negative slack, in schedule order"),
4595
+ missedDeadlineTaskIds: X(z(I())).describe("Tasks forecast to finish after their deadline"),
4590
4596
  tasks: z(jn),
4591
4597
  leveled: X(R()),
4592
4598
  unleveledProjectEndDate: X(I()).describe("With levelling: the end date before levelling"),
@@ -4686,7 +4692,7 @@ var bn = (e, t) => {
4686
4692
  {
4687
4693
  name: "analyze-schedule",
4688
4694
  description: "Find what drives a project's end date, how much each task can slip and where people are double-booked, then recommend fixes. Use for \"when will we finish?\", \"what is critical?\" or deadline-risk questions.",
4689
- content: "---\nname: analyze-schedule\ndescription: Find what drives a project's end date, how much each task can slip and where people are double-booked, then recommend fixes. Use for \"when will we finish?\", \"what is critical?\" or deadline-risk questions.\n---\n\n# Analyze the schedule\n\n## 1. Run the schedule\n\n1. Get the `projectId` (`list_projects`).\n2. Call `calculate_critical_path` with `calendars: \"assignee\"` and `levelResources: true`, so each person works on one task at a time on their own calendar. If the user wants the ideal schedule with unlimited people, call it with no options instead.\n3. If the question spans projects that share people, call `calculate_portfolio_critical_path` with their `projectIds` (and `projectOrder` if the user ranked them) instead.\n4. For in-flight projects, pass `effort: \"remaining\"` so finished hours are not scheduled again.\n\n## 2. Read the result\n\n- `projectEndDate` is the forecast finish. With levelling, compare it with `unleveledProjectEndDate`: the gap is time lost waiting for busy people.\n- `criticalTaskIds` are the tasks with zero slack. Any delay to one of them moves the end date.\n- Each entry in `tasks` has `slackWorkingHours`: how many working hours the task can slip without moving the end. Under about 8 hours is near-critical.\n- `levelingDelayHours` and `waitingOn` show a task that waited for its assignee to finish another task.\n- `overallocations` lists periods where a person (`assigneeId`) or team (`teamId`) is booked above `capacity`; `allocation` 1.5 means 150%.\n\nLook up titles for the task ids you mention with `get_task` or `list_tasks`; report titles, not ids. To see why a critical task cannot start earlier, call `get_task` with `includeDependencies: true`: `dependencies.dependsOn` lists what it waits for and `dependencies.dependents` what waits for it.\n\n## 3. Recommend\n\nRank fixes by how much they pull the end date in:\n\n1. **Unblock critical tasks.** A critical task with `isBlocked: true` delays everything; say what it waits for.\n2. **Move work off the bottleneck person.** If critical tasks wait on one assignee (`waitingOn`), suggest reassigning a non-critical task of theirs.\n3. **Remove false dependencies.** A critical task waiting on work it does not really need (`dependencies.dependsOn`) can start earlier once the link is removed.\n4. **Split long critical tasks** so parts can run in parallel.\n5. **Cut or defer** tasks feeding late deliverables, if dates are fixed.\n\nShow the recommendation to the user. Change tasks (`update_task`) or dependencies (`add_dependency`, `remove_dependency`) only when they ask, then run the schedule again to show the effect.\n\n## Report format\n\n- Forecast finish date, and against any deadline the user gave.\n- Critical path: task titles in order, with assignee.\n- Top risks: near-critical tasks, blocked critical tasks, over-allocations.\n- Recommended actions, each with its expected effect.\n"
4695
+ content: "---\nname: analyze-schedule\ndescription: Find what drives a project's end date, how much each task can slip and where people are double-booked, then recommend fixes. Use for \"when will we finish?\", \"what is critical?\" or deadline-risk questions.\n---\n\n# Analyze the schedule\n\n## 1. Run the schedule\n\n1. Get the `projectId` (`list_projects`).\n2. Call `calculate_critical_path` with `calendars: \"assignee\"` and `levelResources: true`, so each person works on one task at a time on their own calendar. If the user wants the ideal schedule with unlimited people, call it with no options instead.\n3. If the question spans projects that share people, call `calculate_portfolio_critical_path` with their `projectIds` (and `projectOrder` if the user ranked them) instead.\n4. For in-flight projects, pass `effort: \"remaining\"` so finished hours are not scheduled again.\n\n## 2. Read the result\n\n- `projectEndDate` is the forecast finish. With levelling, compare it with `unleveledProjectEndDate`: the gap is time lost waiting for busy people.\n- `criticalTaskIds` are the tasks with zero or negative slack. Any delay to one of them moves the end date or misses a deadline.\n- `missedDeadlineTaskIds` lists tasks forecast to finish after their `deadline`. Their `deadlineVarianceHours` says by how much (negative working hours), and the negative `totalSlack` on the tasks before them shows which work drives the miss. Entries with `isMilestone: true` are checkpoints such as releases or sign-offs.\n- Each entry in `tasks` has `slackWorkingHours`: how many working hours the task can slip without moving the end. Under about 8 hours is near-critical.\n- `levelingDelayHours` and `waitingOn` show a task that waited for its assignee to finish another task.\n- `overallocations` lists periods where a person (`assigneeId`) or team (`teamId`) is booked above `capacity`; `allocation` 1.5 means 150%.\n\nLook up titles for the task ids you mention with `get_task` or `list_tasks`; report titles, not ids. To see why a critical task cannot start earlier, call `get_task` with `includeDependencies: true`: `dependencies.dependsOn` lists what it waits for and `dependencies.dependents` what waits for it.\n\n## 3. Recommend\n\nRank fixes by how much they pull the end date in:\n\n1. **Unblock critical tasks.** A critical task with `isBlocked: true` delays everything; say what it waits for.\n2. **Move work off the bottleneck person.** If critical tasks wait on one assignee (`waitingOn`), suggest reassigning a non-critical task of theirs.\n3. **Remove false dependencies.** A critical task waiting on work it does not really need (`dependencies.dependsOn`) can start earlier once the link is removed.\n4. **Split long critical tasks** so parts can run in parallel.\n5. **Cut or defer** tasks feeding late deliverables, if dates are fixed.\n\nShow the recommendation to the user. Change tasks (`update_task`) or dependencies (`add_dependency`, `remove_dependency`) only when they ask, then run the schedule again to show the effect.\n\n## Report format\n\n- Forecast finish date, and against any deadline the user gave. If the user gives a date that is not yet on a task, offer to record it as a `deadline` (on a milestone task with `isMilestone: true` if it is a checkpoint) so later runs track it.\n- Each milestone: forecast date against its deadline.\n- Critical path: task titles in order, with assignee.\n- Top risks: near-critical tasks, blocked critical tasks, over-allocations.\n- Recommended actions, each with its expected effect.\n"
4690
4696
  },
4691
4697
  {
4692
4698
  name: "investigate-task",
@@ -4701,7 +4707,7 @@ var bn = (e, t) => {
4701
4707
  {
4702
4708
  name: "plan-project",
4703
4709
  description: "Turn a goal, brief or feature list into a Critical Path project with deliverables, estimated and prioritized tasks, and the dependencies between them. Use when the user asks to plan, scope or break down work.",
4704
- content: "---\nname: plan-project\ndescription: Turn a goal, brief or feature list into a Critical Path project with deliverables, estimated and prioritized tasks, and the dependencies between them. Use when the user asks to plan, scope or break down work.\n---\n\n# Plan a project\n\nTurn a goal into deliverables (dated outcomes), tasks (estimated units of work) and dependencies (which task waits for which) the scheduler can use.\n\n## 1. Find or create the project\n\n1. Call `list_projects`. If a project already matches the goal, use it and read it with `get_project` to learn its workflow status keys and custom fields.\n2. Only if none fits, and the user wants a new one, call `create_project` with a `name` and a short `key`.\n3. Call `list_tasks` with the `projectId` and `list_deliverables` to see what already exists. Do not recreate it.\n\n## 2. Draft the plan before writing anything\n\nBreak the goal down in your reply first and show it to the user:\n\n- **Deliverables**: 2-6 outcomes someone could accept or reject, each with a due date if the user gave one.\n- **Tasks** under each deliverable. Each task:\n - starts with a verb and is small enough for one person (about 2-24 hours);\n - has `estimatedHours` (effort, not elapsed time);\n - has a `priority`: `urgent` only for work that blocks others now, `high` for the critical outcome, `medium` by default, `low` for nice-to-haves;\n - lists the tasks it must wait for (its dependencies). Only add a dependency when the work truly cannot start earlier; every extra one lengthens the schedule.\n- Note anything you assumed (team size, dates, scope) as a question.\n\nAsk the user to confirm or adjust before creating anything. A plan is cheap to change in chat and tedious to change once created.\n\n## 3. Create it\n\n1. Create tasks with `create_task` (`projectId`, `title`, `description` with acceptance criteria, `estimatedHours`, `priority`, `assigneeId` if known). Leave `status` out so tasks start in the workflow's default status.\n2. Create each deliverable with `create_deliverable`, passing the ids of its tasks in `taskIds`.\n3. Add each dependency from your plan with `add_dependency`: `taskId` is the task that waits, `dependsOnTaskId` the task that must finish first. Use the ids `create_task` returned. If one is refused as circular, your plan has a loop: fix the order with the user instead of retrying.\n4. If the project already had tasks, check what they wait for with `get_task` and `includeDependencies: true` before linking new work to them.\n\n## 4. Check the result\n\n1. Call `calculate_critical_path` for the project and report the forecast `projectEndDate` and the `criticalTaskIds` (by title). If every task is critical or the end date looks too early, a dependency is probably missing or reversed.\n2. If the end date misses a deliverable's due date, say so and suggest what to cut, split or reassign. The `analyze-schedule` skill covers this in depth.\n\n## Guardrails\n\n- Never invent user ids for `assigneeId`. Leave tasks unassigned unless the user named the person and you have their id.\n- Keep the plan to what the user asked for; propose extra work as suggestions, not tasks.\n"
4710
+ content: "---\nname: plan-project\ndescription: Turn a goal, brief or feature list into a Critical Path project with deliverables, estimated and prioritized tasks, and the dependencies between them. Use when the user asks to plan, scope or break down work.\n---\n\n# Plan a project\n\nTurn a goal into deliverables (dated outcomes), tasks (estimated units of work) and dependencies (which task waits for which) the scheduler can use.\n\n## 1. Find or create the project\n\n1. Call `list_projects`. If a project already matches the goal, use it and read it with `get_project` to learn its workflow status keys and custom fields.\n2. Only if none fits, and the user wants a new one, call `create_project` with a `name` and a short `key`.\n3. Call `list_tasks` with the `projectId` and `list_deliverables` to see what already exists. Do not recreate it.\n\n## 2. Draft the plan before writing anything\n\nBreak the goal down in your reply first and show it to the user:\n\n- **Deliverables**: 2-6 outcomes someone could accept or reject, each with a due date if the user gave one.\n- **Milestones** for dated checkpoints (a release, a sign-off, a review): a task with `isMilestone: true`, a `deadline` if the date is fixed, and dependencies on the tasks that must finish first. The schedule then reports whether each date will be met.\n- **Tasks** under each deliverable. Each task:\n - starts with a verb and is small enough for one person (about 2-24 hours);\n - has `estimatedHours` (effort, not elapsed time);\n - has a `priority`: `urgent` only for work that blocks others now, `high` for the critical outcome, `medium` by default, `low` for nice-to-haves;\n - lists the tasks it must wait for (its dependencies). Only add a dependency when the work truly cannot start earlier; every extra one lengthens the schedule.\n- Note anything you assumed (team size, dates, scope) as a question.\n\nAsk the user to confirm or adjust before creating anything. A plan is cheap to change in chat and tedious to change once created.\n\n## 3. Create it\n\n1. Create tasks with `create_task` (`projectId`, `title`, `description` with acceptance criteria, `estimatedHours`, `priority`, `assigneeId` if known). Leave `status` out so tasks start in the workflow's default status.\n2. Create each deliverable with `create_deliverable`, passing the ids of its tasks in `taskIds`.\n3. Add each dependency from your plan with `add_dependency`: `taskId` is the task that waits, `dependsOnTaskId` the task that must finish first. Use the ids `create_task` returned. If one is refused as circular, your plan has a loop: fix the order with the user instead of retrying.\n4. If the project already had tasks, check what they wait for with `get_task` and `includeDependencies: true` before linking new work to them.\n\n## 4. Check the result\n\n1. Call `calculate_critical_path` for the project and report the forecast `projectEndDate` and the `criticalTaskIds` (by title). If every task is critical or the end date looks too early, a dependency is probably missing or reversed.\n2. If the end date misses a deliverable's due date, or `missedDeadlineTaskIds` is not empty, say so and suggest what to cut, split or reassign. The `analyze-schedule` skill covers this in depth.\n\n## Guardrails\n\n- Never invent user ids for `assigneeId`. Leave tasks unassigned unless the user named the person and you have their id.\n- Keep the plan to what the user asked for; propose extra work as suggestions, not tasks.\n"
4705
4711
  },
4706
4712
  {
4707
4713
  name: "report-status",
@@ -4721,7 +4727,7 @@ function Vn(e) {
4721
4727
  //#region ../mcp/dist/tools/definitions.js
4722
4728
  var Hn = {
4723
4729
  core: "Projects, tasks and task dependencies: find, read, create, update and delete",
4724
- collaboration: "Deliverables (milestones) and task comments",
4730
+ collaboration: "Deliverables and task comments",
4725
4731
  scheduling: "Critical path, portfolio scheduling and workload/capacity",
4726
4732
  analytics: "Project status ladder, task metrics, earned value and progress history",
4727
4733
  guidance: "Skills: step-by-step playbooks for multi-step jobs"
@@ -4907,6 +4913,8 @@ var tr = $({
4907
4913
  ]).optional().default("none").describe("Task priority"),
4908
4914
  assigneeId: I().optional().describe("User ID to assign task to"),
4909
4915
  dueDate: I().optional().describe("Due date (ISO string)"),
4916
+ deadline: I().optional().describe("Latest acceptable finish (YYYY-MM-DD for the end of that working day, or an ISO date-time). Critical path analysis reports a miss as negative slack"),
4917
+ isMilestone: R().optional().describe("Mark the task as a milestone: a zero-duration checkpoint (release, sign-off) fed by dependencies; its estimate is ignored"),
4910
4918
  tags: z(I()).optional().describe("Tags for categorization"),
4911
4919
  estimatedHours: L().optional().describe("Estimated hours to complete"),
4912
4920
  allocation: L().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
@@ -4925,6 +4933,8 @@ var tr = $({
4925
4933
  priority: e.priority || "none",
4926
4934
  assigneeId: e.assigneeId,
4927
4935
  dueDate: e.dueDate,
4936
+ deadline: e.deadline,
4937
+ isMilestone: e.isMilestone,
4928
4938
  tags: e.tags || [],
4929
4939
  estimatedHours: e.estimatedHours,
4930
4940
  customFields: e.customFields,
@@ -4937,7 +4947,7 @@ var tr = $({
4937
4947
  }), nr = $({
4938
4948
  name: "update_task",
4939
4949
  title: "Update Task",
4940
- description: "Change an existing task: title, description, status, priority, assignee, due date, estimate, logged hours, allocation, blocked state, tags or custom fields. Only the fields you pass change. Use it to move a task through its workflow or re-plan it. Returns the updated task.",
4950
+ description: "Change an existing task: title, description, status, priority, assignee, due date, deadline, milestone flag, estimate, logged hours, allocation, blocked state, tags or custom fields. Only the fields you pass change. Use it to move a task through its workflow or re-plan it. Returns the updated task.",
4941
4951
  toolset: "core",
4942
4952
  outputZodSchema: wn,
4943
4953
  zodSchema: B({
@@ -4954,6 +4964,8 @@ var tr = $({
4954
4964
  ]).optional().describe("New priority"),
4955
4965
  assigneeId: I().optional().describe("User ID to assign the task to"),
4956
4966
  dueDate: I().optional().describe("Due date (ISO string)"),
4967
+ deadline: I().optional().describe("Latest acceptable finish (YYYY-MM-DD for the end of that working day, or an ISO date-time). Critical path analysis reports a miss as negative slack"),
4968
+ isMilestone: R().optional().describe("Mark the task as a milestone: a zero-duration checkpoint (release, sign-off) fed by dependencies; its estimate is ignored"),
4957
4969
  tags: z(I()).optional().describe("Replaces all tags"),
4958
4970
  estimatedHours: L().optional().describe("Estimated effort in hours"),
4959
4971
  allocation: L().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
@@ -5031,7 +5043,7 @@ var tr = $({
5031
5043
  }), or = $({
5032
5044
  name: "list_deliverables",
5033
5045
  title: "List Deliverables",
5034
- description: "List a project's deliverables: milestones that group tasks toward a dated outcome. Use it to see what is due and which tasks feed each milestone. Returns { deliverables }.",
5046
+ description: "List a project's deliverables: outputs that group the tasks producing them. Use it to see what is due and which tasks feed each deliverable. For dated checkpoints, look for milestone tasks (`isMilestone`). Returns { deliverables }.",
5035
5047
  toolset: "collaboration",
5036
5048
  outputZodSchema: B({ deliverables: z(On) }),
5037
5049
  zodSchema: B({ projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)") }),
@@ -5044,7 +5056,7 @@ var tr = $({
5044
5056
  }), sr = $({
5045
5057
  name: "create_deliverable",
5046
5058
  title: "Create Deliverable",
5047
- description: "Create a deliverable (milestone) in a project, optionally linking existing tasks by id. Use it when planning a dated outcome that several tasks build toward. Returns the created deliverable.",
5059
+ description: "Create a deliverable in a project, optionally linking existing tasks by id. Use it for an output (a document, a build, an asset) that several tasks produce. For a dated checkpoint the schedule should enforce, create a task with `isMilestone: true` and a `deadline` instead. Returns the created deliverable.",
5048
5060
  toolset: "collaboration",
5049
5061
  outputZodSchema: On,
5050
5062
  zodSchema: B({
@@ -5362,7 +5374,7 @@ var vr = [
5362
5374
  ];
5363
5375
  function yr(e, t = {}) {
5364
5376
  let n = new Set(e.map((e) => e.name)), r = [
5365
- "Critical Path is a project management backend. A project holds tasks and deliverables (milestones that group tasks). Tasks have a workflow status, priority, assignee, effort estimate, logged hours, optional subtasks (parentId) and dependencies, and comments.",
5377
+ "Critical Path is a project management backend. A project holds tasks and deliverables (outputs that group the tasks producing them). Tasks have a workflow status, priority, assignee, effort estimate, logged hours, optional subtasks (parentId) and dependencies, and comments. A task with `isMilestone: true` is a zero-duration checkpoint, and a `deadline` on any task is enforced by critical path analysis.",
5366
5378
  "",
5367
5379
  "Working rules:",
5368
5380
  "- Never guess ids. Get them from list or create results.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@critical-path/svelte",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Svelte 5 Runes state and reactive integrations for Critical Path headless project management framework",
5
5
  "author": "Jack James",
6
6
  "license": "MIT",
@@ -18,9 +18,9 @@
18
18
  }
19
19
  },
20
20
  "dependencies": {
21
- "@critical-path/client": "0.25.1",
22
- "@critical-path/core": "0.51.1",
23
- "@critical-path/mcp": "0.19.0"
21
+ "@critical-path/mcp": "0.20.0",
22
+ "@critical-path/client": "0.25.2",
23
+ "@critical-path/core": "0.52.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "svelte": "^5.57.2"
@@ -30,7 +30,7 @@
30
30
  "@types/node": "^26.6.5",
31
31
  "svelte": "^5.57.2",
32
32
  "typescript": "^5.7.0",
33
- "vite": "^8.3.4",
33
+ "vite": "^8.3.5",
34
34
  "vitest": "^3.0.0"
35
35
  },
36
36
  "engines": {