byterover-cli 3.11.0 → 3.13.0
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/.env.production +2 -1
- package/dist/agent/infra/tools/implementations/curate-tool.js +18 -8
- package/dist/oclif/commands/curate/index.js +6 -0
- package/dist/oclif/commands/providers/connect.d.ts +26 -1
- package/dist/oclif/commands/providers/connect.js +95 -17
- package/dist/oclif/commands/providers/list.d.ts +10 -1
- package/dist/oclif/commands/providers/list.js +35 -3
- package/dist/oclif/commands/query.js +6 -0
- package/dist/oclif/commands/status.js +4 -0
- package/dist/oclif/lib/billing-line.d.ts +8 -0
- package/dist/oclif/lib/billing-line.js +45 -0
- package/dist/oclif/lib/format-billing-line.d.ts +2 -0
- package/dist/oclif/lib/format-billing-line.js +19 -0
- package/dist/oclif/lib/insufficient-credits.d.ts +11 -0
- package/dist/oclif/lib/insufficient-credits.js +36 -0
- package/dist/server/config/environment.d.ts +1 -0
- package/dist/server/config/environment.js +3 -0
- package/dist/server/constants.d.ts +6 -0
- package/dist/server/constants.js +11 -0
- package/dist/server/core/domain/entities/task-history-entry.d.ts +775 -0
- package/dist/server/core/domain/entities/task-history-entry.js +88 -0
- package/dist/server/core/domain/transport/schemas.d.ts +1420 -11
- package/dist/server/core/domain/transport/schemas.js +160 -6
- package/dist/server/core/domain/transport/task-info.d.ts +18 -0
- package/dist/server/core/interfaces/process/i-task-lifecycle-hook.d.ts +7 -0
- package/dist/server/core/interfaces/services/i-billing-service.d.ts +26 -0
- package/dist/server/core/interfaces/services/i-billing-service.js +1 -0
- package/dist/server/core/interfaces/storage/i-billing-config-store.d.ts +4 -0
- package/dist/server/core/interfaces/storage/i-billing-config-store.js +1 -0
- package/dist/server/core/interfaces/storage/i-task-history-store.d.ts +62 -0
- package/dist/server/core/interfaces/storage/i-task-history-store.js +1 -0
- package/dist/server/infra/billing/billing-state-endpoint.d.ts +4 -0
- package/dist/server/infra/billing/billing-state-endpoint.js +7 -0
- package/dist/server/infra/billing/build-status-billing.d.ts +9 -0
- package/dist/server/infra/billing/build-status-billing.js +36 -0
- package/dist/server/infra/billing/http-billing-service.d.ts +19 -0
- package/dist/server/infra/billing/http-billing-service.js +57 -0
- package/dist/server/infra/billing/paid-organizations-endpoint.d.ts +8 -0
- package/dist/server/infra/billing/paid-organizations-endpoint.js +18 -0
- package/dist/server/infra/billing/resolve-billing-source.d.ts +13 -0
- package/dist/server/infra/billing/resolve-billing-source.js +36 -0
- package/dist/server/infra/billing/resolve-billing-team.d.ts +5 -0
- package/dist/server/infra/billing/resolve-billing-team.js +8 -0
- package/dist/server/infra/connectors/rules/rules-connector.js +7 -2
- package/dist/server/infra/connectors/shared/constants.d.ts +9 -0
- package/dist/server/infra/connectors/shared/constants.js +31 -5
- package/dist/server/infra/daemon/agent-process.js +10 -8
- package/dist/server/infra/daemon/brv-server.js +48 -18
- package/dist/server/infra/dream/dream-response-schemas.d.ts +24 -0
- package/dist/server/infra/dream/dream-response-schemas.js +7 -0
- package/dist/server/infra/dream/operations/consolidate.js +21 -8
- package/dist/server/infra/dream/operations/synthesize.js +35 -8
- package/dist/server/infra/http/provider-model-fetchers.js +10 -4
- package/dist/server/infra/process/feature-handlers.d.ts +3 -1
- package/dist/server/infra/process/feature-handlers.js +26 -2
- package/dist/server/infra/process/task-history-entry-builder.d.ts +36 -0
- package/dist/server/infra/process/task-history-entry-builder.js +101 -0
- package/dist/server/infra/process/task-history-hook.d.ts +37 -0
- package/dist/server/infra/process/task-history-hook.js +70 -0
- package/dist/server/infra/process/task-history-store-cache.d.ts +25 -0
- package/dist/server/infra/process/task-history-store-cache.js +106 -0
- package/dist/server/infra/process/task-router.d.ts +72 -0
- package/dist/server/infra/process/task-router.js +690 -15
- package/dist/server/infra/process/transport-handlers.d.ts +8 -0
- package/dist/server/infra/process/transport-handlers.js +2 -0
- package/dist/server/infra/storage/file-billing-config-store.d.ts +13 -0
- package/dist/server/infra/storage/file-billing-config-store.js +55 -0
- package/dist/server/infra/storage/file-task-history-store.d.ts +294 -0
- package/dist/server/infra/storage/file-task-history-store.js +912 -0
- package/dist/server/infra/transport/handlers/auth-handler.d.ts +4 -0
- package/dist/server/infra/transport/handlers/auth-handler.js +20 -2
- package/dist/server/infra/transport/handlers/billing-handler.d.ts +30 -0
- package/dist/server/infra/transport/handlers/billing-handler.js +132 -0
- package/dist/server/infra/transport/handlers/index.d.ts +4 -0
- package/dist/server/infra/transport/handlers/index.js +2 -0
- package/dist/server/infra/transport/handlers/init-handler.js +2 -0
- package/dist/server/infra/transport/handlers/status-handler.d.ts +14 -0
- package/dist/server/infra/transport/handlers/status-handler.js +16 -0
- package/dist/server/infra/transport/handlers/team-handler.d.ts +19 -0
- package/dist/server/infra/transport/handlers/team-handler.js +40 -0
- package/dist/shared/transport/events/auth-events.d.ts +3 -0
- package/dist/shared/transport/events/billing-events.d.ts +48 -0
- package/dist/shared/transport/events/billing-events.js +8 -0
- package/dist/shared/transport/events/index.d.ts +16 -0
- package/dist/shared/transport/events/index.js +6 -0
- package/dist/shared/transport/events/task-events.d.ts +204 -1
- package/dist/shared/transport/events/task-events.js +11 -0
- package/dist/shared/transport/events/team-events.d.ts +8 -0
- package/dist/shared/transport/events/team-events.js +3 -0
- package/dist/shared/transport/types/dto.d.ts +80 -0
- package/dist/tui/features/tasks/hooks/use-task-subscriptions.js +7 -0
- package/dist/tui/features/tasks/stores/tasks-store.d.ts +4 -16
- package/dist/tui/features/tasks/stores/tasks-store.js +7 -0
- package/dist/tui/types/messages.d.ts +2 -9
- package/dist/webui/assets/index-B9JmEFOK.js +130 -0
- package/dist/webui/assets/index-CMIKsBMr.css +1 -0
- package/dist/webui/index.html +2 -2
- package/dist/webui/sw.js +1 -1
- package/oclif.manifest.json +653 -645
- package/package.json +1 -1
- package/dist/webui/assets/index--sXE__bc.css +0 -1
- package/dist/webui/assets/index-Bkkx961b.js +0 -130
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task History Entry — Level 2 schema (full per-task detail).
|
|
3
|
+
*
|
|
4
|
+
* Persisted shape used by `FileTaskHistoryStore` (M2.02+) to keep a
|
|
5
|
+
* per-project journal of every task. Includes provider/model snapshot
|
|
6
|
+
* (M1) plus accumulated llmservice details — response, reasoning,
|
|
7
|
+
* tool calls — so the Web UI can re-render a complete task detail
|
|
8
|
+
* after daemon restart.
|
|
9
|
+
*
|
|
10
|
+
* Discriminated union on `status`:
|
|
11
|
+
* - `created`: just queued, agent has not picked up yet.
|
|
12
|
+
* - `started`: agent acknowledged, `startedAt` set.
|
|
13
|
+
* - `completed` | `error` | `cancelled`: terminal — `completedAt` set.
|
|
14
|
+
*
|
|
15
|
+
* The TS shape lives in `shared/transport/events/task-events.ts` so the
|
|
16
|
+
* web UI can consume it without webui→server boundary inversion. The
|
|
17
|
+
* Zod schema below is the runtime source of truth and carries
|
|
18
|
+
* `satisfies z.ZodType<TaskHistoryEntry>` so any drift between the
|
|
19
|
+
* type and the schema is a typecheck error.
|
|
20
|
+
*/
|
|
21
|
+
import { z } from 'zod';
|
|
22
|
+
import { TASK_HISTORY_SCHEMA_VERSION } from '../../../../shared/transport/events/task-events.js';
|
|
23
|
+
export { TASK_HISTORY_SCHEMA_VERSION } from '../../../../shared/transport/events/task-events.js';
|
|
24
|
+
// Inlined to break a transport/schemas.ts <-> entities/ circular import.
|
|
25
|
+
// Mirrors `TaskErrorDataSchema` in transport/schemas.ts; both must stay in sync.
|
|
26
|
+
const TaskErrorDataSchema = z.object({
|
|
27
|
+
code: z.string().optional(),
|
|
28
|
+
details: z.record(z.unknown()).optional(),
|
|
29
|
+
message: z.string(),
|
|
30
|
+
name: z.string(),
|
|
31
|
+
});
|
|
32
|
+
export const ToolCallEventSchema = z.object({
|
|
33
|
+
args: z.record(z.unknown()),
|
|
34
|
+
callId: z.string().optional(),
|
|
35
|
+
error: z.string().optional(),
|
|
36
|
+
errorType: z.string().optional(),
|
|
37
|
+
result: z.unknown().optional(),
|
|
38
|
+
sessionId: z.string(),
|
|
39
|
+
status: z.enum(['completed', 'error', 'running']),
|
|
40
|
+
timestamp: z.number(),
|
|
41
|
+
toolName: z.string(),
|
|
42
|
+
});
|
|
43
|
+
export const ReasoningContentItemSchema = z.object({
|
|
44
|
+
content: z.string(),
|
|
45
|
+
isThinking: z.boolean().optional(),
|
|
46
|
+
timestamp: z.number(),
|
|
47
|
+
});
|
|
48
|
+
const TaskHistoryEntryBaseSchema = z.object({
|
|
49
|
+
clientCwd: z.string().optional(),
|
|
50
|
+
content: z.string(),
|
|
51
|
+
createdAt: z.number(),
|
|
52
|
+
files: z.array(z.string()).optional(),
|
|
53
|
+
folderPath: z.string().optional(),
|
|
54
|
+
id: z.string(),
|
|
55
|
+
logId: z.string().optional(),
|
|
56
|
+
model: z.string().optional(),
|
|
57
|
+
projectPath: z.string(),
|
|
58
|
+
provider: z.string().optional(),
|
|
59
|
+
reasoningContents: z.array(ReasoningContentItemSchema).optional(),
|
|
60
|
+
responseContent: z.string().optional(),
|
|
61
|
+
schemaVersion: z.literal(TASK_HISTORY_SCHEMA_VERSION),
|
|
62
|
+
sessionId: z.string().optional(),
|
|
63
|
+
taskId: z.string(),
|
|
64
|
+
toolCalls: z.array(ToolCallEventSchema).optional(),
|
|
65
|
+
type: z.string(),
|
|
66
|
+
worktreeRoot: z.string().optional(),
|
|
67
|
+
});
|
|
68
|
+
export const TaskHistoryEntrySchema = z.discriminatedUnion('status', [
|
|
69
|
+
TaskHistoryEntryBaseSchema.extend({ status: z.literal('created') }),
|
|
70
|
+
TaskHistoryEntryBaseSchema.extend({ startedAt: z.number(), status: z.literal('started') }),
|
|
71
|
+
TaskHistoryEntryBaseSchema.extend({
|
|
72
|
+
completedAt: z.number(),
|
|
73
|
+
result: z.string().optional(),
|
|
74
|
+
startedAt: z.number().optional(),
|
|
75
|
+
status: z.literal('completed'),
|
|
76
|
+
}),
|
|
77
|
+
TaskHistoryEntryBaseSchema.extend({
|
|
78
|
+
completedAt: z.number(),
|
|
79
|
+
error: TaskErrorDataSchema,
|
|
80
|
+
startedAt: z.number().optional(),
|
|
81
|
+
status: z.literal('error'),
|
|
82
|
+
}),
|
|
83
|
+
TaskHistoryEntryBaseSchema.extend({
|
|
84
|
+
completedAt: z.number(),
|
|
85
|
+
startedAt: z.number().optional(),
|
|
86
|
+
status: z.literal('cancelled'),
|
|
87
|
+
}),
|
|
88
|
+
]);
|