@loicngr/kobo 2.1.19 → 2.1.20

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
@@ -4,6 +4,10 @@ All notable changes to Kōbō are documented here. The format is based on
4
4
  [Keep a Changelog](https://keepachangelog.com/). Each release is an `## <version>`
5
5
  section — the in-app "What's new" dialog reads this file.
6
6
 
7
+ ## 2.1.20
8
+
9
+ - fix(progress): clarify activity updates and completion
10
+
7
11
  ## 2.1.19
8
12
 
9
13
  - feat(progress): add session activity bars and improve launch prompts
package/CONFIGURATION.md CHANGED
@@ -885,10 +885,23 @@ the previous process are interrupted; external reporters may still be running
885
885
  elsewhere, so their last state is preserved. A new internal launch uses a new
886
886
  reporting identity.
887
887
 
888
- Workspace launch instructions require agents to use these tools for long tasks
889
- and pass the requirement to subagents. When a restricted subagent cannot access
890
- the tools, its parent reports the activity on its behalf. Reporting permissions
891
- do not grant permission to edit project files or complete tasks during a review.
888
+ Workspace launch instructions require the full reporting lifecycle: create a
889
+ bar, keep its returned ID and sequence, update that same bar at actual phase
890
+ changes and meaningful completed milestones, and finish it before the final
891
+ report once the outcome is known. Even without a measurable percentage, agents
892
+ must update the current step; omitting both numeric values preserves
893
+ indeterminate progress. No percentage is inferred from tool calls, elapsed time
894
+ or model activity. Unchanged updates, polling and timer-driven reporting loops
895
+ are not requested.
896
+
897
+ Parents pass this lifecycle to subagents, which report and finish their own
898
+ activities before returning. When a restricted subagent cannot access the tools,
899
+ its parent reports observed milestones and the outcome on its behalf, without
900
+ duplicate bars. Yielding while background work continues does not mean success.
901
+ Reporting permissions do not grant permission to edit project files or complete
902
+ tasks during a review. These instructions guide the model; they cannot guarantee
903
+ that it reports every milestone. Updated guidance applies on the next launch or
904
+ resume, not retroactively to an already running agent.
892
905
 
893
906
  The service retains at most 1,000 indicators per session, with at most 32 running
894
907
  at once. Hidden records are retained so retries cannot recreate dismissed bars.
@@ -2,6 +2,10 @@ export const PROGRESS_BAR_PLAN_EXCEPTION = 'Operational exception in Plan/read-o
2
2
  /** Shared across engines, fresh/resumed launches and delegated agents. */
3
3
  export const PROGRESS_BAR_PROMPT = `<kobo-progress-reporting>
4
4
  ${PROGRESS_BAR_PLAN_EXCEPTION}
5
- Use Kōbō's create_progress_bar, update_progress_bar and finish_progress_bar for long-running tasks, including tests and delegated work. Give each activity a clear label and stable activity_key; follow tool schemas for ordered updates and retries. Report meaningful steps and measured current/total only when known; otherwise keep progress indeterminate. Never invent percentages or poll these tools. Finish with succeeded or failed only when known. A dismissed bar stays hidden: continue without recreating it; dismissal is not cancellation. Reporting never substitutes for verification, and an interrupted reporter does not prove background work stopped.
6
- Pass this requirement to all subagents when delegating. Subagents must not schedule or replace workspace wakeups; the parent coordinates follow-up. Each subagent reports its own long task through the inherited Kōbō MCP tools; the parent must not duplicate that activity. If a custom subagent lacks these tools, the parent reports its observed progress accurately instead. After resume, start new activity keys for new work; do not reopen a finished activity.
5
+ For each long-running activity (tests, audits, builds or delegated work), follow this reporting lifecycle:
6
+ 1. Call create_progress_bar with a clear label, current step and stable activity_key. Save its returned id and sequence; creating a bar is only the start of reporting.
7
+ 2. Call update_progress_bar with that id and an increasing sequence: update the same bar at each actual phase change or meaningful completed milestone, including during a long phase. Even without a measured percentage, report the current step; omit both current and total for step-only updates. Use measured numbers only when known. Never invent percentages, poll, send unchanged updates or start timer-driven reporting loops; follow tool retry guidance.
8
+ 3. Call finish_progress_bar on that id before your final report (or return to the parent) when the activity's succeeded/failed outcome is known. Do not declare ongoing background work finished merely because you are yielding control.
9
+ Pass this requirement to all subagents when delegating: each reports and finishes its own long activity through inherited Kōbō MCP tools; the parent must not duplicate it. If a custom subagent lacks these tools, the parent reports its observed milestones and outcome instead. Subagents must not schedule or replace workspace wakeups; the parent coordinates follow-up.
10
+ A dismissed bar stays hidden: continue without recreating it; dismissal is not cancellation. Reporting never substitutes for verification, and an interrupted reporter does not prove background work stopped. After resume, use new activity keys for new work; do not reopen finished activities.
7
11
  </kobo-progress-reporting>`;
@@ -22,15 +22,15 @@ function tools(external) {
22
22
  annotations: { readOnlyHint: readOnly, destructiveHint: false, openWorldHint: false },
23
23
  });
