@wrongstack/core 0.89.3 → 0.107.2
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/dist/{agent-bridge-DbVe1dHT.d.ts → agent-bridge-mOxbpFcg.d.ts} +1 -1
- package/dist/{agent-subagent-runner-C6eqID1t.d.ts → agent-subagent-runner-DukQLUcS.d.ts} +5 -5
- package/dist/{brain-s9DyD_Vf.d.ts → brain-Dfv4Y82E.d.ts} +1 -1
- package/dist/{config-84VaZpH6.d.ts → config-BSU-6vah.d.ts} +1 -1
- package/dist/coordination/index.d.ts +9 -9
- package/dist/coordination/index.js +103 -0
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +18 -17
- package/dist/defaults/index.js +276 -12
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +61 -365
- package/dist/execution/index.js +423 -8
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +4 -4
- package/dist/goal-preamble-CI8lxeY1.d.ts +378 -0
- package/dist/{goal-store-DvWLNu52.d.ts → goal-store-ht0VmR1A.d.ts} +63 -21
- package/dist/{index-CqrroYcU.d.ts → index-BWRN6wOb.d.ts} +5 -5
- package/dist/{index-D3Nax3YU.d.ts → index-DIKEcfgC.d.ts} +3 -3
- package/dist/index.d.ts +31 -29
- package/dist/index.js +530 -53
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +4 -4
- package/dist/kernel/index.d.ts +6 -6
- package/dist/{mcp-servers-D3E5ixAR.d.ts → mcp-servers-CXCsANdY.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-DHNrjPaA.d.ts → multi-agent-coordinator-51LvnXkD.d.ts} +1 -1
- package/dist/{null-fleet-bus-BzzciAc4.d.ts → null-fleet-bus-D09hMzFQ.d.ts} +5 -5
- package/dist/observability/index.d.ts +1 -1
- package/dist/{parallel-eternal-engine-CTpcrb9O.d.ts → parallel-eternal-engine-CUtmM_0V.d.ts} +24 -5
- package/dist/{path-resolver-B7hgMAVe.d.ts → path-resolver-DDJiMAtX.d.ts} +1 -1
- package/dist/{pipeline-C1Ad9OjI.d.ts → pipeline-BqiA_UMr.d.ts} +2 -2
- package/dist/{plan-templates-CNphsz0n.d.ts → plan-templates-BdDxl9cI.d.ts} +2 -2
- package/dist/{provider-runner-cqvlB_oS.d.ts → provider-runner-BUunikwY.d.ts} +1 -1
- package/dist/sdd/index.d.ts +11 -6
- package/dist/sdd/index.js +124 -5
- package/dist/sdd/index.js.map +1 -1
- package/dist/{session-event-bridge-IVzs2GpE.d.ts → session-event-bridge-BpJ5trO9.d.ts} +1 -1
- package/dist/{skill-BJxzIyyN.d.ts → skill-Bj6Ezqb8.d.ts} +1 -1
- package/dist/skills/index.d.ts +1 -1
- package/dist/spec-TBi3Jr6T.d.ts +78 -0
- package/dist/storage/index.d.ts +21 -9
- package/dist/storage/index.js +157 -14
- package/dist/storage/index.js.map +1 -1
- package/dist/task-format-vGOIftmK.d.ts +23 -0
- package/dist/task-graph-u1q9Jkyk.d.ts +84 -0
- package/dist/types/index.d.ts +15 -14
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.js +110 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/tech-stack/SKILL.md +177 -0
- package/dist/task-graph-DJBqO0EY.d.ts +0 -161
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { T as TaskType, a as TaskPriority, b as TaskStatus, c as TaskProgress } from './task-graph-u1q9Jkyk.js';
|
|
2
|
+
|
|
3
|
+
interface TaskItem {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string | undefined;
|
|
7
|
+
type: TaskType;
|
|
8
|
+
priority: TaskPriority;
|
|
9
|
+
status: TaskStatus;
|
|
10
|
+
/** IDs of tasks this one depends on. */
|
|
11
|
+
dependsOn?: string[] | undefined;
|
|
12
|
+
/** Agent/subagent name assigned to this task. */
|
|
13
|
+
assignee?: string | undefined;
|
|
14
|
+
estimateHours?: number | undefined;
|
|
15
|
+
tags?: string[] | undefined;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
}
|
|
19
|
+
declare function computeTaskItemProgress(tasks: TaskItem[]): TaskProgress;
|
|
20
|
+
declare function formatTaskProgress(tasks: TaskItem[]): string;
|
|
21
|
+
declare function formatTaskList(tasks: TaskItem[]): string;
|
|
22
|
+
|
|
23
|
+
export { type TaskItem as T, formatTaskProgress as a, computeTaskItemProgress as c, formatTaskList as f };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
type TaskStatus = 'pending' | 'in_progress' | 'blocked' | 'failed' | 'review' | 'completed';
|
|
2
|
+
type TaskPriority = 'critical' | 'high' | 'medium' | 'low';
|
|
3
|
+
type TaskType = 'feature' | 'bugfix' | 'refactor' | 'docs' | 'test' | 'chore';
|
|
4
|
+
interface TaskNode {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
type: TaskType;
|
|
9
|
+
priority: TaskPriority;
|
|
10
|
+
status: TaskStatus;
|
|
11
|
+
assignee?: string | undefined;
|
|
12
|
+
estimateHours?: number | undefined;
|
|
13
|
+
actualHours?: number | undefined;
|
|
14
|
+
tags?: string[] | undefined;
|
|
15
|
+
specRequirementId?: string | undefined;
|
|
16
|
+
parentId?: string | undefined;
|
|
17
|
+
children?: string[] | undefined;
|
|
18
|
+
createdAt: number;
|
|
19
|
+
updatedAt: number;
|
|
20
|
+
startedAt?: number | undefined;
|
|
21
|
+
completedAt?: number | undefined;
|
|
22
|
+
metadata?: Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
interface TaskEdge {
|
|
25
|
+
id: string;
|
|
26
|
+
from: string;
|
|
27
|
+
to: string;
|
|
28
|
+
type: 'blocks' | 'depends_on' | 'relates_to' | 'implements';
|
|
29
|
+
weight?: number | undefined;
|
|
30
|
+
}
|
|
31
|
+
interface TaskGraph {
|
|
32
|
+
id: string;
|
|
33
|
+
specId: string;
|
|
34
|
+
title: string;
|
|
35
|
+
nodes: Map<string, TaskNode>;
|
|
36
|
+
edges: TaskEdge[];
|
|
37
|
+
rootNodes: string[];
|
|
38
|
+
createdAt: number;
|
|
39
|
+
updatedAt: number;
|
|
40
|
+
}
|
|
41
|
+
interface TaskDependency {
|
|
42
|
+
taskId: string;
|
|
43
|
+
blockedBy: string[];
|
|
44
|
+
blocking: string[];
|
|
45
|
+
}
|
|
46
|
+
interface TaskAssignment {
|
|
47
|
+
taskId: string;
|
|
48
|
+
assignee: string;
|
|
49
|
+
assignedAt: number;
|
|
50
|
+
}
|
|
51
|
+
interface TaskProgress {
|
|
52
|
+
total: number;
|
|
53
|
+
pending: number;
|
|
54
|
+
inProgress: number;
|
|
55
|
+
blocked: number;
|
|
56
|
+
failed: number;
|
|
57
|
+
review: number;
|
|
58
|
+
completed: number;
|
|
59
|
+
percentComplete: number;
|
|
60
|
+
estimatedHours: number;
|
|
61
|
+
actualHours: number;
|
|
62
|
+
}
|
|
63
|
+
interface TaskFilter {
|
|
64
|
+
status?: TaskStatus[] | undefined;
|
|
65
|
+
priority?: TaskPriority[] | undefined;
|
|
66
|
+
type?: TaskType[] | undefined;
|
|
67
|
+
assignee?: string[] | undefined;
|
|
68
|
+
tags?: string[] | undefined;
|
|
69
|
+
specRequirementId?: string | undefined;
|
|
70
|
+
}
|
|
71
|
+
interface TaskSort {
|
|
72
|
+
field: 'priority' | 'createdAt' | 'updatedAt' | 'status';
|
|
73
|
+
direction: 'asc' | 'desc';
|
|
74
|
+
}
|
|
75
|
+
interface CriticalPathResult {
|
|
76
|
+
taskIds: string[];
|
|
77
|
+
totalEstimateHours: number;
|
|
78
|
+
bottleneckTasks: string[];
|
|
79
|
+
}
|
|
80
|
+
declare function computeTaskProgress(graph: TaskGraph): TaskProgress;
|
|
81
|
+
declare function findCriticalPath(graph: TaskGraph): CriticalPathResult;
|
|
82
|
+
declare function topologicalSort(graph: TaskGraph): string[];
|
|
83
|
+
|
|
84
|
+
export { type CriticalPathResult as C, type TaskType as T, type TaskPriority as a, type TaskStatus as b, type TaskProgress as c, type TaskGraph as d, type TaskNode as e, type TaskAssignment as f, type TaskDependency as g, type TaskEdge as h, type TaskFilter as i, type TaskSort as j, computeTaskProgress as k, findCriticalPath as l, topologicalSort as t };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { A as AgentError, k as Capabilities, u as ConfigError, g as ContentBlock, E as ERROR_CODES, w as ErrorCode, x as ErrorSeverity, y as ErrorSubsystem, F as FileSnapshot, z as FsError, I as ImageBlock, J as JSONSchema, M as Message, B as MessageRole, f as Permission, D as PluginError, P as Provider, e as ProviderError, G as ProviderErrorBody, R as Request, b as Response, p as ResumedSession, K as RiskTier, q as SessionData, N as SessionError, S as SessionEvent, h as SessionMetadata, i as SessionStore, r as SessionSummary, a as SessionWriter, V as StopReason, W as StreamEvent, l as TextBlock, X as ThinkingBlock, T as Tool, Y as ToolCallContext, Z as ToolError, _ as ToolFinalEvent, j as ToolProgressEvent, n as ToolResultBlock, $ as ToolStreamEvent, m as ToolUseBlock, U as Usage, a0 as WrongStackError, a1 as asBlocks, a2 as asText, a4 as isAgentError, a5 as isConfigError, a6 as isFsError, a7 as isImageBlock, a8 as isPluginError, a9 as isSessionError, aa as isTextBlock, ab as isThinkingBlock, ac as isToolError, ad as isToolResultBlock, ae as isToolUseBlock, af as isWrongStackError, ag as toWrongStackError } from '../context-CNRYfhUv.js';
|
|
2
|
-
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-
|
|
3
|
-
export { A as AutonomyConfig,
|
|
2
|
+
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-BUunikwY.js';
|
|
3
|
+
export { A as AutonomyConfig, k as CONTEXT_WINDOW_MODES, d as Config, f as ConfigLoader, e as ConfigStore, l as ContextConfig, C as ContextWindowAggressiveOn, m as ContextWindowConfigLike, n as ContextWindowMode, o as ContextWindowModeId, c as ContextWindowPolicy, p as ContextWindowThresholds, q as CustomModelDefinition, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, b as HookEntry, H as HookEvent, i as HookInput, a as HookMatcher, j as HookOutcome, I as InProcessHook, r as IndexingConfig, L as LaunchConfig, s as LogConfig, M as MCPServerConfig, h as ModelMatrixEntry, P as PluginConfig, t as ProviderApiKey, u as ProviderConfig, v as SessionLoggingConfig, S as ShellHook, w as SyncCategory, g as SyncConfig, T as ToolsConfig, x as formatContextWindowModeList, y as getContextWindowMode, z as isContextWindowModeId, B as listContextWindowModes, E as resolveContextWindowPolicy } from '../config-BSU-6vah.js';
|
|
4
4
|
export { a as CompactReport, C as Compactor } from '../compactor-DXLxLcmU.js';
|
|
5
5
|
export { a as PermissionDecision, P as PermissionPolicy, T as TrustPolicy } from '../permission-BDv7z0mk.js';
|
|
6
6
|
export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as SessionRewinder } from '../session-rewinder-C9HnMkhP.js';
|
|
@@ -8,27 +8,28 @@ export { a as AddAttachmentInput, c as Attachment, d as AttachmentKind, e as Att
|
|
|
8
8
|
export { D as DEFAULT_AUTONOMY_CONFIG, a as DEFAULT_CONTEXT_CONFIG, b as DEFAULT_SESSION_LOGGING_CONFIG, c as DEFAULT_SESSION_PRUNE_DAYS, d as DEFAULT_TOOLS_CONFIG } from '../default-config-CXsDvOmP.js';
|
|
9
9
|
export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from '../secret-vault-DrOhc2i5.js';
|
|
10
10
|
export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-B9J5puGM.js';
|
|
11
|
-
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-
|
|
12
|
-
export { p as MEMORY_TYPE_LABELS, q as MemoryClearedPayload, r as MemoryConsolidatedPayload, k as MemoryEntry, s as MemoryForgottenPayload, t as MemoryPriority, m as MemoryRelevanceContext, u as MemoryRememberedPayload, M as MemoryScope, l as MemoryStore, v as MemoryType, S as ScoredEntry } from '../brain-
|
|
13
|
-
import { I as IterationStage,
|
|
14
|
-
export { C as CompactorOptions,
|
|
15
|
-
export {
|
|
16
|
-
export { B as BuildContext,
|
|
11
|
+
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-DDJiMAtX.js';
|
|
12
|
+
export { p as MEMORY_TYPE_LABELS, q as MemoryClearedPayload, r as MemoryConsolidatedPayload, k as MemoryEntry, s as MemoryForgottenPayload, t as MemoryPriority, m as MemoryRelevanceContext, u as MemoryRememberedPayload, M as MemoryScope, l as MemoryStore, v as MemoryType, S as ScoredEntry } from '../brain-Dfv4Y82E.js';
|
|
13
|
+
import { I as IterationStage, f as ParallelIterationStage } from '../parallel-eternal-engine-CUtmM_0V.js';
|
|
14
|
+
export { C as CompactorOptions, g as DEFAULT_RECOVERY_STRATEGIES, D as DefaultErrorHandler, a as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from '../parallel-eternal-engine-CUtmM_0V.js';
|
|
15
|
+
export { b as SkillEntry, S as SkillLoader, a as SkillManifest } from '../skill-Bj6Ezqb8.js';
|
|
16
|
+
export { B as BuildContext, b as ModelCapabilities, a as Renderer, S as SystemPromptBuilder } from '../pipeline-BqiA_UMr.js';
|
|
17
17
|
export { I as InputReader, P as PromptOption } from '../input-reader-E-ffP2ee.js';
|
|
18
|
-
export {
|
|
18
|
+
export { O as CoordinatorEvents, C as CoordinatorStatus, D as DoneCondition, I as MCPRegistryView, L as MetricsSinkView, c as MultiAgentConfig, M as MultiAgentCoordinator, N as Plugin, P as PluginAPI, Q as PluginCapabilities, R as PluginDependency, E as PluginPipelines, _ as ProviderFactory, H as ProviderRegistryView, K as SessionWriterView, z as SlashCommand, J as SlashCommandRegistryView, e as SpawnResult, S as SubagentConfig, U as SubagentContext, V as SubagentError, W as SubagentErrorKind, X as SubagentRunContext, Y as SubagentRunOutcome, d as SubagentRunner, Z as TaskDelegation, f as TaskResult, T as TaskSpec, G as ToolRegistryView } from '../agent-subagent-runner-DukQLUcS.js';
|
|
19
19
|
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-DU64QxQa.js';
|
|
20
20
|
export { D as DEFAULT_MODES, a as Mode, b as ModeConfig, c as ModeManifest, M as ModeStore } from '../mode-ARA3HrkY.js';
|
|
21
|
-
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-
|
|
22
|
-
export {
|
|
21
|
+
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-mOxbpFcg.js';
|
|
22
|
+
export { D as DEFAULT_SPEC_TEMPLATE, S as SpecAnalysis, a as SpecApiEndpoint, b as SpecRequirement, c as SpecSection, d as SpecSectionType, e as SpecStatus, f as SpecTemplate, g as SpecValidationResult, h as Specification } from '../spec-TBi3Jr6T.js';
|
|
23
|
+
export { C as CriticalPathResult, f as TaskAssignment, g as TaskDependency, h as TaskEdge, i as TaskFilter, d as TaskGraph, e as TaskNode, a as TaskPriority, c as TaskProgress, j as TaskSort, b as TaskStatus, T as TaskType, k as computeTaskProgress, l as findCriticalPath, t as topologicalSort } from '../task-graph-u1q9Jkyk.js';
|
|
23
24
|
export { A as AggregateHealth, a as HealthCheck, b as HealthCheckResult, H as HealthRegistry, c as HealthStatus, d as MetricLabels, e as MetricSeries, M as MetricsSink, f as MetricsSnapshot, S as Span, T as Tracer } from '../observability-D-HZN_mF.js';
|
|
24
|
-
export { S as SystemPromptContributor } from '../index-
|
|
25
|
+
export { S as SystemPromptContributor } from '../index-DIKEcfgC.js';
|
|
25
26
|
import '../logger-B63L5bTg.js';
|
|
26
27
|
import '../retry-policy-BcmuT_V0.js';
|
|
27
28
|
import '../models-registry-B6_KfS65.js';
|
|
28
29
|
import '../secret-vault-DoISxaKO.js';
|
|
29
30
|
import '../path-resolver-CPRj4bFY.js';
|
|
30
|
-
import '../goal-store-
|
|
31
|
-
import '../multi-agent-coordinator-
|
|
31
|
+
import '../goal-store-ht0VmR1A.js';
|
|
32
|
+
import '../multi-agent-coordinator-51LvnXkD.js';
|
|
32
33
|
import 'node:events';
|
|
33
34
|
|
|
34
35
|
/** Union of serial and parallel autonomy engine stage types (from EternalAutonomyEngine / ParallelEternalEngine). */
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { s as TodoItem, M as Message, J as JSONSchema } from '../context-CNRYfhUv.js';
|
|
2
|
+
export { T as TaskItem, c as computeTaskItemProgress, f as formatTaskList, a as formatTaskProgress } from '../task-format-vGOIftmK.js';
|
|
2
3
|
export { a as WstackPathOptions, W as WstackPaths, p as projectHash, b as projectSlug, r as resolveWstackPaths } from '../wstack-paths-_lqjzErq.js';
|
|
3
4
|
export { expectDefined } from './expect-defined.js';
|
|
4
5
|
import { a as ModelsDevPayload } from '../models-registry-B6_KfS65.js';
|
|
5
|
-
import { q as CustomModelDefinition } from '../config-
|
|
6
|
+
import { q as CustomModelDefinition } from '../config-BSU-6vah.js';
|
|
7
|
+
export { a as TaskPriority, b as TaskStatus, T as TaskType } from '../task-graph-u1q9Jkyk.js';
|
|
6
8
|
|
|
7
9
|
interface AtomicWriteOptions {
|
|
8
10
|
mode?: number | undefined;
|
package/dist/utils/index.js
CHANGED
|
@@ -364,6 +364,115 @@ function formatTodosList(todos) {
|
|
|
364
364
|
return lines.join("\n");
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
+
// src/utils/task-format.ts
|
|
368
|
+
function computeTaskItemProgress(tasks) {
|
|
369
|
+
let completed = 0;
|
|
370
|
+
let pending = 0;
|
|
371
|
+
let inProgress = 0;
|
|
372
|
+
let blocked = 0;
|
|
373
|
+
let failed = 0;
|
|
374
|
+
let review = 0;
|
|
375
|
+
let estimatedHours = 0;
|
|
376
|
+
let actualHours = 0;
|
|
377
|
+
for (const t of tasks) {
|
|
378
|
+
switch (t.status) {
|
|
379
|
+
case "completed":
|
|
380
|
+
completed++;
|
|
381
|
+
break;
|
|
382
|
+
case "pending":
|
|
383
|
+
pending++;
|
|
384
|
+
break;
|
|
385
|
+
case "in_progress":
|
|
386
|
+
inProgress++;
|
|
387
|
+
break;
|
|
388
|
+
case "blocked":
|
|
389
|
+
blocked++;
|
|
390
|
+
break;
|
|
391
|
+
case "failed":
|
|
392
|
+
failed++;
|
|
393
|
+
break;
|
|
394
|
+
case "review":
|
|
395
|
+
review++;
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
estimatedHours += t.estimateHours ?? 0;
|
|
399
|
+
}
|
|
400
|
+
return {
|
|
401
|
+
total: tasks.length,
|
|
402
|
+
pending,
|
|
403
|
+
inProgress,
|
|
404
|
+
blocked,
|
|
405
|
+
failed,
|
|
406
|
+
review,
|
|
407
|
+
completed,
|
|
408
|
+
percentComplete: tasks.length > 0 ? Math.round(completed / tasks.length * 100) : 0,
|
|
409
|
+
estimatedHours,
|
|
410
|
+
actualHours
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
var STATUS_ICON = {
|
|
414
|
+
pending: "\u25CB",
|
|
415
|
+
in_progress: "\u25D0",
|
|
416
|
+
blocked: "\u2298",
|
|
417
|
+
failed: "\u2717",
|
|
418
|
+
review: "\u25D1",
|
|
419
|
+
completed: "\u25CF"
|
|
420
|
+
};
|
|
421
|
+
var PRIORITY_ICON = {
|
|
422
|
+
critical: "\u{1F534}",
|
|
423
|
+
high: "\u{1F7E0}",
|
|
424
|
+
medium: "\u{1F7E1}",
|
|
425
|
+
low: "\u{1F7E2}"
|
|
426
|
+
};
|
|
427
|
+
var TYPE_ICON = {
|
|
428
|
+
feature: "\u26A1",
|
|
429
|
+
bugfix: "\u{1F41B}",
|
|
430
|
+
refactor: "\u267B\uFE0F",
|
|
431
|
+
docs: "\u{1F4DD}",
|
|
432
|
+
test: "\u{1F9EA}",
|
|
433
|
+
chore: "\u{1F527}"
|
|
434
|
+
};
|
|
435
|
+
function formatTaskProgress(tasks) {
|
|
436
|
+
const p = computeTaskItemProgress(tasks);
|
|
437
|
+
if (p.total === 0) return "No tasks.";
|
|
438
|
+
const barWidth = 24;
|
|
439
|
+
const filled = Math.round(p.percentComplete / 100 * barWidth);
|
|
440
|
+
const empty = barWidth - filled;
|
|
441
|
+
const bar = "\u2588".repeat(filled) + "\u2591".repeat(empty);
|
|
442
|
+
return [
|
|
443
|
+
`${color.bold("Tasks")} [${bar}] ${p.percentComplete}%`,
|
|
444
|
+
` ${color.green("\u25CF")} ${p.completed} done \u2502 ${color.yellow("\u25D0")} ${p.inProgress} active \u2502 ${color.dim("\u25CB")} ${p.pending} pending \u2502 \u2298 ${p.blocked} blocked \u2502 \u2717 ${p.failed} failed`,
|
|
445
|
+
p.estimatedHours > 0 ? ` ${color.dim(`est. ${p.estimatedHours}h`)}` : ""
|
|
446
|
+
].filter(Boolean).join("\n");
|
|
447
|
+
}
|
|
448
|
+
function formatTaskList(tasks) {
|
|
449
|
+
if (tasks.length === 0) return "No tasks.";
|
|
450
|
+
const order = ["in_progress", "blocked", "review", "pending", "failed", "completed"];
|
|
451
|
+
const groups = /* @__PURE__ */ new Map();
|
|
452
|
+
for (const t of tasks) {
|
|
453
|
+
const list = groups.get(t.status) ?? [];
|
|
454
|
+
list.push(t);
|
|
455
|
+
groups.set(t.status, list);
|
|
456
|
+
}
|
|
457
|
+
const lines = [];
|
|
458
|
+
lines.push(color.dim(`Tasks (${tasks.length} total):`));
|
|
459
|
+
for (const status of order) {
|
|
460
|
+
const group = groups.get(status);
|
|
461
|
+
if (!group || group.length === 0) continue;
|
|
462
|
+
const icon = STATUS_ICON[status];
|
|
463
|
+
lines.push(` ${icon} ${status.toUpperCase()} (${group.length})`);
|
|
464
|
+
for (const t of group) {
|
|
465
|
+
const prio = PRIORITY_ICON[t.priority];
|
|
466
|
+
const type = TYPE_ICON[t.type];
|
|
467
|
+
const deps = t.dependsOn && t.dependsOn.length > 0 ? ` ${color.dim("\u2190")} ${color.dim(t.dependsOn.map((d) => d.slice(0, 8)).join(", "))}` : "";
|
|
468
|
+
const who = t.assignee ? ` ${color.dim(`@${t.assignee}`)}` : "";
|
|
469
|
+
const hrs = t.estimateHours ? ` ${color.dim(`${t.estimateHours}h`)}` : "";
|
|
470
|
+
lines.push(` ${type} ${prio} ${t.title}${deps}${who}${hrs}`);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
return lines.join("\n");
|
|
474
|
+
}
|
|
475
|
+
|
|
367
476
|
// src/utils/expect-defined.ts
|
|
368
477
|
function expectDefined(value, label) {
|
|
369
478
|
if (value === null || value === void 0) {
|
|
@@ -1428,6 +1537,6 @@ function mergeCustomModelDefs(providerCustomModels, configModels) {
|
|
|
1428
1537
|
return out;
|
|
1429
1538
|
}
|
|
1430
1539
|
|
|
1431
|
-
export { atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, completePartialObject, createToolOutputSerializer, detectNewlineStyle, ensureDir, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, expandGlob, expectDefined, formatTodosList, getCalibrationState, getTermSize, isInteractive, isStdinTTY, isStdoutTTY, matchAny, matchGlob, mergeCustomModelDefs, mergeModelsPayload, normalizeToLf, onResize, projectHash, projectSlug, recordActualUsage, repairToolUseAdjacency, resetCalibration, resolveWstackPaths, safeParse, safeStringify, sanitizeJsonString, setOutputLineGuard, setRawMode, sleep, stripAnsi, toStyle, unifiedDiff, validateAgainstSchema, withFileLock, writeErr, writeOut };
|
|
1540
|
+
export { atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, completePartialObject, computeTaskItemProgress, createToolOutputSerializer, detectNewlineStyle, ensureDir, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, expandGlob, expectDefined, formatTaskList, formatTaskProgress, formatTodosList, getCalibrationState, getTermSize, isInteractive, isStdinTTY, isStdoutTTY, matchAny, matchGlob, mergeCustomModelDefs, mergeModelsPayload, normalizeToLf, onResize, projectHash, projectSlug, recordActualUsage, repairToolUseAdjacency, resetCalibration, resolveWstackPaths, safeParse, safeStringify, sanitizeJsonString, setOutputLineGuard, setRawMode, sleep, stripAnsi, toStyle, unifiedDiff, validateAgainstSchema, withFileLock, writeErr, writeOut };
|
|
1432
1541
|
//# sourceMappingURL=index.js.map
|
|
1433
1542
|
//# sourceMappingURL=index.js.map
|