@fungi.computer/parakeet 0.6.0 → 0.6.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.
@@ -57,7 +57,7 @@ export type SessionActivityStatus = "cancelling" | "idle" | "queued" | "retrying
57
57
  export declare function sessionViewState(facts: SessionViewFacts): SessionViewState;
58
58
  export declare function sameRunningWork(left: AgentRunningWork | null, right: AgentRunningWork | null): boolean;
59
59
  /** Activity only: queued messages belong in the transcript, never in this label. */
60
- export declare function sessionStateLabel(state: SessionViewState, waitingOnYou?: boolean): "thinking" | "streaming" | "running a tool" | "idle" | "waiting on you" | "failed";
60
+ export declare function sessionStateLabel(state: SessionViewState, waitingOnYou?: boolean): "thinking" | "streaming" | "running a tool" | "idle" | "waiting on you" | "cancelling" | "failed";
61
61
  /** Whether two view states say the same thing, so a readout can stay stable. */
62
62
  export declare function sameSessionViewState(left: SessionViewState, right: SessionViewState): boolean;
63
63
  /** Coarse activity for a view state: what the composer gates on. */
@@ -66,26 +66,28 @@ export function sessionViewState(facts) {
66
66
  export function sameRunningWork(left, right) {
67
67
  if (left === null || right === null)
68
68
  return left === right;
69
- if (left.kind === "session" && right.kind === "session")
70
- return (left.sessionId === right.sessionId &&
71
- left.commandId === right.commandId &&
72
- left.title === right.title);
73
- if (left.kind === "host" && right.kind === "host")
74
- return left.lane === right.lane && left.jobId === right.jobId;
75
- return false;
69
+ return left.phase === right.phase;
76
70
  }
71
+ const occupancyLabels = {
72
+ thinking: "thinking",
73
+ streaming: "streaming",
74
+ running_tool: "running a tool",
75
+ waiting_on_you: "waiting on you",
76
+ cancelling: "cancelling",
77
+ };
77
78
  /** Activity only: queued messages belong in the transcript, never in this label. */
78
79
  export function sessionStateLabel(state, waitingOnYou = false) {
79
80
  switch (state.kind) {
80
81
  case "queued":
81
- // Executor occupancy is the only Agent activity fact in a queued view.
82
- // Its identity/title is not a state and must never become a status label.
83
- return state.runningWork === null ? "idle" : "thinking";
82
+ return state.runningWork === null
83
+ ? "idle"
84
+ : occupancyLabels[state.runningWork.phase];
84
85
  case "thinking":
85
- case "cancelling":
86
86
  case "compacting":
87
87
  case "retrying":
88
88
  return "thinking";
89
+ case "cancelling":
90
+ return "cancelling";
89
91
  case "responding":
90
92
  return "streaming";
91
93
  case "running_tool":
@@ -2545,6 +2545,7 @@ function sessionStateLabel(
2545
2545
  | "idle"
2546
2546
  | "thinking"
2547
2547
  | "failed"
2548
+ | "cancelling"
2548
2549
  | "streaming"
2549
2550
  | "running a tool"
2550
2551
  | "waiting on you";
@@ -2561,8 +2562,8 @@ Activity only: queued messages belong in the transcript, never in this label.
2561
2562
 
2562
2563
  #### Returns
2563
2564
 
2564
- \| `"idle"` \| `"thinking"` \| `"failed"` \| `"streaming"` \| `"running a tool"`
2565
- \| `"waiting on you"`
2565
+ \| `"idle"` \| `"thinking"` \| `"failed"` \| `"cancelling"` \| `"streaming"` \|
2566
+ `"running a tool"` \| `"waiting on you"`
2566
2567
 
2567
2568
  ---
2568
2569
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/parakeet",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "private": false,
6
6
  "description": "Standalone React composer for a typed Shiitake Session",
@@ -56,14 +56,14 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@earendil-works/pi-ai": "1.3.0",
59
- "@fungi.computer/agar": "0.6.0",
59
+ "@fungi.computer/agar": "0.6.1",
60
60
  "@fungi.computer/bird-dog": "0.3.1",
61
61
  "@fungi.computer/cairn": "0.1.0",
62
- "@fungi.computer/caps": "0.5.0",
62
+ "@fungi.computer/caps": "0.6.0",
63
63
  "@fungi.computer/gills": "0.2.0",
64
- "@fungi.computer/knapsack": "0.4.1",
65
- "@fungi.computer/shiitake": "0.7.0",
66
- "@fungi.computer/sigils": "0.2.0",
64
+ "@fungi.computer/knapsack": "0.4.2",
65
+ "@fungi.computer/shiitake": "0.8.0",
66
+ "@fungi.computer/sigils": "0.2.1",
67
67
  "@fungi.computer/sprite": "0.2.0",
68
68
  "@fungi.computer/sprite-zdog": "0.3.0",
69
69
  "@fungi.computer/whistle": "0.3.0",