@crewx/sdk 0.9.0-rc.13 → 0.9.0-rc.130
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 +1 -1
- package/dist/account/auth-client.d.ts +61 -0
- package/dist/account/auth-json-v2.d.ts +1 -0
- package/dist/account/auth-json.d.ts +30 -0
- package/dist/account/config.d.ts +37 -0
- package/dist/account/env-bootstrap.d.ts +11 -0
- package/dist/account/errors.d.ts +24 -0
- package/dist/account/index.d.ts +12 -0
- package/dist/account/index.js +2 -0
- package/dist/account/session-manager.d.ts +47 -0
- package/dist/activity-log/builder.d.ts +56 -6
- package/dist/agent/agent-list-view.d.ts +19 -0
- package/dist/boxing/box.types.d.ts +4 -0
- package/dist/config/canonicalize-agent-options.d.ts +18 -0
- package/dist/config/default-agent-models.d.ts +11 -0
- package/dist/config/global-settings.d.ts +33 -0
- package/dist/config/migrate-grok-mode.d.ts +6 -0
- package/dist/config/model-compat.d.ts +31 -0
- package/dist/config/models.generated.d.ts +37 -0
- package/dist/config/models.remote.d.ts +1 -0
- package/dist/config/overdrive.d.ts +7 -0
- package/dist/config/pricing.d.ts +6 -3
- package/dist/config/pricing.generated.d.ts +4 -0
- package/dist/config/pricing.types.d.ts +4 -0
- package/dist/config/timeout.config.d.ts +4 -0
- package/dist/config/wi-boards.d.ts +19 -0
- package/dist/context-budget/continuity.d.ts +61 -0
- package/dist/context-budget/index.d.ts +141 -0
- package/dist/conversation/index.d.ts +1 -1
- package/dist/conversation/sqlite-provider.d.ts +6 -2
- package/dist/conversation/to-template-messages.d.ts +9 -0
- package/dist/conversation/types.d.ts +47 -1
- package/dist/desktop/command-runner.d.ts +4 -0
- package/dist/desktop/default-adapters.d.ts +4 -0
- package/dist/desktop/global-install.d.ts +19 -0
- package/dist/desktop/index.d.ts +3 -0
- package/dist/desktop/index.js +3 -0
- package/dist/desktop/install.d.ts +5 -0
- package/dist/desktop/lnk.d.ts +22 -0
- package/dist/desktop/manifest.d.ts +21 -0
- package/dist/desktop/types.d.ts +67 -0
- package/dist/desktop/version.d.ts +1 -0
- package/dist/desktop/windows-paths.d.ts +21 -0
- package/dist/desktop/wrapper.d.ts +18 -0
- package/dist/esm/account/index.js +2 -0
- package/dist/esm/desktop/index.js +3 -0
- package/dist/esm/index.js +931 -224
- package/dist/esm/node/index.js +2 -0
- package/dist/esm/plugins/index.js +338 -214
- package/dist/esm/process/index.js +1 -0
- package/dist/esm/publish/index.js +2 -0
- package/dist/esm/repository/index.js +413 -211
- package/dist/esm/skills/index.js +2 -0
- package/dist/esm/testing/index.js +1 -1
- package/dist/events/types.d.ts +9 -0
- package/dist/facade/Crewx.d.ts +58 -5
- package/dist/facade/task-ticket.d.ts +14 -0
- package/dist/highlight/thread-highlight-prompt.d.ts +2 -0
- package/dist/highlight/thread-highlighter.d.ts +326 -0
- package/dist/index.browser.d.ts +17 -1
- package/dist/index.browser.js +6 -2
- package/dist/index.d.ts +122 -17
- package/dist/index.js +931 -224
- package/dist/internal/console-decoder.d.ts +38 -0
- package/dist/internal/windows-spawn.d.ts +10 -0
- package/dist/layout/types.d.ts +18 -1
- package/dist/lifecycle/process-lease.d.ts +80 -0
- package/dist/lifecycle/process-owner.d.ts +20 -0
- package/dist/lifecycle/task-heartbeat.d.ts +41 -0
- package/dist/lifecycle/task-stop.d.ts +82 -0
- package/dist/lifecycle/update-admission.d.ts +45 -0
- package/dist/local-server/base-url.d.ts +18 -0
- package/dist/local-server/index.d.ts +8 -0
- package/dist/local-server/opencode.d.ts +8 -0
- package/dist/local-server/probe.d.ts +3 -0
- package/dist/local-server/runtime.d.ts +26 -0
- package/dist/local-server/types.d.ts +43 -0
- package/dist/mcp-app/agent-access.d.ts +26 -0
- package/dist/mcp-app/apps-context.d.ts +6 -0
- package/dist/mcp-app/bundle-provenance.d.ts +3 -0
- package/dist/mcp-app/catalog.d.ts +7 -0
- package/dist/mcp-app/content-channel.d.ts +89 -0
- package/dist/mcp-app/content-declarations.d.ts +29 -0
- package/dist/mcp-app/dev-checks.d.ts +28 -0
- package/dist/mcp-app/discovery.d.ts +139 -0
- package/dist/mcp-app/errors.d.ts +7 -0
- package/dist/mcp-app/index.d.ts +33 -0
- package/dist/mcp-app/installed-app-ref.d.ts +25 -0
- package/dist/mcp-app/model-context.d.ts +26 -0
- package/dist/mcp-app/node-app-discovery-fs.d.ts +20 -0
- package/dist/mcp-app/product-bundle-assets.d.ts +27 -0
- package/dist/mcp-app/product-bundle-loader.d.ts +53 -0
- package/dist/mcp-app/projection.d.ts +13 -0
- package/dist/mcp-app/registry.d.ts +28 -0
- package/dist/mcp-app/skill-backend.d.ts +133 -0
- package/dist/mcp-app/state-set.d.ts +9 -0
- package/dist/mcp-app/types.d.ts +458 -0
- package/dist/mcp-app/workspace-app-assets.d.ts +38 -0
- package/dist/mcp-app/workspace-snapshot.d.ts +70 -0
- package/dist/migrations/0010_analyze_stats.sql +6 -0
- package/dist/migrations/0011_far_black_tarantula.sql +1 -0
- package/dist/migrations/0012_blue_turbo.sql +23 -0
- package/dist/migrations/0013_hesitant_adam_destine.sql +15 -0
- package/dist/migrations/0014_organic_mongu.sql +73 -0
- package/dist/migrations/0015_panoramic_gorilla_man.sql +71 -0
- package/dist/migrations/0016_fuzzy_hemingway.sql +14 -0
- package/dist/migrations/0017_project_stage_sdk_migration.sql +29 -0
- package/dist/migrations/0018_bored_jackal.sql +33 -0
- package/dist/migrations/0019_backfill_task_thread_ids.sql +74 -0
- package/dist/migrations/0020_useful_iron_lad.sql +55 -0
- package/dist/migrations/0021_dashing_peter_quill.sql +51 -0
- package/dist/migrations/0022_wandering_bucky.sql +1 -0
- package/dist/migrations/0023_red_payback.sql +1 -0
- package/dist/migrations/0024_storage_metadata.sql +262 -0
- package/dist/migrations/0025_task_heartbeat.sql +8 -0
- package/dist/migrations/0025_thread_app_instance_ledger.sql +2 -0
- package/dist/migrations/0026_mcp_action_source.sql +47 -0
- package/dist/migrations/0027_task_stop_scope_cleanup.sql +5 -0
- package/dist/migrations/0027_ui_instance_active_unique.sql +2 -0
- package/dist/migrations/0029_nice_rhino.sql +1 -0
- package/dist/migrations/0031_petite_arclight.sql +6 -0
- package/dist/migrations/0032_ui_instance_opened_by.sql +1 -0
- package/dist/migrations/0033_thread_creator_boundary_guard.sql +38 -0
- package/dist/migrations/0034_keen_fallen_one.sql +36 -0
- package/dist/migrations/meta/0010_snapshot.json +1335 -0
- package/dist/migrations/meta/0011_snapshot.json +1342 -0
- package/dist/migrations/meta/0012_snapshot.json +1494 -0
- package/dist/migrations/meta/0013_snapshot.json +1592 -0
- package/dist/migrations/meta/0014_snapshot.json +1975 -0
- package/dist/migrations/meta/0015_snapshot.json +2315 -0
- package/dist/migrations/meta/0016_snapshot.json +2419 -0
- package/dist/migrations/meta/0017_snapshot.json +2419 -0
- package/dist/migrations/meta/0018_snapshot.json +2570 -0
- package/dist/migrations/meta/0020_snapshot.json +2895 -0
- package/dist/migrations/meta/0021_snapshot.json +3031 -0
- package/dist/migrations/meta/0022_snapshot.json +3039 -0
- package/dist/migrations/meta/0023_snapshot.json +3047 -0
- package/dist/migrations/meta/0029_snapshot.json +3206 -0
- package/dist/migrations/meta/0031_snapshot.json +3251 -0
- package/dist/migrations/meta/0034_snapshot.json +3473 -0
- package/dist/migrations/meta/_journal.json +175 -0
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +2 -0
- package/dist/paths.d.ts +1 -0
- package/dist/plugin/types.d.ts +1 -0
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +338 -214
- package/dist/plugins/sqlite-tracing.d.ts +46 -0
- package/dist/process/index.d.ts +2 -0
- package/dist/process/index.js +1 -0
- package/dist/process/process-control.d.ts +41 -0
- package/dist/prompt/tag-names.d.ts +20 -0
- package/dist/provider/acp/connection.d.ts +6 -0
- package/dist/provider/acp/meta.d.ts +11 -0
- package/dist/provider/bridge.d.ts +7 -1
- package/dist/provider/classify-task-error.d.ts +2 -0
- package/dist/provider/cli/adapter.types.d.ts +14 -2
- package/dist/provider/cli/adapters/agent-call.util.d.ts +1 -1
- package/dist/provider/cli/adapters/cli-knob.util.d.ts +7 -0
- package/dist/provider/cli/adapters/codex-item.d.ts +1 -0
- package/dist/provider/cli/adapters/event-timestamp.util.d.ts +1 -0
- package/dist/provider/cli/adapters/grok.d.ts +2 -0
- package/dist/provider/cli/adapters/index.d.ts +5 -0
- package/dist/provider/cli/index.d.ts +3 -2
- package/dist/provider/cli/meta.d.ts +5 -0
- package/dist/provider/cli/protocol-envelope.d.ts +3 -0
- package/dist/provider/errors.d.ts +5 -1
- package/dist/provider/idle-watchdog.d.ts +19 -0
- package/dist/provider/models.d.ts +17 -12
- package/dist/provider/order.d.ts +1 -1
- package/dist/provider/parse-usage.d.ts +6 -0
- package/dist/provider/provider-selection.d.ts +8 -0
- package/dist/provider/redact-technical-message.d.ts +1 -0
- package/dist/provider/task-error.types.d.ts +17 -0
- package/dist/publish/constants.d.ts +6 -0
- package/dist/publish/errors.d.ts +7 -0
- package/dist/publish/index.d.ts +50 -0
- package/dist/publish/index.js +2 -0
- package/dist/publish/manifest.d.ts +47 -0
- package/dist/publish/marketplace-api.constants.d.ts +1 -0
- package/dist/publish/pack.d.ts +6 -0
- package/dist/publish/scan.d.ts +9 -0
- package/dist/publish/secrets.d.ts +6 -0
- package/dist/publish/upload.d.ts +19 -0
- package/dist/remote/execution-profile.d.ts +9 -0
- package/dist/remote/index.d.ts +1 -0
- package/dist/remote/types.d.ts +28 -0
- package/dist/repository/agent-suggestion.repository.d.ts +34 -0
- package/dist/repository/base-sqlite-repository.d.ts +1 -0
- package/dist/repository/common-code.repository.d.ts +45 -0
- package/dist/repository/db.d.ts +12 -1
- package/dist/repository/index.d.ts +37 -5
- package/dist/repository/index.js +413 -211
- package/dist/repository/notification.repository.d.ts +58 -0
- package/dist/repository/project.repository.d.ts +90 -0
- package/dist/repository/request-log.repository.d.ts +1 -0
- package/dist/repository/storage-metadata.repository.d.ts +64 -0
- package/dist/repository/task-log-migration.d.ts +74 -0
- package/dist/repository/task-log.repository.d.ts +44 -0
- package/dist/repository/task-status.d.ts +14 -0
- package/dist/repository/task.repository.d.ts +224 -7
- package/dist/repository/thread-history.repository.d.ts +193 -0
- package/dist/repository/thread-origin-verdict.d.ts +27 -0
- package/dist/repository/thread-title.types.d.ts +29 -0
- package/dist/repository/thread.repository.d.ts +72 -6
- package/dist/repository/usage-backfill.d.ts +62 -0
- package/dist/repository/usage-from-logs.d.ts +21 -0
- package/dist/repository/workspace.repository.d.ts +3 -0
- package/dist/schema/agent-suggestions.d.ts +199 -0
- package/dist/schema/common-codes.d.ts +216 -0
- package/dist/schema/index.d.ts +11 -0
- package/dist/schema/notifications.d.ts +303 -0
- package/dist/schema/projects.d.ts +610 -0
- package/dist/schema/storage-metadata.d.ts +181 -0
- package/dist/schema/task-log-events.d.ts +119 -0
- package/dist/schema/tasks.d.ts +165 -0
- package/dist/schema/thread-creator-unverified.d.ts +45 -0
- package/dist/schema/thread-history.d.ts +734 -0
- package/dist/schema/threads.d.ts +59 -0
- package/dist/schema/ui-action-receipts.d.ts +358 -0
- package/dist/schema/ui-instance-repins.d.ts +222 -0
- package/dist/schema/ui-instances.d.ts +305 -0
- package/dist/schema/workspaces.d.ts +17 -0
- package/dist/skills/index.d.ts +15 -0
- package/dist/skills/index.js +2 -0
- package/dist/skills/types.d.ts +18 -0
- package/dist/task-log/anchor-child-tasks.d.ts +7 -0
- package/dist/task-log/delegation-trailer.d.ts +34 -0
- package/dist/template/engine.d.ts +2 -2
- package/dist/template/helpers/exec.browser.d.ts +4 -3
- package/dist/template/helpers/exec.d.ts +4 -3
- package/dist/template/types.d.ts +20 -0
- package/dist/testing/index.js +1 -1
- package/dist/types/index.d.ts +1572 -3
- package/dist/types/task-log.types.d.ts +2 -0
- package/dist/ui-card/index.d.ts +2 -0
- package/dist/ui-card/legacy-card-parser.d.ts +11 -0
- package/dist/ui-instance/definition.d.ts +6 -0
- package/dist/ui-instance/errors.d.ts +18 -0
- package/dist/ui-instance/index.d.ts +11 -0
- package/dist/ui-instance/json.d.ts +19 -0
- package/dist/ui-instance/lineage.d.ts +22 -0
- package/dist/ui-instance/runtime.d.ts +18 -0
- package/dist/ui-instance/store.d.ts +184 -0
- package/dist/ui-instance/types.d.ts +308 -0
- package/dist/ui-plugin/csp.d.ts +25 -0
- package/dist/ui-plugin/index.d.ts +4 -0
- package/dist/ui-plugin/limits.d.ts +27 -0
- package/dist/ui-plugin/manifest.d.ts +3 -0
- package/dist/ui-plugin/types.d.ts +190 -0
- package/dist/ui-plugin/validator.d.ts +15 -0
- package/dist/utils/crewx-executable.d.ts +76 -0
- package/dist/utils/crewx-home.d.ts +1 -0
- package/dist/utils/env-defaults.d.ts +2 -0
- package/dist/utils/id.d.ts +1 -1
- package/dist/utils/local-identity.d.ts +2 -0
- package/dist/utils/runner-env.d.ts +3 -0
- package/dist/utils/timestamp.d.ts +1 -0
- package/dist/utils/workspace.d.ts +1 -0
- package/dist/wi/create.d.ts +48 -0
- package/dist/wi/select.d.ts +20 -0
- package/package.json +49 -2
- package/templates/agents/default.yaml +284 -128
- package/templates/documents/crewx-manual.md +138 -138
- package/templates/documents/crewx-quick-guide.md +8 -7
- package/templates/workflows/wi-default-flow.yaml +65 -0
- package/templates/workflows/wi-plan-flow.yaml +140 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { BaseSqliteRepository } from './base-sqlite-repository.js';
|
|
2
|
+
import { RepositoryError } from './errors.js';
|
|
3
|
+
import type { ThreadActorType, ThreadEvent, ThreadHighlight, ThreadHighlightKind, ThreadHighlightRun, ThreadHighlightSource } from '../schema/index.js';
|
|
4
|
+
import type { ThreadPriority, ThreadState } from './thread-title.types.js';
|
|
5
|
+
export interface ThreadActorInput {
|
|
6
|
+
actorType?: ThreadActorType;
|
|
7
|
+
actorId?: string | null;
|
|
8
|
+
actor?: {
|
|
9
|
+
actorType?: ThreadActorType;
|
|
10
|
+
actorId?: string | null;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface ThreadSnapshotMutationInput extends ThreadActorInput {
|
|
14
|
+
threadId: string;
|
|
15
|
+
workspaceId?: string | null;
|
|
16
|
+
title?: string | null;
|
|
17
|
+
priority?: ThreadPriority | null;
|
|
18
|
+
state?: ThreadState | null;
|
|
19
|
+
taskId?: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface ThreadSnapshot {
|
|
22
|
+
threadId: string;
|
|
23
|
+
workspaceId: string | null;
|
|
24
|
+
title: string | null;
|
|
25
|
+
priority: ThreadPriority | null;
|
|
26
|
+
state: ThreadState | null;
|
|
27
|
+
metadata: string | null;
|
|
28
|
+
titleLocked: boolean;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ThreadTimelineOptions {
|
|
32
|
+
beforeSeq?: number;
|
|
33
|
+
afterSeq?: number;
|
|
34
|
+
limit?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface ThreadTimelineQuery extends ThreadTimelineOptions {
|
|
37
|
+
threadId: string;
|
|
38
|
+
workspaceId: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ThreadTimeline {
|
|
41
|
+
items: ThreadEvent[];
|
|
42
|
+
latestSeq: number;
|
|
43
|
+
hasMoreOlder: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface CreateThreadHighlightInput extends ThreadActorInput {
|
|
46
|
+
threadId: string;
|
|
47
|
+
workspaceId: string;
|
|
48
|
+
source?: ThreadHighlightSource;
|
|
49
|
+
kind: ThreadHighlightKind;
|
|
50
|
+
text: string;
|
|
51
|
+
taskId?: string;
|
|
52
|
+
coversFromTaskId?: string;
|
|
53
|
+
coversToTaskId?: string;
|
|
54
|
+
fromTaskId?: string;
|
|
55
|
+
toTaskId?: string;
|
|
56
|
+
agentId?: string | null;
|
|
57
|
+
sourceTaskId?: string | null;
|
|
58
|
+
detectorVersion?: string | null;
|
|
59
|
+
contentFingerprint?: string | null;
|
|
60
|
+
idempotencyKey?: string;
|
|
61
|
+
id?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface UpdateThreadHighlightInput extends ThreadActorInput {
|
|
64
|
+
threadId: string;
|
|
65
|
+
workspaceId: string;
|
|
66
|
+
highlightId: string;
|
|
67
|
+
expectedRevision: number;
|
|
68
|
+
text?: string;
|
|
69
|
+
kind?: ThreadHighlightKind;
|
|
70
|
+
coversFromTaskId?: string;
|
|
71
|
+
coversToTaskId?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface DismissThreadHighlightInput extends ThreadActorInput {
|
|
74
|
+
threadId: string;
|
|
75
|
+
workspaceId: string;
|
|
76
|
+
highlightId: string;
|
|
77
|
+
expectedRevision: number;
|
|
78
|
+
}
|
|
79
|
+
export interface ListActiveHighlightsOptions {
|
|
80
|
+
taskId?: string;
|
|
81
|
+
coversFromTaskId?: string;
|
|
82
|
+
coversToTaskId?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface ThreadHighlightEligibleTurn {
|
|
85
|
+
taskId: string;
|
|
86
|
+
prompt: string;
|
|
87
|
+
result: string;
|
|
88
|
+
status: string;
|
|
89
|
+
startedAt: string;
|
|
90
|
+
completedAt: string | null;
|
|
91
|
+
}
|
|
92
|
+
export interface CreateThreadHighlightRegenerationRunInput extends ThreadActorInput {
|
|
93
|
+
threadId: string;
|
|
94
|
+
workspaceId: string;
|
|
95
|
+
requestId: string;
|
|
96
|
+
detectorVersion: string;
|
|
97
|
+
runId?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface CreateThreadHighlightRegenerationRunResult {
|
|
100
|
+
run: ThreadHighlightRun;
|
|
101
|
+
created: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface FailThreadHighlightRegenerationRunInput extends ThreadActorInput {
|
|
104
|
+
runId: string;
|
|
105
|
+
workspaceId?: string;
|
|
106
|
+
errorCode: string;
|
|
107
|
+
}
|
|
108
|
+
export interface ThreadHighlightRegenerationCandidate {
|
|
109
|
+
kind: ThreadHighlightKind;
|
|
110
|
+
text: string;
|
|
111
|
+
anchorTaskId: string;
|
|
112
|
+
coversFromTaskId: string;
|
|
113
|
+
coversToTaskId: string;
|
|
114
|
+
contentFingerprint?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface CompleteThreadHighlightRegenerationInput extends ThreadActorInput {
|
|
117
|
+
runId: string;
|
|
118
|
+
threadId: string;
|
|
119
|
+
workspaceId: string;
|
|
120
|
+
detectorVersion: string;
|
|
121
|
+
agentId?: string | null;
|
|
122
|
+
candidates: readonly ThreadHighlightRegenerationCandidate[];
|
|
123
|
+
}
|
|
124
|
+
export interface CompleteThreadHighlightRegenerationResult {
|
|
125
|
+
run: ThreadHighlightRun;
|
|
126
|
+
deletedCount: number;
|
|
127
|
+
createdCount: number;
|
|
128
|
+
previousAutoCount: number;
|
|
129
|
+
newAutoCount: number;
|
|
130
|
+
}
|
|
131
|
+
export declare const THREAD_HIGHLIGHT_DELETION_REASON_REGENERATION_REPLACED: "regeneration_replaced";
|
|
132
|
+
export type ThreadHighlightDeletionReason = typeof THREAD_HIGHLIGHT_DELETION_REASON_REGENERATION_REPLACED;
|
|
133
|
+
export declare const THREAD_HIGHLIGHT_REGENERATION_NO_ELIGIBLE_TURNS: "THREAD_HIGHLIGHT_REGENERATION_NO_ELIGIBLE_TURNS";
|
|
134
|
+
export declare const THREAD_HIGHLIGHT_REGENERATION_INTERRUPTED: "THREAD_HIGHLIGHT_REGENERATION_INTERRUPTED";
|
|
135
|
+
export declare const THREAD_HIGHLIGHT_REGENERATION_DETECTION_FAILED: "THREAD_HIGHLIGHT_REGENERATION_DETECTION_FAILED";
|
|
136
|
+
export declare const THREAD_HIGHLIGHT_REGENERATION_COMMIT_FAILED: "THREAD_HIGHLIGHT_REGENERATION_COMMIT_FAILED";
|
|
137
|
+
export type ThreadHighlightRegenerationErrorCode = typeof THREAD_HIGHLIGHT_REGENERATION_NO_ELIGIBLE_TURNS | typeof THREAD_HIGHLIGHT_REGENERATION_INTERRUPTED | typeof THREAD_HIGHLIGHT_REGENERATION_DETECTION_FAILED | typeof THREAD_HIGHLIGHT_REGENERATION_COMMIT_FAILED | string;
|
|
138
|
+
export declare class ThreadHistoryConflictError extends RepositoryError {
|
|
139
|
+
readonly threadId: string;
|
|
140
|
+
readonly highlightId: string;
|
|
141
|
+
readonly expectedRevision: number;
|
|
142
|
+
readonly currentRevision: number;
|
|
143
|
+
constructor(threadId: string, highlightId: string, expectedRevision: number, currentRevision: number);
|
|
144
|
+
}
|
|
145
|
+
export declare class ThreadHighlightConflictError extends ThreadHistoryConflictError {
|
|
146
|
+
}
|
|
147
|
+
export declare class ThreadHighlightRegenerationConflictError extends RepositoryError {
|
|
148
|
+
readonly stableCode: "THREAD_HIGHLIGHT_REGENERATION_IN_PROGRESS";
|
|
149
|
+
readonly run: ThreadHighlightRun;
|
|
150
|
+
constructor(run: ThreadHighlightRun);
|
|
151
|
+
}
|
|
152
|
+
export declare class ThreadHistoryRepository extends BaseSqliteRepository {
|
|
153
|
+
private readonly dbPath?;
|
|
154
|
+
constructor(opts?: {
|
|
155
|
+
dbPath?: string;
|
|
156
|
+
dbRoot?: string;
|
|
157
|
+
});
|
|
158
|
+
resolveDbPath(): string;
|
|
159
|
+
private openHandle;
|
|
160
|
+
private findThread;
|
|
161
|
+
private findRegenerationRun;
|
|
162
|
+
resolveWorkspaceId(threadId: string): string | null;
|
|
163
|
+
getSnapshot(threadId: string, workspaceId?: string | null): ThreadSnapshot | null;
|
|
164
|
+
updateSnapshot(input: ThreadSnapshotMutationInput): ThreadSnapshot;
|
|
165
|
+
mutateSnapshot(input: ThreadSnapshotMutationInput): ThreadSnapshot;
|
|
166
|
+
updateThreadSnapshot(input: ThreadSnapshotMutationInput): ThreadSnapshot;
|
|
167
|
+
getLatestSeq(threadId: string, workspaceId?: string | null): number | null;
|
|
168
|
+
listCompletedThreadHighlightTurns(threadId: string, workspaceId: string): ThreadHighlightEligibleTurn[] | null;
|
|
169
|
+
createHighlightRegenerationRun(input: CreateThreadHighlightRegenerationRunInput): CreateThreadHighlightRegenerationRunResult;
|
|
170
|
+
beginHighlightRegenerationRun(input: CreateThreadHighlightRegenerationRunInput): CreateThreadHighlightRegenerationRunResult;
|
|
171
|
+
queueHighlightRegenerationRun(input: CreateThreadHighlightRegenerationRunInput): CreateThreadHighlightRegenerationRunResult;
|
|
172
|
+
getHighlightRegenerationRun(runId: string, workspaceId?: string): ThreadHighlightRun | null;
|
|
173
|
+
getHighlightRegenerationRunByRequest(threadId: string, workspaceId: string, requestId: string): ThreadHighlightRun | null;
|
|
174
|
+
findHighlightRegenerationRun(threadId: string, workspaceId: string, requestId: string): ThreadHighlightRun | null;
|
|
175
|
+
startHighlightRegenerationRun(runId: string, workspaceId?: string): ThreadHighlightRun;
|
|
176
|
+
startHighlightRegeneration(runId: string, workspaceId?: string): ThreadHighlightRun;
|
|
177
|
+
failHighlightRegenerationRun(input: FailThreadHighlightRegenerationRunInput): ThreadHighlightRun;
|
|
178
|
+
failHighlightRegeneration(input: FailThreadHighlightRegenerationRunInput): ThreadHighlightRun;
|
|
179
|
+
recoverInterruptedHighlightRegenerationRuns(errorCode?: string): number;
|
|
180
|
+
completeHighlightRegenerationRun(input: CompleteThreadHighlightRegenerationInput): CompleteThreadHighlightRegenerationResult;
|
|
181
|
+
completeHighlightRegeneration(input: CompleteThreadHighlightRegenerationInput): CompleteThreadHighlightRegenerationResult;
|
|
182
|
+
replaceAutoHighlightsAtomically(input: CompleteThreadHighlightRegenerationInput): CompleteThreadHighlightRegenerationResult;
|
|
183
|
+
listTimeline(query: ThreadTimelineQuery): ThreadTimeline | null;
|
|
184
|
+
listTimeline(threadId: string, workspaceId: string, options?: ThreadTimelineOptions): ThreadTimeline | null;
|
|
185
|
+
listEvents(threadId: string, workspaceId: string, options?: ThreadTimelineOptions): ThreadTimeline | null;
|
|
186
|
+
getTimeline(threadId: string, workspaceId: string, options?: ThreadTimelineOptions): ThreadTimeline | null;
|
|
187
|
+
createHighlight(input: CreateThreadHighlightInput): ThreadHighlight;
|
|
188
|
+
updateHighlight(input: UpdateThreadHighlightInput): ThreadHighlight;
|
|
189
|
+
dismissHighlight(input: DismissThreadHighlightInput): ThreadHighlight;
|
|
190
|
+
listActiveHighlights(threadId: string, workspaceId: string, options?: ListActiveHighlightsOptions): ThreadHighlight[] | null;
|
|
191
|
+
listHighlights(threadId: string, workspaceId: string, options?: ListActiveHighlightsOptions): ThreadHighlight[] | null;
|
|
192
|
+
getActiveHighlights(threadId: string, workspaceId: string, options?: ListActiveHighlightsOptions): ThreadHighlight[] | null;
|
|
193
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type ThreadOriginKind = 'human' | 'agent' | 'system';
|
|
2
|
+
export interface ThreadOriginRow {
|
|
3
|
+
origin: 'direct' | 'delegated';
|
|
4
|
+
delegatedByAgentId: string | null;
|
|
5
|
+
}
|
|
6
|
+
export interface RawThreadOriginRow {
|
|
7
|
+
task_id: string;
|
|
8
|
+
thread_id: string;
|
|
9
|
+
caller_agent_id: string | null;
|
|
10
|
+
parent_task_id: string | null;
|
|
11
|
+
schedule_id: unknown;
|
|
12
|
+
platform: string | null;
|
|
13
|
+
parent_thread_id: string | null;
|
|
14
|
+
parent_agent_id: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface RawThreadCreatorPointerRow {
|
|
17
|
+
thread_id: string;
|
|
18
|
+
created_by_kind: string | null;
|
|
19
|
+
created_by_id: string | null;
|
|
20
|
+
created_by_task_id: string | null;
|
|
21
|
+
creator_task_id: string | null;
|
|
22
|
+
creator_actor_kind: string | null;
|
|
23
|
+
creator_actor_id: string | null;
|
|
24
|
+
creator_pointer_unverified: number;
|
|
25
|
+
}
|
|
26
|
+
export declare function lineageThreadOrigin(row: RawThreadOriginRow): ThreadOriginRow;
|
|
27
|
+
export declare function resolveThreadOrigin(row: RawThreadCreatorPointerRow, pointerLineage?: RawThreadOriginRow, fallbackLineage?: RawThreadOriginRow): ThreadOriginRow | undefined;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const THREAD_PRIORITIES: readonly ["urgent", "high", "medium", "low"];
|
|
2
|
+
export type ThreadPriority = (typeof THREAD_PRIORITIES)[number];
|
|
3
|
+
export declare const BUILTIN_THREAD_STATES: readonly ["investigating", "in-progress", "in-review", "on-hold", "done"];
|
|
4
|
+
export type BuiltinThreadState = (typeof BUILTIN_THREAD_STATES)[number];
|
|
5
|
+
export type StableThreadState = BuiltinThreadState | `c_${string}`;
|
|
6
|
+
export type LegacyThreadState = `custom:${string}`;
|
|
7
|
+
export type ThreadState = StableThreadState | LegacyThreadState;
|
|
8
|
+
export interface ThreadTitleMeta {
|
|
9
|
+
priority?: ThreadPriority;
|
|
10
|
+
state?: ThreadState;
|
|
11
|
+
}
|
|
12
|
+
export interface ThreadTitlePatch {
|
|
13
|
+
priority?: ThreadPriority | null;
|
|
14
|
+
state?: ThreadState | null;
|
|
15
|
+
}
|
|
16
|
+
export declare function isThreadPriority(value: unknown): value is ThreadPriority;
|
|
17
|
+
export declare function isThreadState(value: unknown): value is ThreadState;
|
|
18
|
+
export declare function customStateLabel(state: ThreadState): string | undefined;
|
|
19
|
+
export declare function hasThreadTitleKey(metadataJson: string | null | undefined): boolean;
|
|
20
|
+
export declare function readThreadTitleMeta(metadataJson: string | null | undefined): ThreadTitleMeta;
|
|
21
|
+
export declare function mergeThreadTitleMeta(metadataJson: string | null | undefined, patch: ThreadTitlePatch): string | null;
|
|
22
|
+
export declare function threadTitleSearchHaystack(meta: ThreadTitleMeta, labelNames?: ReadonlyMap<string, string>): string;
|
|
23
|
+
export interface ThreadTitleFilter {
|
|
24
|
+
values: Set<string>;
|
|
25
|
+
includeNone: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function parseThreadPriorityFilter(raw: string | undefined): ThreadTitleFilter | undefined;
|
|
28
|
+
export declare function parseThreadStateFilter(raw: string | undefined): ThreadTitleFilter | undefined;
|
|
29
|
+
export declare function matchesThreadTitleFilter(current: string | undefined, filter: ThreadTitleFilter | undefined): boolean;
|
|
@@ -1,8 +1,51 @@
|
|
|
1
1
|
import { BaseSqliteRepository } from './base-sqlite-repository.js';
|
|
2
|
+
import { RepositoryError } from './errors.js';
|
|
2
3
|
import { threads } from '../schema/index.js';
|
|
3
|
-
import type {
|
|
4
|
+
import type { ThreadOriginRow } from './thread-origin-verdict.js';
|
|
5
|
+
import type { TaskRow, TaskListRow } from './task.repository.js';
|
|
6
|
+
export type { ThreadOriginRow } from './thread-origin-verdict.js';
|
|
4
7
|
export type ThreadRow = typeof threads.$inferSelect;
|
|
5
8
|
export type NewThread = typeof threads.$inferInsert;
|
|
9
|
+
export type ThreadActorKind = NonNullable<NewThread['created_by_kind']>;
|
|
10
|
+
export interface ThreadCreationOptions {
|
|
11
|
+
createdByKind?: ThreadActorKind | null;
|
|
12
|
+
createdById?: string | null;
|
|
13
|
+
createdByTaskId?: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface CreateAppLaunchThreadInput {
|
|
16
|
+
threadId: string;
|
|
17
|
+
workspaceId: string;
|
|
18
|
+
platform: string;
|
|
19
|
+
title: string;
|
|
20
|
+
appId: string;
|
|
21
|
+
createdById: string | null;
|
|
22
|
+
initialAgentId?: string;
|
|
23
|
+
}
|
|
24
|
+
export type CreateAppLaunchThreadResult = {
|
|
25
|
+
status: 'created';
|
|
26
|
+
thread: ThreadRow;
|
|
27
|
+
} | {
|
|
28
|
+
status: 'existing';
|
|
29
|
+
thread: ThreadRow;
|
|
30
|
+
} | {
|
|
31
|
+
status: 'conflict';
|
|
32
|
+
};
|
|
33
|
+
export type ThreadOriginFilter = 'direct' | 'delegated' | 'all';
|
|
34
|
+
type ThreadOriginScope = Exclude<ThreadOriginFilter, 'all'>;
|
|
35
|
+
export interface ThreadTitleMetadataPatch {
|
|
36
|
+
priority?: string | null;
|
|
37
|
+
state?: string | null;
|
|
38
|
+
}
|
|
39
|
+
export interface ThreadTitleMetadataPatchResult {
|
|
40
|
+
threadId: string;
|
|
41
|
+
priority: string | null;
|
|
42
|
+
state: string | null;
|
|
43
|
+
}
|
|
44
|
+
export type ThreadTitleMetadataPatchErrorReason = 'THREAD_TITLE_PATCH_EMPTY' | 'THREAD_TITLE_PATCH_INVALID';
|
|
45
|
+
export declare class ThreadTitleMetadataPatchError extends RepositoryError {
|
|
46
|
+
readonly reason: ThreadTitleMetadataPatchErrorReason;
|
|
47
|
+
constructor(reason: ThreadTitleMetadataPatchErrorReason, message?: string);
|
|
48
|
+
}
|
|
6
49
|
export declare class ThreadRepository extends BaseSqliteRepository {
|
|
7
50
|
private readonly dbPath?;
|
|
8
51
|
constructor(opts?: {
|
|
@@ -11,10 +54,19 @@ export declare class ThreadRepository extends BaseSqliteRepository {
|
|
|
11
54
|
});
|
|
12
55
|
resolveDbPath(): string;
|
|
13
56
|
private openHandle;
|
|
14
|
-
private validateWorkspaceId;
|
|
15
57
|
private topLevelTaskPredicateSql;
|
|
16
|
-
|
|
58
|
+
private findAllThreadsQuery;
|
|
59
|
+
private findThreadIdsQuery;
|
|
60
|
+
private readThreadIds;
|
|
61
|
+
private findThreadSortKeysQuery;
|
|
62
|
+
private readThreadSortKeys;
|
|
63
|
+
private readThreadRowsByIds;
|
|
64
|
+
private readThreadRows;
|
|
65
|
+
findAllThreads(workspaceId?: string, createdByKind?: ThreadActorKind): ThreadRow[];
|
|
66
|
+
explainFindAllThreadsPlan(workspaceId?: string, createdByKind?: ThreadActorKind): string[];
|
|
67
|
+
findThreadsByIdsOrTitles(ids: string[], workspaceId?: string): ThreadRow[];
|
|
17
68
|
findThreadById(threadId: string, workspaceId?: string): ThreadRow | undefined;
|
|
69
|
+
createAppLaunchThread(input: CreateAppLaunchThreadInput): CreateAppLaunchThreadResult;
|
|
18
70
|
threadExists(threadId: string, workspaceId?: string): boolean;
|
|
19
71
|
aggregateTaskStats(threadId: string, workspaceId?: string): {
|
|
20
72
|
taskCount: number;
|
|
@@ -30,15 +82,28 @@ export declare class ThreadRepository extends BaseSqliteRepository {
|
|
|
30
82
|
task: TaskRow;
|
|
31
83
|
children: TaskRow[];
|
|
32
84
|
} | undefined;
|
|
33
|
-
|
|
85
|
+
private batchFetchTasksQuery;
|
|
86
|
+
batchFetchTasks(threadIds: string[], workspaceId?: string): Map<string, TaskListRow[]>;
|
|
87
|
+
private findThreadOriginsQuery;
|
|
88
|
+
private findCreatorPointersQuery;
|
|
89
|
+
private findTaskOriginLineageQuery;
|
|
90
|
+
findThreadOrigins(threadIds: string[], workspaceId?: string): Map<string, ThreadOriginRow>;
|
|
91
|
+
findThreadsByOrigin(origin: ThreadOriginScope, workspaceId?: string): ThreadRow[];
|
|
92
|
+
findRecentDirectThreads(workspaceId: string, limit?: number): {
|
|
93
|
+
threads: ThreadRow[];
|
|
94
|
+
originsByThread: Map<string, ThreadOriginRow>;
|
|
95
|
+
};
|
|
96
|
+
explainBatchFetchTasksPlan(threadIds: string[], workspaceId?: string): string[];
|
|
97
|
+
explainFindThreadOriginsPlan(threadIds: string[], workspaceId?: string): string[];
|
|
98
|
+
explainFindThreadsByOriginPlan(origin: ThreadOriginScope, workspaceId?: string): string[];
|
|
34
99
|
updateThreadTitle(threadId: string, title: string, workspaceId?: string): void;
|
|
35
100
|
upsertThread(threadId: string, opts: {
|
|
36
101
|
platform: string;
|
|
37
102
|
workspaceId?: string;
|
|
38
103
|
title?: string;
|
|
39
104
|
titleLocked?: boolean;
|
|
40
|
-
}): void;
|
|
41
|
-
ensureThread(threadId: string, platform: string, workspaceId?: string): void;
|
|
105
|
+
} & ThreadCreationOptions): void;
|
|
106
|
+
ensureThread(threadId: string, platform: string, workspaceId?: string, creator?: ThreadCreationOptions): void;
|
|
42
107
|
saveUserMessage(threadId: string, text: string, opts?: {
|
|
43
108
|
platform?: string;
|
|
44
109
|
model?: string;
|
|
@@ -56,6 +121,7 @@ export declare class ThreadRepository extends BaseSqliteRepository {
|
|
|
56
121
|
title?: string;
|
|
57
122
|
titleLocked?: boolean;
|
|
58
123
|
}): void;
|
|
124
|
+
patchThreadTitleMetadata(threadId: string, patch: ThreadTitleMetadataPatch, workspaceId?: string): ThreadTitleMetadataPatchResult | ThreadTitleMetadataPatchError | null;
|
|
59
125
|
togglePin(threadId: string, workspaceId?: string): {
|
|
60
126
|
pinned: boolean;
|
|
61
127
|
} | null;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export type UsageBackfillMode = 'dry-run' | 'apply' | 'verify' | 'restore';
|
|
2
|
+
export declare const USAGE_BACKFILL_TERMINAL_STATUSES: readonly ["success", "failed", "completed"];
|
|
3
|
+
export declare const USAGE_BACKFILL_MAX_LATE_USAGE_AGE_MS: number;
|
|
4
|
+
export declare const USAGE_BACKFILL_UNDO_SCHEMA_VERSION = 1;
|
|
5
|
+
export declare const USAGE_BACKFILL_SNAPSHOT_ROW_BYTES = 2048;
|
|
6
|
+
export declare const USAGE_BACKFILL_MIN_FREE_SPACE_RESERVE_BYTES: number;
|
|
7
|
+
export type UsageAccountingReason = 'pre-instrumentation' | 'provider-no-usage' | 'suppressed-by-adapter' | 'not-captured';
|
|
8
|
+
export interface UsageBackfillOptions {
|
|
9
|
+
mode: UsageBackfillMode;
|
|
10
|
+
dbPath?: string;
|
|
11
|
+
backupPath?: string;
|
|
12
|
+
restorePath?: string;
|
|
13
|
+
now?: Date | string | number;
|
|
14
|
+
}
|
|
15
|
+
export interface UsageBackfillProviderStats {
|
|
16
|
+
candidates: number;
|
|
17
|
+
recovered: number;
|
|
18
|
+
unavailable: number;
|
|
19
|
+
deferred: number;
|
|
20
|
+
}
|
|
21
|
+
export interface UsageBackfillFailure {
|
|
22
|
+
taskId: string;
|
|
23
|
+
reason: string;
|
|
24
|
+
}
|
|
25
|
+
export interface UsageBackfillReport {
|
|
26
|
+
mode: UsageBackfillMode;
|
|
27
|
+
ok: boolean;
|
|
28
|
+
dbPath: string;
|
|
29
|
+
scannedTasks: number;
|
|
30
|
+
terminalTasks: number;
|
|
31
|
+
rawTargetTasks: number;
|
|
32
|
+
candidateTasks: number;
|
|
33
|
+
recoveredTasks: number;
|
|
34
|
+
unavailableTasks: number;
|
|
35
|
+
deferredTasks: number;
|
|
36
|
+
changedTasks: number;
|
|
37
|
+
wouldChangeTasks: number;
|
|
38
|
+
accountingTasks: number;
|
|
39
|
+
remainingTargetTasks: number;
|
|
40
|
+
providerDistribution: Record<string, UsageBackfillProviderStats>;
|
|
41
|
+
reasonCounts: Record<UsageAccountingReason, number>;
|
|
42
|
+
estimatedFreeSpaceBytes: number;
|
|
43
|
+
requiredFreeSpaceBytes: number;
|
|
44
|
+
availableFreeSpaceBytes: number;
|
|
45
|
+
minimumFreeSpaceReserveBytes: number;
|
|
46
|
+
freeSpaceGatePassed: boolean;
|
|
47
|
+
backupPath?: string;
|
|
48
|
+
snapshotPath?: string;
|
|
49
|
+
backupMethod?: 'row-undo-snapshot';
|
|
50
|
+
restored: number;
|
|
51
|
+
skippedConflict: number;
|
|
52
|
+
conflictSamples: UsageBackfillConflict[];
|
|
53
|
+
blockedReason?: string;
|
|
54
|
+
failures: UsageBackfillFailure[];
|
|
55
|
+
warnings: string[];
|
|
56
|
+
}
|
|
57
|
+
export interface UsageBackfillConflict {
|
|
58
|
+
taskId: string;
|
|
59
|
+
fields: string[];
|
|
60
|
+
}
|
|
61
|
+
export declare function classifyUsageAccountingReason(provider: string | undefined): UsageAccountingReason;
|
|
62
|
+
export declare function runUsageBackfill(options: UsageBackfillOptions): Promise<UsageBackfillReport>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CliProviderAdapter } from '../provider/cli/adapter.types.js';
|
|
2
|
+
import type { TaskLogRepositoryContract } from './task-log.repository.js';
|
|
3
|
+
export interface RecoveredTaskUsage {
|
|
4
|
+
inputTokens: number;
|
|
5
|
+
outputTokens: number;
|
|
6
|
+
cachedInputTokens: number;
|
|
7
|
+
costUsd: number;
|
|
8
|
+
model: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface TaskLogUsageRecovery {
|
|
11
|
+
stdout: string;
|
|
12
|
+
adapter: CliProviderAdapter;
|
|
13
|
+
usage?: RecoveredTaskUsage;
|
|
14
|
+
}
|
|
15
|
+
export interface RecoverUsageFromTaskLogsOptions {
|
|
16
|
+
taskLogRepository: Pick<TaskLogRepositoryContract, 'readLogs'>;
|
|
17
|
+
taskId: string;
|
|
18
|
+
provider?: string | null;
|
|
19
|
+
model?: string | null;
|
|
20
|
+
}
|
|
21
|
+
export declare function recoverUsageFromTaskLogs(options: RecoverUsageFromTaskLogsOptions): TaskLogUsageRecovery | undefined;
|
|
@@ -48,6 +48,9 @@ export declare class WorkspaceRepository extends BaseSqliteRepository {
|
|
|
48
48
|
total: number;
|
|
49
49
|
};
|
|
50
50
|
findById(id: string): ProjectRow | undefined;
|
|
51
|
+
toggleStar(id: string): {
|
|
52
|
+
starred: boolean;
|
|
53
|
+
} | null;
|
|
51
54
|
findAgentsByProject(id: string): string[];
|
|
52
55
|
findThreadsByProject(id: string, params: {
|
|
53
56
|
limit: number;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
export declare const agent_suggestions: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
+
name: "agent_suggestions";
|
|
3
|
+
schema: undefined;
|
|
4
|
+
columns: {
|
|
5
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
+
name: "id";
|
|
7
|
+
tableName: "agent_suggestions";
|
|
8
|
+
dataType: "string";
|
|
9
|
+
columnType: "SQLiteText";
|
|
10
|
+
data: string;
|
|
11
|
+
driverParam: string;
|
|
12
|
+
notNull: true;
|
|
13
|
+
hasDefault: false;
|
|
14
|
+
isPrimaryKey: true;
|
|
15
|
+
isAutoincrement: false;
|
|
16
|
+
hasRuntimeDefault: false;
|
|
17
|
+
enumValues: [string, ...string[]];
|
|
18
|
+
baseColumn: never;
|
|
19
|
+
identity: undefined;
|
|
20
|
+
generated: undefined;
|
|
21
|
+
}, {}, {
|
|
22
|
+
length: number | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
workspace_id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
25
|
+
name: "workspace_id";
|
|
26
|
+
tableName: "agent_suggestions";
|
|
27
|
+
dataType: "string";
|
|
28
|
+
columnType: "SQLiteText";
|
|
29
|
+
data: string;
|
|
30
|
+
driverParam: string;
|
|
31
|
+
notNull: true;
|
|
32
|
+
hasDefault: false;
|
|
33
|
+
isPrimaryKey: false;
|
|
34
|
+
isAutoincrement: false;
|
|
35
|
+
hasRuntimeDefault: false;
|
|
36
|
+
enumValues: [string, ...string[]];
|
|
37
|
+
baseColumn: never;
|
|
38
|
+
identity: undefined;
|
|
39
|
+
generated: undefined;
|
|
40
|
+
}, {}, {
|
|
41
|
+
length: number | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
agent_id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
44
|
+
name: "agent_id";
|
|
45
|
+
tableName: "agent_suggestions";
|
|
46
|
+
dataType: "string";
|
|
47
|
+
columnType: "SQLiteText";
|
|
48
|
+
data: string;
|
|
49
|
+
driverParam: string;
|
|
50
|
+
notNull: true;
|
|
51
|
+
hasDefault: false;
|
|
52
|
+
isPrimaryKey: false;
|
|
53
|
+
isAutoincrement: false;
|
|
54
|
+
hasRuntimeDefault: false;
|
|
55
|
+
enumValues: [string, ...string[]];
|
|
56
|
+
baseColumn: never;
|
|
57
|
+
identity: undefined;
|
|
58
|
+
generated: undefined;
|
|
59
|
+
}, {}, {
|
|
60
|
+
length: number | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
task_id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
63
|
+
name: "task_id";
|
|
64
|
+
tableName: "agent_suggestions";
|
|
65
|
+
dataType: "string";
|
|
66
|
+
columnType: "SQLiteText";
|
|
67
|
+
data: string;
|
|
68
|
+
driverParam: string;
|
|
69
|
+
notNull: false;
|
|
70
|
+
hasDefault: false;
|
|
71
|
+
isPrimaryKey: false;
|
|
72
|
+
isAutoincrement: false;
|
|
73
|
+
hasRuntimeDefault: false;
|
|
74
|
+
enumValues: [string, ...string[]];
|
|
75
|
+
baseColumn: never;
|
|
76
|
+
identity: undefined;
|
|
77
|
+
generated: undefined;
|
|
78
|
+
}, {}, {
|
|
79
|
+
length: number | undefined;
|
|
80
|
+
}>;
|
|
81
|
+
type: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
82
|
+
name: "type";
|
|
83
|
+
tableName: "agent_suggestions";
|
|
84
|
+
dataType: "string";
|
|
85
|
+
columnType: "SQLiteText";
|
|
86
|
+
data: string;
|
|
87
|
+
driverParam: string;
|
|
88
|
+
notNull: true;
|
|
89
|
+
hasDefault: false;
|
|
90
|
+
isPrimaryKey: false;
|
|
91
|
+
isAutoincrement: false;
|
|
92
|
+
hasRuntimeDefault: false;
|
|
93
|
+
enumValues: [string, ...string[]];
|
|
94
|
+
baseColumn: never;
|
|
95
|
+
identity: undefined;
|
|
96
|
+
generated: undefined;
|
|
97
|
+
}, {}, {
|
|
98
|
+
length: number | undefined;
|
|
99
|
+
}>;
|
|
100
|
+
status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
101
|
+
name: "status";
|
|
102
|
+
tableName: "agent_suggestions";
|
|
103
|
+
dataType: "string";
|
|
104
|
+
columnType: "SQLiteText";
|
|
105
|
+
data: string;
|
|
106
|
+
driverParam: string;
|
|
107
|
+
notNull: true;
|
|
108
|
+
hasDefault: true;
|
|
109
|
+
isPrimaryKey: false;
|
|
110
|
+
isAutoincrement: false;
|
|
111
|
+
hasRuntimeDefault: false;
|
|
112
|
+
enumValues: [string, ...string[]];
|
|
113
|
+
baseColumn: never;
|
|
114
|
+
identity: undefined;
|
|
115
|
+
generated: undefined;
|
|
116
|
+
}, {}, {
|
|
117
|
+
length: number | undefined;
|
|
118
|
+
}>;
|
|
119
|
+
payload: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
120
|
+
name: "payload";
|
|
121
|
+
tableName: "agent_suggestions";
|
|
122
|
+
dataType: "string";
|
|
123
|
+
columnType: "SQLiteText";
|
|
124
|
+
data: string;
|
|
125
|
+
driverParam: string;
|
|
126
|
+
notNull: true;
|
|
127
|
+
hasDefault: false;
|
|
128
|
+
isPrimaryKey: false;
|
|
129
|
+
isAutoincrement: false;
|
|
130
|
+
hasRuntimeDefault: false;
|
|
131
|
+
enumValues: [string, ...string[]];
|
|
132
|
+
baseColumn: never;
|
|
133
|
+
identity: undefined;
|
|
134
|
+
generated: undefined;
|
|
135
|
+
}, {}, {
|
|
136
|
+
length: number | undefined;
|
|
137
|
+
}>;
|
|
138
|
+
applied_commit_sha: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
139
|
+
name: "applied_commit_sha";
|
|
140
|
+
tableName: "agent_suggestions";
|
|
141
|
+
dataType: "string";
|
|
142
|
+
columnType: "SQLiteText";
|
|
143
|
+
data: string;
|
|
144
|
+
driverParam: string;
|
|
145
|
+
notNull: false;
|
|
146
|
+
hasDefault: false;
|
|
147
|
+
isPrimaryKey: false;
|
|
148
|
+
isAutoincrement: false;
|
|
149
|
+
hasRuntimeDefault: false;
|
|
150
|
+
enumValues: [string, ...string[]];
|
|
151
|
+
baseColumn: never;
|
|
152
|
+
identity: undefined;
|
|
153
|
+
generated: undefined;
|
|
154
|
+
}, {}, {
|
|
155
|
+
length: number | undefined;
|
|
156
|
+
}>;
|
|
157
|
+
created_at: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
158
|
+
name: "created_at";
|
|
159
|
+
tableName: "agent_suggestions";
|
|
160
|
+
dataType: "string";
|
|
161
|
+
columnType: "SQLiteText";
|
|
162
|
+
data: string;
|
|
163
|
+
driverParam: string;
|
|
164
|
+
notNull: true;
|
|
165
|
+
hasDefault: false;
|
|
166
|
+
isPrimaryKey: false;
|
|
167
|
+
isAutoincrement: false;
|
|
168
|
+
hasRuntimeDefault: false;
|
|
169
|
+
enumValues: [string, ...string[]];
|
|
170
|
+
baseColumn: never;
|
|
171
|
+
identity: undefined;
|
|
172
|
+
generated: undefined;
|
|
173
|
+
}, {}, {
|
|
174
|
+
length: number | undefined;
|
|
175
|
+
}>;
|
|
176
|
+
updated_at: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
177
|
+
name: "updated_at";
|
|
178
|
+
tableName: "agent_suggestions";
|
|
179
|
+
dataType: "string";
|
|
180
|
+
columnType: "SQLiteText";
|
|
181
|
+
data: string;
|
|
182
|
+
driverParam: string;
|
|
183
|
+
notNull: true;
|
|
184
|
+
hasDefault: false;
|
|
185
|
+
isPrimaryKey: false;
|
|
186
|
+
isAutoincrement: false;
|
|
187
|
+
hasRuntimeDefault: false;
|
|
188
|
+
enumValues: [string, ...string[]];
|
|
189
|
+
baseColumn: never;
|
|
190
|
+
identity: undefined;
|
|
191
|
+
generated: undefined;
|
|
192
|
+
}, {}, {
|
|
193
|
+
length: number | undefined;
|
|
194
|
+
}>;
|
|
195
|
+
};
|
|
196
|
+
dialect: "sqlite";
|
|
197
|
+
}>;
|
|
198
|
+
export type AgentSuggestion = typeof agent_suggestions.$inferSelect;
|
|
199
|
+
export type NewAgentSuggestion = typeof agent_suggestions.$inferInsert;
|