mirror of
https://github.com/multica-ai/multica.git
synced 2026-08-12 00:45:55 +02:00
* feat(agents): make AI agent creation resumable (#6246) Leaving the Agent Creation Studio destroyed the conversation. The unmount cleanup called deleteChatSession, so a sidebar click, a tab close or a route change deleted the builder session and every message in it — the bug external users reported. Archiving instead (PR #6247) would have stopped the deletion without giving anyone a way back in: builder sessions hang off a hidden `kind = 'system'` carrier agent, which the `kind = 'user'` filter keeps out of every chat list, so an archived one is unreachable rather than recoverable. A creation conversation is now a durable object with its own address. Server: - GET /api/agent-builder/sessions lists the caller's unfinished creations. Creator-scoped like every other chat read. It reports the CARRIER's runtime, not chat_session.runtime_id — the latter is the daemon's resume pointer and is deliberately left stale after a switch, so resuming from it would put the picker on a runtime that executes nothing (MUL-5163). - PUT /api/agent-builder/sessions/{id}/draft stores the configuration, including the edits the user typed but never sent. Migration 251 adds agent_builder_draft (no FK per repo rule; pruned explicitly by DeleteChatSession, the runtime teardown and the workspace teardown, and registered in the workspace-deletion manifest). - The payload is opaque to the server: its shape is the studio's AgentDraft, validated client-side. Teaching Postgres and the handler about it would create a second definition to keep in sync for no gain. Client: - The session id lives in `?session=`, so a refresh, a back/forward and a reopened tab land back in the same conversation. - Leaving no longer deletes anything. The only destructive path is an explicit "discard", confirmed in a dialog, next to the create button. - Creating the agent archives the conversation instead of deleting it: it is the record of how that agent was designed, and an idle carrier costs nothing since usage is booked per task. - The configuration autosaves (debounced) and restores on arrival, with the applied-assistant-message marker stored alongside it so a restore cannot re-apply the last reply over edits made after it. - The 1.5s polling of messages and pending-task is gone. The global realtime sync already invalidates both per session id, exactly as it does for the main chat window, which has never polled. - The `<agent_draft>` block collapses to one "configuration updated" line. The regex now also swallows an unterminated block, which is what streaming produces — the raw payload used to scroll past on every turn. The 2185-line agent-creation-studio.tsx is split into three routes (`/agents/new`, `/agents/new/manual`, `/agents/new/ai`), its pure logic moves to packages/core/agents/ with its tests, and the unreachable template flow — `setMode("templates")` had no caller — is removed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(agents): let the builder panes resize The conversation / configuration split was not draggable. Two structural reasons, both fixed by giving the group the same shape the chat page uses: - The panels reached the group through BuilderWorkspace's fragment, so they were not children the group could measure. - The group's children alternated between one panel (runtime setup) and two (conversation), under one persisted layout id. The group now lives inside BuilderWorkspace with its two panels as its only children, and the setup screen renders no group at all — it has nothing to split. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(ui): give the resize handle a cursor on hover The separator had no cursor of its own, so the only signal that a split was draggable arrived after the drag started — the library writes a global `cursor: ... !important` while dragging, and nothing before it. Fixed on the shared handle rather than at one call site: every split surface (chat, inbox, issue detail, project detail, the agent builder) was missing the same affordance. The library's drag-time rule still outranks this one, so the cursor keeps narrowing to `e-resize` / `w-resize` once a panel hits its bound. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * feat(agents): render the builder's draft block as an inspectable row Every builder reply ends in an <agent_draft> block that rewrites the form on the right. Flattening it to a line of prose said that something changed but not what, and the payload — the only record of what the builder actually claimed — was unreachable. A settled reply now carries a full-width row saying the configuration was updated, which opens the exact payload. A streaming one keeps a text line instead: the block is still being written, so there is nothing complete to open, and without the line the half-finished JSON scrolls past. ChatMessageList gains an optional `renderAssistantAddon`. It is opt-in per surface and undefined everywhere but this one, because no other chat speaks this protocol — the alternative was to keep pushing an embedded protocol through `transformContent`, which can only ever produce prose. `extractBuilderDraftBlock` returns an unparseable payload verbatim rather than withholding it: a malformed block is exactly when someone wants to read it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(agents): address review blockers on the resumable builder 1. Migration prefix collision. `251_agent_runtime_unbind` landed on main after this branch cut, so the backend's prefix-uniqueness guard failed. Renumbered to 252. 2. #6287 — the manual form still lost everything. The route split moved where you land, not what survives: the draft was `useState`, so a tab switch (the desktop shell mounts only the active tab) remounted it empty, and the beforeunload guard covered a hard reload and nothing else. It now persists through the repo's draft-store factory, scoped by what is being created — a blank agent and a copy of agent X are different work, and a copy of X is not a copy of Y — cleared once the agent is committed, and registered for logout / workspace-delete cleanup. 3. A saved draft with no messages was unreachable. The configuration form is editable from the moment a builder session exists and autosaves, so someone could open it, type a name and leave before the first turn; the list keyed "is this a draft" on messages alone, so that row existed and nothing could reach it. A session now qualifies on a message OR a stored draft, and sorts by whichever it has. 4. The debounce dropped the last edits. Its timer died with the component, so navigating away inside the 800ms window lost exactly the keystrokes the user had just made. The pending payload is now flushed on unmount. `useUnsavedDraftWarning` is gone with its last caller: both routes persist, so the browser prompt would have been warning about work that is already saved. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(ui): stop the resize cursor flipping mid-drag The library narrows its cursor the moment a panel hits a bound — col-resize while both directions are open, a one-way arrow once only one is. Truthful, but it reads as a glitch: the icon changes under your hand halfway through a drag you never stopped making. `disableCursor` turns that global rule off; the handle's own `cursor-col-resize` is now the only source. A drag captures the pointer and walks it across the panels, away from the 8px handle, so the group carries the same cursor for as long as a separator is active — otherwise it would fall back to a text caret the instant the pointer left the handle. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(agents): key manual drafts by owner, drop the draft-block rendering Two changes. One slot destroyed the other flow's work. The manual draft was stored under a single key: opening a blank form, or a copy of a different agent, refused to adopt the stored draft and then immediately wrote its own empty form over it — so a half-finished copy of agent A died the moment the user opened anything else, before typing a character. Drafts are now keyed by what is being created, the same shape the chat composer uses for its per-session drafts, and a slot is dropped when its content is gone rather than parked blank (which also stops the map growing a dead key per agent ever opened for duplication). Committing an agent clears that flow's slot only. The `<agent_draft>` block goes back to being hidden outright. Labelling it and opening its payload dressed up machinery as content: the block drives the configuration form, and the form is where its effect is already visible. `renderAssistantAddon` goes with it — ChatMessageList is back to what it was, since no surface needs the slot. The two-pattern strip stays: an unterminated block is what streaming produces, and without matching it the raw JSON scrolled past the reader on every turn. Also removed six barrel exports nothing imported through, and unexported five types only their own file used. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(agents): keep a manual draft whose only edit is a picker The "is this worth storing" predicate listed six fields by name, and the draft serializes eleven. A form whose only change was the model, the thinking level, the service tier, the access scope or a team grant read as untouched, so the next save deleted its slot — picking a model before typing a name and switching tabs lost the model. Enumerating was the mistake, not the specific omissions: the predicate stops covering every field added after it is written, and the failure is invisible because each field saves correctly as long as some *other* field is also set. It now compares the whole draft against a fresh one. The runtime stays outside that comparison, on the entry rather than in the draft, because the form seeds it on every visit and counting it would store a draft for a form nobody touched. Covered field by field, one edit at a time, so a future field cannot quietly fall out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1217 lines
60 KiB
Go
1217 lines
60 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.31.1
|
|
|
|
package db
|
|
|
|
import (
|
|
"net/netip"
|
|
|
|
"github.com/jackc/pgx/v5/pgtype"
|
|
)
|
|
|
|
type ActivityLog struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
IssueID pgtype.UUID `json:"issue_id"`
|
|
ActorType pgtype.Text `json:"actor_type"`
|
|
ActorID pgtype.UUID `json:"actor_id"`
|
|
Action string `json:"action"`
|
|
Details []byte `json:"details"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Agent struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
Name string `json:"name"`
|
|
AvatarUrl pgtype.Text `json:"avatar_url"`
|
|
RuntimeMode string `json:"runtime_mode"`
|
|
RuntimeConfig []byte `json:"runtime_config"`
|
|
Visibility string `json:"visibility"`
|
|
Status string `json:"status"`
|
|
MaxConcurrentTasks int32 `json:"max_concurrent_tasks"`
|
|
OwnerID pgtype.UUID `json:"owner_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
Description string `json:"description"`
|
|
RuntimeID pgtype.UUID `json:"runtime_id"`
|
|
Instructions string `json:"instructions"`
|
|
ArchivedAt pgtype.Timestamptz `json:"archived_at"`
|
|
ArchivedBy pgtype.UUID `json:"archived_by"`
|
|
CustomEnv []byte `json:"custom_env"`
|
|
CustomArgs []byte `json:"custom_args"`
|
|
McpConfig []byte `json:"mcp_config"`
|
|
Model pgtype.Text `json:"model"`
|
|
ThinkingLevel pgtype.Text `json:"thinking_level"`
|
|
// Composio toolkit slugs this agent is allowed to mount as MCP. NULL or empty array = no MCP overlay. Mounted for any run that passes the agent invocation-permission gate (MUL-3963); the overlay uses the agent OWNER's active Composio connection, so sharing the agent (public_to) shares these apps with whoever may invoke it. No longer gated on originator == owner. Stored as TEXT[] so the dispatch path can intersect against the owner's active connections with a single SQL ANY() filter.
|
|
ComposioToolkitAllowlist []string `json:"composio_toolkit_allowlist"`
|
|
// Agent invocation permission mode (MUL-3963). private = owner only; public_to = allow-list in agent_invocation_target. Replaces visibility as the authorization source for triggering runs; visibility is now a derived legacy field. Default private = deny-by-default.
|
|
PermissionMode string `json:"permission_mode"`
|
|
Kind string `json:"kind"`
|
|
SystemKey pgtype.Text `json:"system_key"`
|
|
DisabledRuntimeSkills []byte `json:"disabled_runtime_skills"`
|
|
ServiceTier pgtype.Text `json:"service_tier"`
|
|
}
|
|
|
|
type AgentBuilderDraft struct {
|
|
ChatSessionID pgtype.UUID `json:"chat_session_id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
Draft []byte `json:"draft"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
// Allow-list of who may invoke a public_to agent (MUL-3963). One row per (agent, target_type, target); targets stack and canInvokeAgent OR-matches. workspace rows store the agent workspace_id in target_id; member rows store the user id; team rows are reserved and inert in V1. Rows only matter when agent.permission_mode = public_to. No DB foreign keys: agent_id / created_by / member target_id relationships are maintained in the application layer (see migration comment).
|
|
type AgentInvocationTarget struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
AgentID pgtype.UUID `json:"agent_id"`
|
|
TargetType string `json:"target_type"`
|
|
TargetID pgtype.UUID `json:"target_id"`
|
|
CreatedBy pgtype.UUID `json:"created_by"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type AgentRuntime struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
DaemonID pgtype.Text `json:"daemon_id"`
|
|
Name string `json:"name"`
|
|
RuntimeMode string `json:"runtime_mode"`
|
|
Provider string `json:"provider"`
|
|
Status string `json:"status"`
|
|
DeviceInfo string `json:"device_info"`
|
|
Metadata []byte `json:"metadata"`
|
|
LastSeenAt pgtype.Timestamptz `json:"last_seen_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
OwnerID pgtype.UUID `json:"owner_id"`
|
|
LegacyDaemonID pgtype.Text `json:"legacy_daemon_id"`
|
|
Visibility string `json:"visibility"`
|
|
ProfileID pgtype.UUID `json:"profile_id"`
|
|
CustomName pgtype.Text `json:"custom_name"`
|
|
}
|
|
|
|
type AgentSkill struct {
|
|
AgentID pgtype.UUID `json:"agent_id"`
|
|
SkillID pgtype.UUID `json:"skill_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
Enabled bool `json:"enabled"`
|
|
}
|
|
|
|
type AgentTaskQueue struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
AgentID pgtype.UUID `json:"agent_id"`
|
|
IssueID pgtype.UUID `json:"issue_id"`
|
|
Status string `json:"status"`
|
|
Priority int32 `json:"priority"`
|
|
DispatchedAt pgtype.Timestamptz `json:"dispatched_at"`
|
|
StartedAt pgtype.Timestamptz `json:"started_at"`
|
|
CompletedAt pgtype.Timestamptz `json:"completed_at"`
|
|
Result []byte `json:"result"`
|
|
Error pgtype.Text `json:"error"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
Context []byte `json:"context"`
|
|
RuntimeID pgtype.UUID `json:"runtime_id"`
|
|
SessionID pgtype.Text `json:"session_id"`
|
|
WorkDir pgtype.Text `json:"work_dir"`
|
|
TriggerCommentID pgtype.UUID `json:"trigger_comment_id"`
|
|
ChatSessionID pgtype.UUID `json:"chat_session_id"`
|
|
AutopilotRunID pgtype.UUID `json:"autopilot_run_id"`
|
|
Attempt int32 `json:"attempt"`
|
|
MaxAttempts int32 `json:"max_attempts"`
|
|
ParentTaskID pgtype.UUID `json:"parent_task_id"`
|
|
FailureReason pgtype.Text `json:"failure_reason"`
|
|
TriggerSummary pgtype.Text `json:"trigger_summary"`
|
|
ForceFreshSession bool `json:"force_fresh_session"`
|
|
IsLeaderTask bool `json:"is_leader_task"`
|
|
WaitReason pgtype.Text `json:"wait_reason"`
|
|
InitiatorUserID pgtype.UUID `json:"initiator_user_id"`
|
|
HandoffNote pgtype.Text `json:"handoff_note"`
|
|
PrepareLeaseExpiresAt pgtype.Timestamptz `json:"prepare_lease_expires_at"`
|
|
SquadID pgtype.UUID `json:"squad_id"`
|
|
// Per-task MCP servers computed at dispatch time, merged on top of agent.mcp_config. Currently used by Composio integration to inject the initiator user's session URL. Cleared after task completes via trg_clear_runtime_mcp_overlay.
|
|
RuntimeMcpOverlay []byte `json:"runtime_mcp_overlay"`
|
|
EscalationForTaskID pgtype.UUID `json:"escalation_for_task_id"`
|
|
FireAt pgtype.Timestamptz `json:"fire_at"`
|
|
// Top-of-chain human originator for this run. For human-triggered tasks (comment by a member, chat, quick-create) equals that member. For agent-fanout tasks inherited from the parent task's originator_user_id via comment.source_task_id. NULL when no human is in the chain (autopilot, system-driven). Used by canInvokeAgent to judge A2A by the originator; the Composio overlay now follows invocation permission and uses the agent owner's connection, so this is audit/attribution + A2A gating, NOT a Composio owner==originator gate (MUL-3963).
|
|
OriginatorUserID pgtype.UUID `json:"originator_user_id"`
|
|
// Non-secret per-task connected app metadata corresponding to runtime_mcp_overlay, used by the daemon brief to tell agents which app capabilities are mounted. Cleared with runtime_mcp_overlay after task completion.
|
|
RuntimeConnectedApps []byte `json:"runtime_connected_apps"`
|
|
CoalescedCommentIds []pgtype.UUID `json:"coalesced_comment_ids"`
|
|
DeliveredCommentIds []pgtype.UUID `json:"delivered_comment_ids"`
|
|
ChatInputTaskID pgtype.UUID `json:"chat_input_task_id"`
|
|
ChatFinalizeDeferredAt pgtype.Timestamptz `json:"chat_finalize_deferred_at"`
|
|
// Waterfall level that resolved originator_user_id for this run: direct_human | delegation | comment_source | rule_owner | owner_fallback | backfill | unattributed. Audit/visibility metadata only — never consulted for authorization. TEXT with no CHECK so new trigger paths can add a source without a migration (MUL-4302 §7). NULL on pre-migration rows.
|
|
OriginatorSource pgtype.Text `json:"originator_source"`
|
|
// For originator_source=delegation: the parent task whose accountable human was copied onto this run. Value is copied, not chained, so delegation cycles are harmless (MUL-4302 §3.2). No FK; app-layer integrity only.
|
|
DelegatedFromTaskID pgtype.UUID `json:"delegated_from_task_id"`
|
|
// System transient-failure retry lineage: the task this run re-attempts. Inherits the parent attribution unchanged. Kept distinct from rerun_of_task_id so retry vs rerun report separately (MUL-4302 §5). No FK.
|
|
RetryOfTaskID pgtype.UUID `json:"retry_of_task_id"`
|
|
// Human manual-rerun lineage: the historical task a member re-ran. The rerun itself is a NEW direct_human attribution to the rerunning member; this column preserves the link to the original (MUL-4302 §5). No FK.
|
|
RerunOfTaskID pgtype.UUID `json:"rerun_of_task_id"`
|
|
// For originator_source=rule_owner: the published autopilot rule version snapshot whose publisher is the accountable human. No FK; snapshot table wiring lands in a later Phase 1 increment (MUL-4302 §3.4/§7).
|
|
RuleVersionID pgtype.UUID `json:"rule_version_id"`
|
|
// Uniform kind tag for the direct cause of this run (comment | issue_assignment | autopilot_run | rule_version | rerun | ...), paired with trigger_evidence_ref_id. Free TEXT so new evidence kinds need no migration (MUL-4302 §2).
|
|
TriggerEvidenceKind pgtype.Text `json:"trigger_evidence_kind"`
|
|
// The row id referenced by trigger_evidence_kind (a comment id, autopilot_run id, rule_version id, source task id, ...). No FK; resolvable per-kind in the app layer (MUL-4302 §2).
|
|
TriggerEvidenceRefID pgtype.UUID `json:"trigger_evidence_ref_id"`
|
|
// The one human accountable for this run, for audit / visibility / cost only — NEVER consulted for authorization (that is originator_user_id). Invariant: when originator_user_id IS NOT NULL, this equals it; the two diverge only when originator_user_id IS NULL (autopilot rule_owner / degraded owner_fallback name an accountable human while authorization carries none). No FK, no cascade (MUL-4302 §1/§7). NULL means no accountable human was resolved: a pre-migration row, OR a NEW row whose audit source is not-yet-resolved / unattributed (e.g. run_only autopilot until rule_owner lands) — NOT pre-migration only.
|
|
AccountableUserID pgtype.UUID `json:"accountable_user_id"`
|
|
SessionRolloutMissing bool `json:"session_rollout_missing"`
|
|
RetiredSessionID pgtype.Text `json:"retired_session_id"`
|
|
QuickActionsDisabled bool `json:"quick_actions_disabled"`
|
|
RegenerateQuickActionsFor pgtype.UUID `json:"regenerate_quick_actions_for"`
|
|
}
|
|
|
|
type AgentToLabel struct {
|
|
AgentID pgtype.UUID `json:"agent_id"`
|
|
LabelID pgtype.UUID `json:"label_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Attachment struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
IssueID pgtype.UUID `json:"issue_id"`
|
|
CommentID pgtype.UUID `json:"comment_id"`
|
|
UploaderType string `json:"uploader_type"`
|
|
UploaderID pgtype.UUID `json:"uploader_id"`
|
|
Filename string `json:"filename"`
|
|
Url string `json:"url"`
|
|
ContentType string `json:"content_type"`
|
|
SizeBytes int64 `json:"size_bytes"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
ChatSessionID pgtype.UUID `json:"chat_session_id"`
|
|
ChatMessageID pgtype.UUID `json:"chat_message_id"`
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
}
|
|
|
|
type Autopilot struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
Title string `json:"title"`
|
|
Description pgtype.Text `json:"description"`
|
|
AssigneeID pgtype.UUID `json:"assignee_id"`
|
|
Status string `json:"status"`
|
|
ExecutionMode string `json:"execution_mode"`
|
|
IssueTitleTemplate pgtype.Text `json:"issue_title_template"`
|
|
CreatedByType string `json:"created_by_type"`
|
|
CreatedByID pgtype.UUID `json:"created_by_id"`
|
|
LastRunAt pgtype.Timestamptz `json:"last_run_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
AssigneeType string `json:"assignee_type"`
|
|
ProjectID pgtype.UUID `json:"project_id"`
|
|
PauseReason pgtype.Text `json:"pause_reason"`
|
|
}
|
|
|
|
type AutopilotCollaborator struct {
|
|
AutopilotID pgtype.UUID `json:"autopilot_id"`
|
|
UserType string `json:"user_type"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
GrantedBy pgtype.UUID `json:"granted_by"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
// Append-only snapshot of autopilot rule publishes (MUL-4302 §3.4). One row per substantive publish (create / enable / resume / trigger-condition / target / instructions change), recording the publisher + effective-config summary. Dispatch resolves the latest row for an autopilot as the run's rule_owner accountable human. No FK, no cascade.
|
|
type AutopilotRuleVersion struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
AutopilotID pgtype.UUID `json:"autopilot_id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
PublishedByType string `json:"published_by_type"`
|
|
PublishedByID pgtype.UUID `json:"published_by_id"`
|
|
ConfigSummary []byte `json:"config_summary"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type AutopilotRun struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
AutopilotID pgtype.UUID `json:"autopilot_id"`
|
|
TriggerID pgtype.UUID `json:"trigger_id"`
|
|
Source string `json:"source"`
|
|
Status string `json:"status"`
|
|
IssueID pgtype.UUID `json:"issue_id"`
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
TriggeredAt pgtype.Timestamptz `json:"triggered_at"`
|
|
CompletedAt pgtype.Timestamptz `json:"completed_at"`
|
|
FailureReason pgtype.Text `json:"failure_reason"`
|
|
TriggerPayload []byte `json:"trigger_payload"`
|
|
Result []byte `json:"result"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
SquadID pgtype.UUID `json:"squad_id"`
|
|
PlannedAt pgtype.Timestamptz `json:"planned_at"`
|
|
WebhookDeliveryID pgtype.UUID `json:"webhook_delivery_id"`
|
|
}
|
|
|
|
type AutopilotSubscriber struct {
|
|
AutopilotID pgtype.UUID `json:"autopilot_id"`
|
|
UserType string `json:"user_type"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type AutopilotTrigger struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
AutopilotID pgtype.UUID `json:"autopilot_id"`
|
|
Kind string `json:"kind"`
|
|
Enabled bool `json:"enabled"`
|
|
CronExpression pgtype.Text `json:"cron_expression"`
|
|
Timezone pgtype.Text `json:"timezone"`
|
|
NextRunAt pgtype.Timestamptz `json:"next_run_at"`
|
|
WebhookToken pgtype.Text `json:"webhook_token"`
|
|
Label pgtype.Text `json:"label"`
|
|
LastFiredAt pgtype.Timestamptz `json:"last_fired_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
Provider string `json:"provider"`
|
|
SigningSecret pgtype.Text `json:"signing_secret"`
|
|
EventFilters []byte `json:"event_filters"`
|
|
// Actor type of the trigger's current responsible publisher: member | agent. Set to the creator at creation and re-stamped to the editor on any substantive edit governing this trigger. Consumed only for attribution (source=trigger_owner) — never authorization. NULL on pre-migration triggers (MUL-4302).
|
|
PublishedByType pgtype.Text `json:"published_by_type"`
|
|
// The member/agent currently responsible for this trigger's effective config (creator, then last substantive editor). For a member this is the accountable human of runs the trigger fires (source=trigger_owner). No FK, app-layer integrity. NULL on pre-migration triggers, which degrade to rule_owner (MUL-4302).
|
|
PublishedByID pgtype.UUID `json:"published_by_id"`
|
|
}
|
|
|
|
type ChannelBindingToken struct {
|
|
TokenHash string `json:"token_hash"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
InstallationID pgtype.UUID `json:"installation_id"`
|
|
ChannelType string `json:"channel_type"`
|
|
ChannelUserID string `json:"channel_user_id"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
ConsumedAt pgtype.Timestamptz `json:"consumed_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type ChannelChatSessionBinding struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
ChatSessionID pgtype.UUID `json:"chat_session_id"`
|
|
InstallationID pgtype.UUID `json:"installation_id"`
|
|
ChannelType string `json:"channel_type"`
|
|
ChannelChatID string `json:"channel_chat_id"`
|
|
ChatType string `json:"chat_type"`
|
|
LastMessageID pgtype.Text `json:"last_message_id"`
|
|
LastThreadID pgtype.Text `json:"last_thread_id"`
|
|
Config []byte `json:"config"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type ChannelInboundAudit struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
InstallationID pgtype.UUID `json:"installation_id"`
|
|
ChannelType string `json:"channel_type"`
|
|
ChannelChatID pgtype.Text `json:"channel_chat_id"`
|
|
EventType string `json:"event_type"`
|
|
ChannelEventID pgtype.Text `json:"channel_event_id"`
|
|
ChannelMessageID pgtype.Text `json:"channel_message_id"`
|
|
DropReason string `json:"drop_reason"`
|
|
ReceivedAt pgtype.Timestamptz `json:"received_at"`
|
|
}
|
|
|
|
type ChannelInboundMessageDedup struct {
|
|
InstallationID pgtype.UUID `json:"installation_id"`
|
|
MessageID string `json:"message_id"`
|
|
ReceivedAt pgtype.Timestamptz `json:"received_at"`
|
|
ProcessedAt pgtype.Timestamptz `json:"processed_at"`
|
|
ClaimToken pgtype.UUID `json:"claim_token"`
|
|
}
|
|
|
|
type ChannelInstallation struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
AgentID pgtype.UUID `json:"agent_id"`
|
|
ChannelType string `json:"channel_type"`
|
|
Config []byte `json:"config"`
|
|
Status string `json:"status"`
|
|
WsLeaseToken pgtype.Text `json:"ws_lease_token"`
|
|
WsLeaseExpiresAt pgtype.Timestamptz `json:"ws_lease_expires_at"`
|
|
InstallerUserID pgtype.UUID `json:"installer_user_id"`
|
|
InstalledAt pgtype.Timestamptz `json:"installed_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type ChannelMediaPendingObject struct {
|
|
StorageKey string `json:"storage_key"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
ChatMessageID pgtype.UUID `json:"chat_message_id"`
|
|
StorageUrl string `json:"storage_url"`
|
|
InstallationID pgtype.UUID `json:"installation_id"`
|
|
State string `json:"state"`
|
|
LeaseToken pgtype.UUID `json:"lease_token"`
|
|
LeaseExpiresAt pgtype.Timestamptz `json:"lease_expires_at"`
|
|
Attempt int32 `json:"attempt"`
|
|
NextAttemptAt pgtype.Timestamptz `json:"next_attempt_at"`
|
|
LastError pgtype.Text `json:"last_error"`
|
|
TombstonePass int32 `json:"tombstone_pass"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type ChannelOutboundCardMessage struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
ChatSessionID pgtype.UUID `json:"chat_session_id"`
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
ChannelType string `json:"channel_type"`
|
|
ChannelChatID string `json:"channel_chat_id"`
|
|
ChannelCardMessageID string `json:"channel_card_message_id"`
|
|
Status string `json:"status"`
|
|
LastPatchedAt pgtype.Timestamptz `json:"last_patched_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type ChannelUserBinding struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
MulticaUserID pgtype.UUID `json:"multica_user_id"`
|
|
InstallationID pgtype.UUID `json:"installation_id"`
|
|
ChannelType string `json:"channel_type"`
|
|
ChannelUserID string `json:"channel_user_id"`
|
|
Config []byte `json:"config"`
|
|
BoundAt pgtype.Timestamptz `json:"bound_at"`
|
|
}
|
|
|
|
type ChatDraftRestore struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
ChatSessionID pgtype.UUID `json:"chat_session_id"`
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
Content string `json:"content"`
|
|
AttachmentIds []pgtype.UUID `json:"attachment_ids"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type ChatMessage struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
ChatSessionID pgtype.UUID `json:"chat_session_id"`
|
|
Role string `json:"role"`
|
|
Content string `json:"content"`
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
FailureReason pgtype.Text `json:"failure_reason"`
|
|
ElapsedMs pgtype.Int8 `json:"elapsed_ms"`
|
|
MessageKind string `json:"message_kind"`
|
|
ChannelMediaPendingUntil pgtype.Timestamptz `json:"channel_media_pending_until"`
|
|
ChannelIngested bool `json:"channel_ingested"`
|
|
QuickActions []byte `json:"quick_actions"`
|
|
}
|
|
|
|
type ChatPinnedAgent struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
AgentID pgtype.UUID `json:"agent_id"`
|
|
Position float64 `json:"position"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type ChatSession struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
AgentID pgtype.UUID `json:"agent_id"`
|
|
CreatorID pgtype.UUID `json:"creator_id"`
|
|
Title string `json:"title"`
|
|
SessionID pgtype.Text `json:"session_id"`
|
|
WorkDir pgtype.Text `json:"work_dir"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
UnreadSince pgtype.Timestamptz `json:"unread_since"`
|
|
RuntimeID pgtype.UUID `json:"runtime_id"`
|
|
LastReadAt pgtype.Timestamptz `json:"last_read_at"`
|
|
IsAgentIntro bool `json:"is_agent_intro"`
|
|
PinnedAt pgtype.Timestamptz `json:"pinned_at"`
|
|
ProjectID pgtype.UUID `json:"project_id"`
|
|
}
|
|
|
|
type ClientUsageDaily struct {
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
ClientType string `json:"client_type"`
|
|
InstallID pgtype.UUID `json:"install_id"`
|
|
ActivityDate pgtype.Date `json:"activity_date"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
ClientVersion string `json:"client_version"`
|
|
Os string `json:"os"`
|
|
FirstActiveAt pgtype.Timestamptz `json:"first_active_at"`
|
|
LastActiveAt pgtype.Timestamptz `json:"last_active_at"`
|
|
RuntimeProbedAt pgtype.Timestamptz `json:"runtime_probed_at"`
|
|
ProbeResult pgtype.Text `json:"probe_result"`
|
|
RuntimeCount pgtype.Int4 `json:"runtime_count"`
|
|
ProviderSummary []byte `json:"provider_summary"`
|
|
OnlineCount pgtype.Int4 `json:"online_count"`
|
|
OfflineCount pgtype.Int4 `json:"offline_count"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type Comment struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
IssueID pgtype.UUID `json:"issue_id"`
|
|
AuthorType string `json:"author_type"`
|
|
AuthorID pgtype.UUID `json:"author_id"`
|
|
Content string `json:"content"`
|
|
Type string `json:"type"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
ParentID pgtype.UUID `json:"parent_id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
ResolvedAt pgtype.Timestamptz `json:"resolved_at"`
|
|
ResolvedByType pgtype.Text `json:"resolved_by_type"`
|
|
ResolvedByID pgtype.UUID `json:"resolved_by_id"`
|
|
SourceTaskID pgtype.UUID `json:"source_task_id"`
|
|
QuickActionID pgtype.UUID `json:"quick_action_id"`
|
|
}
|
|
|
|
type CommentReaction struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
CommentID pgtype.UUID `json:"comment_id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
ActorType string `json:"actor_type"`
|
|
ActorID pgtype.UUID `json:"actor_id"`
|
|
Emoji string `json:"emoji"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type ContactSalesInquiry struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
FirstName string `json:"first_name"`
|
|
LastName string `json:"last_name"`
|
|
BusinessEmail string `json:"business_email"`
|
|
CompanyName string `json:"company_name"`
|
|
CompanySize string `json:"company_size"`
|
|
CountryRegion string `json:"country_region"`
|
|
UseCase string `json:"use_case"`
|
|
Goals string `json:"goals"`
|
|
ConsentOutreach bool `json:"consent_outreach"`
|
|
ConsentUpdates bool `json:"consent_updates"`
|
|
SubmitterIp *netip.Addr `json:"submitter_ip"`
|
|
UserAgent string `json:"user_agent"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type DaemonConnection struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
AgentID pgtype.UUID `json:"agent_id"`
|
|
DaemonID string `json:"daemon_id"`
|
|
Status string `json:"status"`
|
|
LastHeartbeatAt pgtype.Timestamptz `json:"last_heartbeat_at"`
|
|
RuntimeInfo []byte `json:"runtime_info"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type DaemonToken struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
TokenHash string `json:"token_hash"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
DaemonID string `json:"daemon_id"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Feedback struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
Message string `json:"message"`
|
|
Metadata []byte `json:"metadata"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type GithubInstallation struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
InstallationID int64 `json:"installation_id"`
|
|
AccountLogin string `json:"account_login"`
|
|
AccountType string `json:"account_type"`
|
|
AccountAvatarUrl pgtype.Text `json:"account_avatar_url"`
|
|
ConnectedByID pgtype.UUID `json:"connected_by_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type GithubPendingCheckSuite struct {
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
InstallationID int64 `json:"installation_id"`
|
|
RepoOwner string `json:"repo_owner"`
|
|
RepoName string `json:"repo_name"`
|
|
PrNumber int32 `json:"pr_number"`
|
|
SuiteID int64 `json:"suite_id"`
|
|
HeadSha string `json:"head_sha"`
|
|
AppID int64 `json:"app_id"`
|
|
Conclusion pgtype.Text `json:"conclusion"`
|
|
Status string `json:"status"`
|
|
SuiteUpdatedAt pgtype.Timestamptz `json:"suite_updated_at"`
|
|
ReceivedAt pgtype.Timestamptz `json:"received_at"`
|
|
}
|
|
|
|
type GithubPendingInstallation struct {
|
|
InstallationID int64 `json:"installation_id"`
|
|
AccountLogin string `json:"account_login"`
|
|
AccountType string `json:"account_type"`
|
|
AccountAvatarUrl pgtype.Text `json:"account_avatar_url"`
|
|
ReceivedAt pgtype.Timestamptz `json:"received_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type GithubPullRequest struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
InstallationID int64 `json:"installation_id"`
|
|
RepoOwner string `json:"repo_owner"`
|
|
RepoName string `json:"repo_name"`
|
|
PrNumber int32 `json:"pr_number"`
|
|
Title string `json:"title"`
|
|
State string `json:"state"`
|
|
HtmlUrl string `json:"html_url"`
|
|
Branch pgtype.Text `json:"branch"`
|
|
AuthorLogin pgtype.Text `json:"author_login"`
|
|
AuthorAvatarUrl pgtype.Text `json:"author_avatar_url"`
|
|
MergedAt pgtype.Timestamptz `json:"merged_at"`
|
|
ClosedAt pgtype.Timestamptz `json:"closed_at"`
|
|
PrCreatedAt pgtype.Timestamptz `json:"pr_created_at"`
|
|
PrUpdatedAt pgtype.Timestamptz `json:"pr_updated_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
HeadSha string `json:"head_sha"`
|
|
MergeableState pgtype.Text `json:"mergeable_state"`
|
|
Additions int32 `json:"additions"`
|
|
Deletions int32 `json:"deletions"`
|
|
ChangedFiles int32 `json:"changed_files"`
|
|
ApiMergeable pgtype.Text `json:"api_mergeable"`
|
|
ApiMergeStateStatus pgtype.Text `json:"api_merge_state_status"`
|
|
ChecksRollupState pgtype.Text `json:"checks_rollup_state"`
|
|
SnapshotHeadSha string `json:"snapshot_head_sha"`
|
|
SnapshotFetchedAt pgtype.Timestamptz `json:"snapshot_fetched_at"`
|
|
}
|
|
|
|
type GithubPullRequestCheckRun struct {
|
|
PrID pgtype.UUID `json:"pr_id"`
|
|
HeadSha string `json:"head_sha"`
|
|
Ordinal int32 `json:"ordinal"`
|
|
Name string `json:"name"`
|
|
Status string `json:"status"`
|
|
Conclusion pgtype.Text `json:"conclusion"`
|
|
DetailsUrl pgtype.Text `json:"details_url"`
|
|
IsStatusContext bool `json:"is_status_context"`
|
|
}
|
|
|
|
type GithubPullRequestCheckSuite struct {
|
|
PrID pgtype.UUID `json:"pr_id"`
|
|
SuiteID int64 `json:"suite_id"`
|
|
HeadSha string `json:"head_sha"`
|
|
AppID int64 `json:"app_id"`
|
|
Conclusion pgtype.Text `json:"conclusion"`
|
|
Status string `json:"status"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type InboxItem struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
RecipientType string `json:"recipient_type"`
|
|
RecipientID pgtype.UUID `json:"recipient_id"`
|
|
Type string `json:"type"`
|
|
Severity string `json:"severity"`
|
|
IssueID pgtype.UUID `json:"issue_id"`
|
|
Title string `json:"title"`
|
|
Body pgtype.Text `json:"body"`
|
|
Read bool `json:"read"`
|
|
Archived bool `json:"archived"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
ActorType pgtype.Text `json:"actor_type"`
|
|
ActorID pgtype.UUID `json:"actor_id"`
|
|
Details []byte `json:"details"`
|
|
}
|
|
|
|
type Issue struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
Title string `json:"title"`
|
|
Description pgtype.Text `json:"description"`
|
|
Status string `json:"status"`
|
|
Priority string `json:"priority"`
|
|
AssigneeType pgtype.Text `json:"assignee_type"`
|
|
AssigneeID pgtype.UUID `json:"assignee_id"`
|
|
CreatorType string `json:"creator_type"`
|
|
CreatorID pgtype.UUID `json:"creator_id"`
|
|
ParentIssueID pgtype.UUID `json:"parent_issue_id"`
|
|
AcceptanceCriteria []byte `json:"acceptance_criteria"`
|
|
ContextRefs []byte `json:"context_refs"`
|
|
Position float64 `json:"position"`
|
|
DueDate pgtype.Date `json:"due_date"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
Number int32 `json:"number"`
|
|
ProjectID pgtype.UUID `json:"project_id"`
|
|
OriginType pgtype.Text `json:"origin_type"`
|
|
OriginID pgtype.UUID `json:"origin_id"`
|
|
FirstExecutedAt pgtype.Timestamptz `json:"first_executed_at"`
|
|
StartDate pgtype.Date `json:"start_date"`
|
|
Metadata []byte `json:"metadata"`
|
|
Stage pgtype.Int4 `json:"stage"`
|
|
Properties []byte `json:"properties"`
|
|
}
|
|
|
|
type IssueDependency struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
IssueID pgtype.UUID `json:"issue_id"`
|
|
DependsOnIssueID pgtype.UUID `json:"depends_on_issue_id"`
|
|
Type string `json:"type"`
|
|
}
|
|
|
|
type IssueLabel struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
Name string `json:"name"`
|
|
Color string `json:"color"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
ResourceType string `json:"resource_type"`
|
|
Description string `json:"description"`
|
|
}
|
|
|
|
type IssueProperty struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
Description string `json:"description"`
|
|
Config []byte `json:"config"`
|
|
Position float64 `json:"position"`
|
|
ArchivedAt pgtype.Timestamptz `json:"archived_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
Icon string `json:"icon"`
|
|
}
|
|
|
|
type IssuePullRequest struct {
|
|
IssueID pgtype.UUID `json:"issue_id"`
|
|
PullRequestID pgtype.UUID `json:"pull_request_id"`
|
|
LinkedByType pgtype.Text `json:"linked_by_type"`
|
|
LinkedByID pgtype.UUID `json:"linked_by_id"`
|
|
LinkedAt pgtype.Timestamptz `json:"linked_at"`
|
|
CloseIntent bool `json:"close_intent"`
|
|
ReferenceOnly bool `json:"reference_only"`
|
|
}
|
|
|
|
type IssueReaction struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
IssueID pgtype.UUID `json:"issue_id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
ActorType string `json:"actor_type"`
|
|
ActorID pgtype.UUID `json:"actor_id"`
|
|
Emoji string `json:"emoji"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type IssueSubscriber struct {
|
|
IssueID pgtype.UUID `json:"issue_id"`
|
|
UserType string `json:"user_type"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
Reason string `json:"reason"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UnsubscribedAt pgtype.Timestamptz `json:"unsubscribed_at"`
|
|
OptOutScope pgtype.Text `json:"opt_out_scope"`
|
|
}
|
|
|
|
type IssueToLabel struct {
|
|
IssueID pgtype.UUID `json:"issue_id"`
|
|
LabelID pgtype.UUID `json:"label_id"`
|
|
}
|
|
|
|
type IssueVcsPullRequest struct {
|
|
IssueID pgtype.UUID `json:"issue_id"`
|
|
PullRequestID pgtype.UUID `json:"pull_request_id"`
|
|
CloseIntent bool `json:"close_intent"`
|
|
ReferenceOnly bool `json:"reference_only"`
|
|
LinkedByType pgtype.Text `json:"linked_by_type"`
|
|
LinkedByID pgtype.UUID `json:"linked_by_id"`
|
|
LinkedAt pgtype.Timestamptz `json:"linked_at"`
|
|
}
|
|
|
|
type LarkBindingToken struct {
|
|
TokenHash string `json:"token_hash"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
InstallationID pgtype.UUID `json:"installation_id"`
|
|
LarkOpenID string `json:"lark_open_id"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
ConsumedAt pgtype.Timestamptz `json:"consumed_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type LarkChatSessionBinding struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
ChatSessionID pgtype.UUID `json:"chat_session_id"`
|
|
InstallationID pgtype.UUID `json:"installation_id"`
|
|
LarkChatID string `json:"lark_chat_id"`
|
|
LarkChatType string `json:"lark_chat_type"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
LastLarkMessageID pgtype.Text `json:"last_lark_message_id"`
|
|
LastLarkThreadID pgtype.Text `json:"last_lark_thread_id"`
|
|
}
|
|
|
|
type LarkInboundAudit struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
InstallationID pgtype.UUID `json:"installation_id"`
|
|
LarkChatID pgtype.Text `json:"lark_chat_id"`
|
|
EventType string `json:"event_type"`
|
|
LarkEventID pgtype.Text `json:"lark_event_id"`
|
|
LarkMessageID pgtype.Text `json:"lark_message_id"`
|
|
DropReason string `json:"drop_reason"`
|
|
ReceivedAt pgtype.Timestamptz `json:"received_at"`
|
|
}
|
|
|
|
type LarkInboundMessageDedup struct {
|
|
InstallationID pgtype.UUID `json:"installation_id"`
|
|
MessageID string `json:"message_id"`
|
|
ReceivedAt pgtype.Timestamptz `json:"received_at"`
|
|
ProcessedAt pgtype.Timestamptz `json:"processed_at"`
|
|
ClaimToken pgtype.UUID `json:"claim_token"`
|
|
}
|
|
|
|
type LarkInstallation struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
AgentID pgtype.UUID `json:"agent_id"`
|
|
AppID string `json:"app_id"`
|
|
AppSecretEncrypted []byte `json:"app_secret_encrypted"`
|
|
TenantKey pgtype.Text `json:"tenant_key"`
|
|
BotOpenID string `json:"bot_open_id"`
|
|
InstallerUserID pgtype.UUID `json:"installer_user_id"`
|
|
Status string `json:"status"`
|
|
WsLeaseToken pgtype.Text `json:"ws_lease_token"`
|
|
WsLeaseExpiresAt pgtype.Timestamptz `json:"ws_lease_expires_at"`
|
|
InstalledAt pgtype.Timestamptz `json:"installed_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
BotUnionID pgtype.Text `json:"bot_union_id"`
|
|
Region string `json:"region"`
|
|
}
|
|
|
|
type LarkOutboundCardMessage struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
ChatSessionID pgtype.UUID `json:"chat_session_id"`
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
LarkChatID string `json:"lark_chat_id"`
|
|
LarkCardMessageID string `json:"lark_card_message_id"`
|
|
Status string `json:"status"`
|
|
LastPatchedAt pgtype.Timestamptz `json:"last_patched_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type LarkUserBinding struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
MulticaUserID pgtype.UUID `json:"multica_user_id"`
|
|
InstallationID pgtype.UUID `json:"installation_id"`
|
|
LarkOpenID string `json:"lark_open_id"`
|
|
UnionID pgtype.Text `json:"union_id"`
|
|
BoundAt pgtype.Timestamptz `json:"bound_at"`
|
|
}
|
|
|
|
type Member struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
Role string `json:"role"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type NotificationPreference struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
Preferences []byte `json:"preferences"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type PersonalAccessToken struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
Name string `json:"name"`
|
|
TokenHash string `json:"token_hash"`
|
|
TokenPrefix string `json:"token_prefix"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
LastUsedAt pgtype.Timestamptz `json:"last_used_at"`
|
|
Revoked bool `json:"revoked"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type PinnedItem struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
ItemType string `json:"item_type"`
|
|
ItemID pgtype.UUID `json:"item_id"`
|
|
Position float64 `json:"position"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Project struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
Title string `json:"title"`
|
|
Description pgtype.Text `json:"description"`
|
|
Icon pgtype.Text `json:"icon"`
|
|
Status string `json:"status"`
|
|
LeadType pgtype.Text `json:"lead_type"`
|
|
LeadID pgtype.UUID `json:"lead_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
Priority string `json:"priority"`
|
|
StartDate pgtype.Date `json:"start_date"`
|
|
DueDate pgtype.Date `json:"due_date"`
|
|
}
|
|
|
|
type ProjectResource struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
ProjectID pgtype.UUID `json:"project_id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
ResourceType string `json:"resource_type"`
|
|
ResourceRef []byte `json:"resource_ref"`
|
|
Label pgtype.Text `json:"label"`
|
|
Position int32 `json:"position"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
CreatedBy pgtype.UUID `json:"created_by"`
|
|
}
|
|
|
|
type QuickAction struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
AssigneeType string `json:"assignee_type"`
|
|
AssigneeID pgtype.UUID `json:"assignee_id"`
|
|
Prompt string `json:"prompt"`
|
|
Visibility string `json:"visibility"`
|
|
Status string `json:"status"`
|
|
LastUsedAt pgtype.Timestamptz `json:"last_used_at"`
|
|
UseCount int64 `json:"use_count"`
|
|
CreatedByType string `json:"created_by_type"`
|
|
CreatedByID pgtype.UUID `json:"created_by_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type RuntimeProfile struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
DisplayName string `json:"display_name"`
|
|
ProtocolFamily string `json:"protocol_family"`
|
|
CommandName string `json:"command_name"`
|
|
Description pgtype.Text `json:"description"`
|
|
FixedArgs []byte `json:"fixed_args"`
|
|
Visibility string `json:"visibility"`
|
|
CreatedBy pgtype.UUID `json:"created_by"`
|
|
Enabled bool `json:"enabled"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type Skill struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
Content string `json:"content"`
|
|
Config []byte `json:"config"`
|
|
CreatedBy pgtype.UUID `json:"created_by"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type SkillFile struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
SkillID pgtype.UUID `json:"skill_id"`
|
|
Path string `json:"path"`
|
|
Content string `json:"content"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type SkillToLabel struct {
|
|
SkillID pgtype.UUID `json:"skill_id"`
|
|
LabelID pgtype.UUID `json:"label_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type Squad struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
LeaderID pgtype.UUID `json:"leader_id"`
|
|
CreatorID pgtype.UUID `json:"creator_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
ArchivedAt pgtype.Timestamptz `json:"archived_at"`
|
|
ArchivedBy pgtype.UUID `json:"archived_by"`
|
|
AvatarUrl pgtype.Text `json:"avatar_url"`
|
|
Instructions string `json:"instructions"`
|
|
}
|
|
|
|
type SquadMember struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
SquadID pgtype.UUID `json:"squad_id"`
|
|
MemberType string `json:"member_type"`
|
|
MemberID pgtype.UUID `json:"member_id"`
|
|
Role string `json:"role"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type SysCronExecution struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
JobName string `json:"job_name"`
|
|
ScopeKind string `json:"scope_kind"`
|
|
ScopeID string `json:"scope_id"`
|
|
PlanTime pgtype.Timestamptz `json:"plan_time"`
|
|
Status string `json:"status"`
|
|
Attempt int32 `json:"attempt"`
|
|
MaxAttempts int32 `json:"max_attempts"`
|
|
NextRetryAt pgtype.Timestamptz `json:"next_retry_at"`
|
|
RunnerID pgtype.Text `json:"runner_id"`
|
|
LeaseToken pgtype.UUID `json:"lease_token"`
|
|
HeartbeatAt pgtype.Timestamptz `json:"heartbeat_at"`
|
|
StaleAfter pgtype.Timestamptz `json:"stale_after"`
|
|
StartedAt pgtype.Timestamptz `json:"started_at"`
|
|
FinishedAt pgtype.Timestamptz `json:"finished_at"`
|
|
DurationMs pgtype.Int4 `json:"duration_ms"`
|
|
RowsAffected pgtype.Int8 `json:"rows_affected"`
|
|
Result []byte `json:"result"`
|
|
ErrorCode pgtype.Text `json:"error_code"`
|
|
ErrorMsg pgtype.Text `json:"error_msg"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type TaskMessage struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
Seq int32 `json:"seq"`
|
|
Type string `json:"type"`
|
|
Tool pgtype.Text `json:"tool"`
|
|
Content pgtype.Text `json:"content"`
|
|
Input []byte `json:"input"`
|
|
Output pgtype.Text `json:"output"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type TaskToken struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
TokenHash string `json:"token_hash"`
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
AgentID pgtype.UUID `json:"agent_id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type TaskUsage struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
Provider string `json:"provider"`
|
|
Model string `json:"model"`
|
|
InputTokens int64 `json:"input_tokens"`
|
|
OutputTokens int64 `json:"output_tokens"`
|
|
CacheReadTokens int64 `json:"cache_read_tokens"`
|
|
CacheWriteTokens int64 `json:"cache_write_tokens"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
// Provider-reported cost in 1e-10 USD. NULL when the provider reports none; those rows are priced client-side from the static rate table.
|
|
CostUsdTicks pgtype.Int8 `json:"cost_usd_ticks"`
|
|
}
|
|
|
|
type TaskUsageHourly struct {
|
|
BucketHour pgtype.Timestamptz `json:"bucket_hour"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
RuntimeID pgtype.UUID `json:"runtime_id"`
|
|
AgentID pgtype.UUID `json:"agent_id"`
|
|
ProjectID pgtype.UUID `json:"project_id"`
|
|
Provider string `json:"provider"`
|
|
Model string `json:"model"`
|
|
InputTokens int64 `json:"input_tokens"`
|
|
OutputTokens int64 `json:"output_tokens"`
|
|
CacheReadTokens int64 `json:"cache_read_tokens"`
|
|
CacheWriteTokens int64 `json:"cache_write_tokens"`
|
|
TaskCount int64 `json:"task_count"`
|
|
EventCount int64 `json:"event_count"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
// Sum of provider-reported cost (1e-10 USD) over the rows in this bucket that had one; 0 when none did.
|
|
CostUsdTicks int64 `json:"cost_usd_ticks"`
|
|
// Input tokens from rows with no provider-reported cost — the portion still priced from the static rate table. NULL on buckets not yet recomputed since this column existed; readers COALESCE to input_tokens.
|
|
UncostedInputTokens pgtype.Int8 `json:"uncosted_input_tokens"`
|
|
UncostedOutputTokens pgtype.Int8 `json:"uncosted_output_tokens"`
|
|
UncostedCacheReadTokens pgtype.Int8 `json:"uncosted_cache_read_tokens"`
|
|
UncostedCacheWriteTokens pgtype.Int8 `json:"uncosted_cache_write_tokens"`
|
|
}
|
|
|
|
type TaskUsageHourlyDirty struct {
|
|
BucketHour pgtype.Timestamptz `json:"bucket_hour"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
RuntimeID pgtype.UUID `json:"runtime_id"`
|
|
AgentID pgtype.UUID `json:"agent_id"`
|
|
ProjectID pgtype.UUID `json:"project_id"`
|
|
Provider string `json:"provider"`
|
|
Model string `json:"model"`
|
|
EnqueuedAt pgtype.Timestamptz `json:"enqueued_at"`
|
|
}
|
|
|
|
type TaskUsageHourlyRollupState struct {
|
|
ID int16 `json:"id"`
|
|
WatermarkAt pgtype.Timestamptz `json:"watermark_at"`
|
|
LastRunStartedAt pgtype.Timestamptz `json:"last_run_started_at"`
|
|
LastRunFinishedAt pgtype.Timestamptz `json:"last_run_finished_at"`
|
|
LastRunRows int64 `json:"last_run_rows"`
|
|
LastError pgtype.Text `json:"last_error"`
|
|
}
|
|
|
|
type User struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
Name string `json:"name"`
|
|
Email string `json:"email"`
|
|
AvatarUrl pgtype.Text `json:"avatar_url"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
OnboardedAt pgtype.Timestamptz `json:"onboarded_at"`
|
|
OnboardingQuestionnaire []byte `json:"onboarding_questionnaire"`
|
|
CloudWaitlistEmail pgtype.Text `json:"cloud_waitlist_email"`
|
|
CloudWaitlistReason pgtype.Text `json:"cloud_waitlist_reason"`
|
|
StarterContentState pgtype.Text `json:"starter_content_state"`
|
|
Language pgtype.Text `json:"language"`
|
|
ProfileDescription string `json:"profile_description"`
|
|
// User-preferred IANA timezone for report rendering (Viewing tz). NULL means "use the browser-detected tz at render time". Affects dashboards, charts, and any "today" label shown to this user. Does not affect data materialisation — all rollups remain in UTC.
|
|
Timezone pgtype.Text `json:"timezone"`
|
|
}
|
|
|
|
type UserComposioConnection struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
UserID pgtype.UUID `json:"user_id"`
|
|
ToolkitSlug string `json:"toolkit_slug"`
|
|
AuthConfigID string `json:"auth_config_id"`
|
|
ConnectedAccountID string `json:"connected_account_id"`
|
|
ComposioUserID string `json:"composio_user_id"`
|
|
Status string `json:"status"`
|
|
ConnectedAt pgtype.Timestamptz `json:"connected_at"`
|
|
LastUsedAt pgtype.Timestamptz `json:"last_used_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type VcsCommitStatus struct {
|
|
ConnectionID pgtype.UUID `json:"connection_id"`
|
|
Sha string `json:"sha"`
|
|
Context string `json:"context"`
|
|
State string `json:"state"`
|
|
TargetUrl pgtype.Text `json:"target_url"`
|
|
Description pgtype.Text `json:"description"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type VcsConnection struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
Provider string `json:"provider"`
|
|
InstanceUrl string `json:"instance_url"`
|
|
AccountLogin string `json:"account_login"`
|
|
AccessTokenEncrypted string `json:"access_token_encrypted"`
|
|
WebhookSecretEncrypted string `json:"webhook_secret_encrypted"`
|
|
ConnectedByID pgtype.UUID `json:"connected_by_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type VcsPullRequest struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
ConnectionID pgtype.UUID `json:"connection_id"`
|
|
Provider string `json:"provider"`
|
|
RepoOwner string `json:"repo_owner"`
|
|
RepoName string `json:"repo_name"`
|
|
PrNumber int32 `json:"pr_number"`
|
|
Title string `json:"title"`
|
|
State string `json:"state"`
|
|
HtmlUrl string `json:"html_url"`
|
|
Branch pgtype.Text `json:"branch"`
|
|
HeadSha string `json:"head_sha"`
|
|
AuthorLogin pgtype.Text `json:"author_login"`
|
|
AuthorAvatarUrl pgtype.Text `json:"author_avatar_url"`
|
|
MergedAt pgtype.Timestamptz `json:"merged_at"`
|
|
ClosedAt pgtype.Timestamptz `json:"closed_at"`
|
|
PrCreatedAt pgtype.Timestamptz `json:"pr_created_at"`
|
|
PrUpdatedAt pgtype.Timestamptz `json:"pr_updated_at"`
|
|
Additions int32 `json:"additions"`
|
|
Deletions int32 `json:"deletions"`
|
|
ChangedFiles int32 `json:"changed_files"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type VerificationCode struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
Email string `json:"email"`
|
|
Code string `json:"code"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
Used bool `json:"used"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
Attempts int32 `json:"attempts"`
|
|
}
|
|
|
|
type WebhookDelivery struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
AutopilotID pgtype.UUID `json:"autopilot_id"`
|
|
TriggerID pgtype.UUID `json:"trigger_id"`
|
|
Provider string `json:"provider"`
|
|
Event string `json:"event"`
|
|
DedupeKey pgtype.Text `json:"dedupe_key"`
|
|
DedupeSource pgtype.Text `json:"dedupe_source"`
|
|
SignatureStatus string `json:"signature_status"`
|
|
Status string `json:"status"`
|
|
AttemptCount int32 `json:"attempt_count"`
|
|
SelectedHeaders []byte `json:"selected_headers"`
|
|
ContentType pgtype.Text `json:"content_type"`
|
|
RawBody []byte `json:"raw_body"`
|
|
ResponseStatus pgtype.Int4 `json:"response_status"`
|
|
ResponseBody pgtype.Text `json:"response_body"`
|
|
AutopilotRunID pgtype.UUID `json:"autopilot_run_id"`
|
|
ReplayedFromDeliveryID pgtype.UUID `json:"replayed_from_delivery_id"`
|
|
Error pgtype.Text `json:"error"`
|
|
ReceivedAt pgtype.Timestamptz `json:"received_at"`
|
|
LastAttemptAt pgtype.Timestamptz `json:"last_attempt_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
AvailableAt pgtype.Timestamptz `json:"available_at"`
|
|
LeaseToken pgtype.UUID `json:"lease_token"`
|
|
LeaseExpiresAt pgtype.Timestamptz `json:"lease_expires_at"`
|
|
DispatchAttempts int32 `json:"dispatch_attempts"`
|
|
}
|
|
|
|
type Workspace struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
Name string `json:"name"`
|
|
Slug string `json:"slug"`
|
|
Description pgtype.Text `json:"description"`
|
|
Settings []byte `json:"settings"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
Context pgtype.Text `json:"context"`
|
|
Repos []byte `json:"repos"`
|
|
IssuePrefix string `json:"issue_prefix"`
|
|
IssueCounter int32 `json:"issue_counter"`
|
|
AvatarUrl pgtype.Text `json:"avatar_url"`
|
|
// When TRUE, an agent run that resolves to no precise accountable human (would be owner_fallback) is refused at enqueue instead of degrading to the agent owner (MUL-4302 §3.5). Default FALSE = owner_fallback. Never affects authorization (originator_user_id).
|
|
AttributionFailClosed bool `json:"attribution_fail_closed"`
|
|
}
|
|
|
|
type WorkspaceInvitation struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
WorkspaceID pgtype.UUID `json:"workspace_id"`
|
|
InviterID pgtype.UUID `json:"inviter_id"`
|
|
InviteeEmail string `json:"invitee_email"`
|
|
InviteeUserID pgtype.UUID `json:"invitee_user_id"`
|
|
Role string `json:"role"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
}
|