@giladbarnea/pi-simple-team 1.0.6 → 1.0.8

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 CHANGED
@@ -1,3 +1,5 @@
1
+ <img src="screenshots/pi-simple-team-banner.png" alt="A dark wireframe room in a starry void" width="100%">
2
+
1
3
  <div align="center">
2
4
 
3
5
  # pi-simple-team
package/index.ts CHANGED
@@ -697,7 +697,12 @@ export default function (pi: ExtensionAPI) {
697
697
  parameters: Type.Object({
698
698
  team: Type.Optional(Type.String({ description: "Team name; optional only when exactly one team exists" })),
699
699
  teammate: Type.Optional(Type.String({ description: "Filter to one teammate name" })),
700
- kind: Type.Optional(Type.String({ description: "Filter to one normalized event kind" })),
700
+ kind: Type.Optional(
701
+ Type.Array(Type.String({ minLength: 1 }), {
702
+ minItems: 1,
703
+ description: "Filter to any of these normalized event kinds",
704
+ }),
705
+ ),
701
706
  search: Type.Optional(Type.String({ description: "Case-insensitive substring search over summary, teammate, direction, kind, and details" })),
702
707
  since: Type.Optional(Type.String({ description: "ISO timestamp filter; only entries at or after this time" })),
703
708
  limit: Type.Optional(Type.Integer({ minimum: 1, maximum: 100, description: "Max rows to return, default 20, maximum 100" })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giladbarnea/pi-simple-team",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "A flat, live team of Pi agents.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -25,6 +25,7 @@
25
25
  "render-support",
26
26
  "screenshots/1.png",
27
27
  "screenshots/2.png",
28
+ "screenshots/pi-simple-team-banner.png",
28
29
  "README.md",
29
30
  "LICENSE"
30
31
  ],
package/render.ts CHANGED
@@ -482,17 +482,18 @@ function actionRows(theme: ThemeLike, actions: LogAction[], roster: string[], ha
482
482
  function filterStats(theme: ThemeLike, filters: Record<string, unknown>, roster: string[]): string[] {
483
483
  const stats: string[] = [];
484
484
  for (const [key, value] of Object.entries(filters)) {
485
- if (typeof value !== "string" || !value) continue;
485
+ const displayValue = Array.isArray(value) ? value.join(",") : value;
486
+ if (typeof displayValue !== "string" || !displayValue) continue;
486
487
  if (key === "since") {
487
- const parsed = Date.parse(value);
488
- stats.push(theme.fg("borderMuted", `since ${Number.isFinite(parsed) ? timeOfDay(parsed) : value}`));
488
+ const parsed = Date.parse(displayValue);
489
+ stats.push(theme.fg("borderMuted", `since ${Number.isFinite(parsed) ? timeOfDay(parsed) : displayValue}`));
489
490
  continue;
490
491
  }
491
492
  if (key === "teammate") {
492
- stats.push(`${theme.fg("borderMuted", "teammate=")}${theme.fg(actorHueToken(value, roster), value)}`);
493
+ stats.push(`${theme.fg("borderMuted", "teammate=")}${theme.fg(actorHueToken(displayValue, roster), displayValue)}`);
493
494
  continue;
494
495
  }
495
- stats.push(theme.fg("borderMuted", `${key}=${value}`));
496
+ stats.push(theme.fg("borderMuted", `${key}=${displayValue}`));
496
497
  }
497
498
  return stats;
498
499
  }
@@ -617,7 +618,7 @@ function callBodyFor(tool: TeamToolName, theme: ThemeLike, args: Record<string,
617
618
  }
618
619
  if (tool === "teamlog") {
619
620
  const filterStats = ["teammate", "kind", "search", "since", "cursor"]
620
- .filter((key) => typeof args[key] === "string" && args[key])
621
+ .filter((key) => (typeof args[key] === "string" && args[key]) || (Array.isArray(args[key]) && args[key].length > 0))
621
622
  .map((key) => {
622
623
  const value = String(args[key]);
623
624
  if (key === "teammate") return `${theme.fg("dim", "teammate=")}${theme.fg(actorHueToken(value, roster), value)}`;
package/teamlog.ts CHANGED
@@ -36,7 +36,7 @@ export type TeamLogEntryInput = Omit<TeamLogEntry, "sequence" | "timestamp" | "e
36
36
 
37
37
  export interface TeamLogFilterParams {
38
38
  teammate?: string;
39
- kind?: string;
39
+ kind?: string[];
40
40
  search?: string;
41
41
  since?: string;
42
42
  }
@@ -118,7 +118,7 @@ export function filterTeamLog(entries: TeamLogEntry[], params: TeamLogFilterPara
118
118
  const sinceThreshold = parseSince(params.since);
119
119
  return entries.filter((entry) => {
120
120
  if (params.teammate !== undefined && entry.teammate !== params.teammate) return false;
121
- if (params.kind !== undefined && entry.kind !== params.kind) return false;
121
+ if (params.kind !== undefined && !params.kind.includes(entry.kind)) return false;
122
122
  if (sinceThreshold !== undefined && entry.epochMilliseconds < sinceThreshold) return false;
123
123
  if (params.search !== undefined && !matchesSearch(entry, params.search)) return false;
124
124
  return true;