pi-crew 0.3.7 → 0.3.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +1 -1
  3. package/src/agents/discover-agents.ts +2 -1
  4. package/src/config/config.ts +732 -208
  5. package/src/config/types.ts +34 -5
  6. package/src/extension/help.ts +1 -0
  7. package/src/extension/register.ts +1173 -257
  8. package/src/extension/registration/commands.ts +15 -2
  9. package/src/extension/registration/team-tool.ts +1 -1
  10. package/src/extension/session-summary.ts +11 -1
  11. package/src/extension/team-tool/api.ts +4 -1
  12. package/src/extension/team-tool/cache-control.ts +23 -0
  13. package/src/extension/team-tool/cancel.ts +15 -5
  14. package/src/extension/team-tool/context.ts +2 -0
  15. package/src/extension/team-tool/handle-settings.ts +2 -0
  16. package/src/extension/team-tool/health-monitor.ts +563 -0
  17. package/src/extension/team-tool/inspect.ts +10 -3
  18. package/src/extension/team-tool/respond.ts +5 -2
  19. package/src/extension/team-tool/status.ts +4 -1
  20. package/src/extension/team-tool-types.ts +2 -0
  21. package/src/extension/team-tool.ts +901 -177
  22. package/src/runtime/adaptive-plan.ts +1 -1
  23. package/src/runtime/foreground-watchdog.ts +129 -0
  24. package/src/runtime/manifest-cache.ts +4 -2
  25. package/src/runtime/run-tracker.ts +11 -0
  26. package/src/runtime/runtime-policy.ts +15 -2
  27. package/src/runtime/stale-reconciler.ts +322 -18
  28. package/src/runtime/task-runner.ts +6 -1
  29. package/src/schema/config-schema.ts +1 -0
  30. package/src/schema/team-tool-schema.ts +204 -76
  31. package/src/state/state-store.ts +9 -1
  32. package/src/teams/discover-teams.ts +2 -1
  33. package/src/ui/run-event-bus.ts +2 -1
  34. package/src/ui/settings-overlay.ts +2 -0
  35. package/src/workflows/discover-workflows.ts +5 -1
@@ -6,7 +6,11 @@
6
6
  // file for backwards compat — existing `import { CrewUiConfig } from "../config/config.ts"`
7
7
  // continues to work.
8
8
 
9
- export type PiTeamsAutonomyProfile = "manual" | "suggested" | "assisted" | "aggressive";
9
+ export type PiTeamsAutonomyProfile =
10
+ | "manual"
11
+ | "suggested"
12
+ | "assisted"
13
+ | "aggressive";
10
14
 
11
15
  export interface PiTeamsAutonomousConfig {
12
16
  profile?: PiTeamsAutonomyProfile;
@@ -28,7 +32,11 @@ export interface CrewLimitsConfig {
28
32
  heartbeatStaleMs?: number;
29
33
  }
30
34
 
31
- export type CrewRuntimeMode = "auto" | "scaffold" | "child-process" | "live-session";
35
+ export type CrewRuntimeMode =
36
+ | "auto"
37
+ | "scaffold"
38
+ | "child-process"
39
+ | "live-session";
32
40
 
33
41
  export type CompletionMutationGuardMode = "off" | "warn" | "fail";
34
42
  export type EffectivenessGuardMode = "off" | "warn" | "block" | "fail";
@@ -46,7 +54,11 @@ export interface CrewRuntimeConfig {
46
54
  requirePlanApproval?: boolean;
47
55
  completionMutationGuard?: CompletionMutationGuardMode;
48
56
  effectivenessGuard?: EffectivenessGuardMode;
49
- yield?: { enabled?: boolean; maxReminders?: number; reminderPrompt?: string };
57
+ yield?: {
58
+ enabled?: boolean;
59
+ maxReminders?: number;
60
+ reminderPrompt?: string;
61
+ };
50
62
  /** Policy for per-role runtime selection. Not sensitive — safe to keep in project config. */
51
63
  isolationPolicy?: {
52
64
  /** Roles that should use child-process for crash isolation. Default: no roles. */
@@ -82,7 +94,16 @@ export interface CrewUiConfig {
82
94
  showTools?: boolean;
83
95
  transcriptTailBytes?: number;
84
96
  mascotStyle?: "cat" | "armin";
85
- mascotEffect?: "random" | "none" | "typewriter" | "scanline" | "rain" | "fade" | "crt" | "glitch" | "dissolve";
97
+ mascotEffect?:
98
+ | "random"
99
+ | "none"
100
+ | "typewriter"
101
+ | "scanline"
102
+ | "rain"
103
+ | "fade"
104
+ | "crt"
105
+ | "glitch"
106
+ | "dissolve";
86
107
  }
87
108
 
88
109
  export interface AgentOverrideConfig {
@@ -114,7 +135,11 @@ export interface CrewPolicyConfig {
114
135
  disabledCapabilities?: string[];
115
136
  }
116
137
 
117
- export type CrewNotificationSeverity = "info" | "warning" | "error" | "critical";
138
+ export type CrewNotificationSeverity =
139
+ | "info"
140
+ | "warning"
141
+ | "error"
142
+ | "critical";
118
143
 
119
144
  export interface CrewNotificationsConfig {
120
145
  enabled?: boolean;
@@ -144,6 +169,10 @@ export interface CrewReliabilityConfig {
144
169
  retryPolicy?: CrewRetryPolicyConfig;
145
170
  autoRecover?: boolean;
146
171
  deadletterThreshold?: number;
172
+ /** Interval (ms) for periodic stale-run auto-repair. Default 60_000 (60s). Set to 0 to disable. */
173
+ autoRepairIntervalMs?: number;
174
+ /** Remove /tmp/pi-crew-* directories after their orphaned runs are reconciled. Default: true. */
175
+ cleanupOrphanedTempDirs?: boolean;
147
176
  }
148
177
 
149
178
  export interface CrewOtlpConfig {
@@ -35,6 +35,7 @@ export function piTeamsHelp(): string {
35
35
  "- /team-imports",
36
36
  "",
37
37
  "Diagnostics:",
38
+ "- /team-health",
38
39
  "- /team-doctor",
39
40
  "- /team-init [--copy-builtins] [--overwrite]",
40
41
  "- /team-config [key=value] [--unset=key.path] [--project]",