24
24
  return [
25
- definition('create_progress_bar', 'Report a labelled long-running activity in this session. Use a new activity_key per activity; identical retries return its current state, including dismissal. Report measured current/total together, or omit both for indeterminate progress. Closing a bar never cancels work.', {
25
+ definition('create_progress_bar', 'Start reporting a labelled long-running activity. Save the returned id and sequence, update that same bar at actual phase changes and meaningful completed milestones, and finish it before the final report when the outcome is known. Use a new activity_key per activity; identical retries return its current state, including dismissal. Supply measured current/total together or omit both for indeterminate progress. Closing a bar never cancels work.', {
26
26
  activity_key: { type: 'string', minLength: 1, maxLength: 100 },
27
27
  label: { type: 'string', minLength: 1, maxLength: 200 },
28
28
  step,
29
29
  current: numberOrNull,
30
30
  total: numberOrNull,
31
31
  }, ['activity_key', 'label']),
32
- definition('update_progress_bar', 'Update absolute measured progress and/or step. Both numbers must be provided together, or both null. At most one accepted running update per second; respect retry guidance. Dismissed bars remain hidden. Never invent a percentage.', { progress_id: id, sequence, step, current: numberOrNull, total: numberOrNull }, ['progress_id', 'sequence']),
33
- definition('finish_progress_bar', 'Finish reporting with succeeded or failed. Terminal state is immutable except an exact retry. Success hides after five seconds; failure remains until the user closes it. Reporting does not mark workspace tasks done.', { progress_id: id, sequence, step, outcome: { type: 'string', enum: ['succeeded', 'failed'] } }, ['progress_id', 'sequence', 'outcome']),
32
+ definition('update_progress_bar', 'Update the existing bar at actual phase changes or meaningful completed milestones, even when no percentage is known. Omit both numbers for step-only updates (previous numeric values are preserved); provide both measured numbers together, or both null to switch to indeterminate. Use the returned id as progress_id and increase sequence. Never invent percentages or send unchanged updates. At most one accepted running update per second; respect retry guidance without polling. Dismissed bars remain hidden.', { progress_id: id, sequence, step, current: numberOrNull, total: numberOrNull }, ['progress_id', 'sequence']),
33
+ definition('finish_progress_bar', 'Finish the same bar with succeeded or failed before your final report or return to the parent, only once the activity outcome is known. Do not finish ongoing background work merely because you yield control. Increase sequence; terminal state is immutable except an exact retry. Success hides after five seconds; failure remains until the user closes it. Reporting does not mark workspace tasks done.', { progress_id: id, sequence, step, outcome: { type: 'string', enum: ['succeeded', 'failed'] } }, ['progress_id', 'sequence', 'outcome']),
34
34
  definition('list_progress_bars', 'Read progress bars in the explicitly selected session, including dismissed/terminal bars. Responses contain bounded pages and serverTime; do not poll without a concrete need.', {
35
35
  limit: { type: 'integer', minimum: 1, maximum: 100, default: 50 },
36
36
  offset: { type: 'integer', minimum: 0, default: 0 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loicngr/kobo",
3
- "version": "2.1.19",
3
+ "version": "2.1.20",
4
4
  "description": "Kōbō — local multi-workspace orchestrator for Claude Code and OpenAI Codex, with isolated Git worktrees, live review and optional automation.",
5
5
  "type": "module",
6
6
  "license": "GPL-3.0-or-later",
@@ -578,7 +578,9 @@ IDs. Workspace-bound callers omit those fields: the backend derives their scope
578
578
  from a per-launch capability. They cannot forge another workspace, session or
579
579
  launch. The managed server exposes the same tools to capable subagents; custom
580
580
  subagent tool restrictions still apply. If a child lacks access, the parent
581
- reports its activity rather than creating a duplicate indicator.
581
+ reports its observed milestones and outcome rather than creating a duplicate
582
+ indicator. Pass the full create → update → finish lifecycle to delegates; they
583
+ must finish their own activity before returning when its outcome is known.
582
584
 
583
585
  For example, an external client can create an activity with:
584
586
 
@@ -593,7 +595,9 @@ For example, an external client can create an activity with:
593
595
  }
594
596
  ```
595
597
 
596
- Keep the returned `id`. Report absolute progress with `update_progress_bar`:
598
+ Keep the returned `id` and `sequence`. Update **the same bar** at actual phase
599
+ changes and meaningful completed milestones, including during a long phase.
600
+ Report absolute progress with `update_progress_bar`:
597
601
 
598
602
  ```json
599
603
  {
@@ -607,8 +611,28 @@ Keep the returned `id`. Report absolute progress with `update_progress_bar`:
607
611
  }
608
612
  ```
609
613
 
610
- Then call `finish_progress_bar` with the same scope/id, a higher `sequence`,
611
- `outcome: "succeeded"` or `"failed"`, and an optional summary in `step`.
614
+ An audit with no measurable denominator still needs step updates. After creating
615
+ an indeterminate activity, send this when its phase changes:
616
+
617
+ ```json
618
+ {
619
+ "workspace_id": "<workspace ID>",
620
+ "session_id": "<session ID>",
621
+ "progress_id": "<returned id>",
622
+ "sequence": 1,
623
+ "step": "Code inspection complete; verifying findings"
624
+ }
625
+ ```
626
+
627
+ Omitting **both** `current` and `total` is valid on updates. It keeps an
628
+ indeterminate activity indeterminate, or preserves existing numeric values.
629
+ Do not invent a percentage, send unchanged updates or create periodic LLM turns
630
+ just to refresh a bar.
631
+
632
+ Before your final report (or return to the parent), call `finish_progress_bar`
633
+ with the same scope/id, a higher `sequence`, `outcome: "succeeded"` or `"failed"`,
634
+ and an optional summary in `step`, once the outcome is known. Do not finish an
635
+ activity merely because you yield while its background work continues.
612
636
  Supply numeric progress only when known: both values must be finite, with
613
637
  `total > 0` and `0 <= current <= total`. Omit both at creation, or send both as
614
638
  `null`, for an indeterminate indicator. Updates with no numeric pair keep the