@cat-factory/app 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +88 -0
- package/app/app.config.ts +8 -0
- package/app/app.vue +11 -0
- package/app/assets/css/main.css +100 -0
- package/app/components/auth/AuthGate.vue +24 -0
- package/app/components/auth/LoginScreen.vue +143 -0
- package/app/components/auth/UserMenu.vue +39 -0
- package/app/components/board/AddTaskModal.vue +444 -0
- package/app/components/board/AgentFailureCard.vue +97 -0
- package/app/components/board/AgentStopButton.vue +61 -0
- package/app/components/board/BoardCanvas.vue +183 -0
- package/app/components/board/ContextPicker.vue +367 -0
- package/app/components/board/RecurringPipelineModal.vue +219 -0
- package/app/components/board/TaskDependencyEdges.vue +132 -0
- package/app/components/board/nodes/AgentChip.vue +59 -0
- package/app/components/board/nodes/BlockNode.vue +433 -0
- package/app/components/board/nodes/DecisionBadge.vue +27 -0
- package/app/components/board/nodes/DraggableTask.vue +48 -0
- package/app/components/board/nodes/ModuleFrame.vue +97 -0
- package/app/components/board/nodes/TaskCard.vue +359 -0
- package/app/components/board/nodes/TaskPipelineMini.vue +159 -0
- package/app/components/bootstrap/BootstrapModal.vue +665 -0
- package/app/components/clarity/ClarityReviewWindow.vue +611 -0
- package/app/components/consensus/ConsensusSessionWindow.vue +210 -0
- package/app/components/documents/DocumentImportModal.vue +161 -0
- package/app/components/documents/DocumentSourceConnectModal.vue +127 -0
- package/app/components/documents/SpawnPreviewModal.vue +161 -0
- package/app/components/documents/TaskContextDocs.vue +83 -0
- package/app/components/focus/BlockFocusView.vue +171 -0
- package/app/components/fragments/FragmentLibraryPanel.vue +340 -0
- package/app/components/gates/GateResultView.vue +282 -0
- package/app/components/github/AddServiceFromRepoModal.vue +354 -0
- package/app/components/github/GitHubConnect.vue +183 -0
- package/app/components/github/GitHubOnboarding.vue +45 -0
- package/app/components/github/GitHubPanel.vue +584 -0
- package/app/components/github/RepoTreeBrowser.vue +171 -0
- package/app/components/layout/AccountTeamSettings.vue +237 -0
- package/app/components/layout/BoardSwitcher.vue +280 -0
- package/app/components/layout/BoardToolbar.vue +156 -0
- package/app/components/layout/CommandBar.vue +336 -0
- package/app/components/layout/GitHubPatBanner.vue +73 -0
- package/app/components/layout/NotificationsInbox.vue +175 -0
- package/app/components/layout/SideBar.vue +314 -0
- package/app/components/layout/SpendWarningBanner.vue +107 -0
- package/app/components/observability/StepMetricsBar.vue +102 -0
- package/app/components/palettes/AgentPalette.vue +86 -0
- package/app/components/panels/AgentStepDetail.vue +737 -0
- package/app/components/panels/DecisionModal.vue +71 -0
- package/app/components/panels/InspectorPanel.vue +465 -0
- package/app/components/panels/ObservabilityPanel.vue +351 -0
- package/app/components/panels/StepMetadataCard.vue +253 -0
- package/app/components/panels/StepRestartControl.vue +90 -0
- package/app/components/panels/StepResultViewHost.vue +40 -0
- package/app/components/panels/StepTestReport.vue +84 -0
- package/app/components/panels/inspector/ContainerSummary.vue +74 -0
- package/app/components/panels/inspector/RecurringScheduleSettings.vue +178 -0
- package/app/components/panels/inspector/ServiceFragments.vue +82 -0
- package/app/components/panels/inspector/ServiceTestConfig.vue +198 -0
- package/app/components/panels/inspector/TaskAgentConfig.vue +81 -0
- package/app/components/panels/inspector/TaskDependencies.vue +70 -0
- package/app/components/panels/inspector/TaskEstimateBadge.vue +56 -0
- package/app/components/panels/inspector/TaskExecution.vue +364 -0
- package/app/components/panels/inspector/TaskRunSettings.vue +187 -0
- package/app/components/panels/inspector/TaskStructure.vue +96 -0
- package/app/components/pipeline/AgentKindIcon.vue +30 -0
- package/app/components/pipeline/IterationCapPrompt.vue +70 -0
- package/app/components/pipeline/PipelineBuilder.vue +817 -0
- package/app/components/pipeline/PipelineProgress.vue +484 -0
- package/app/components/providers/ApiKeysSection.vue +273 -0
- package/app/components/providers/PersonalCredentialModal.vue +128 -0
- package/app/components/providers/PersonalSubscriptionSection.vue +225 -0
- package/app/components/providers/VendorCredentialsModal.vue +197 -0
- package/app/components/recurring/RecurrenceEditor.vue +124 -0
- package/app/components/requirements/RequirementsReviewWindow.vue +620 -0
- package/app/components/settings/DatadogPanel.vue +213 -0
- package/app/components/settings/LocalModelEndpointsPanel.vue +286 -0
- package/app/components/settings/MergeThresholdsPanel.vue +378 -0
- package/app/components/settings/ModelDefaultsPanel.vue +250 -0
- package/app/components/settings/ServiceFragmentDefaultsPanel.vue +124 -0
- package/app/components/settings/WorkspaceSettingsPanel.vue +142 -0
- package/app/components/slack/SlackPanel.vue +299 -0
- package/app/components/tasks/TaskContextIssues.vue +88 -0
- package/app/components/tasks/TaskImportModal.vue +207 -0
- package/app/components/tasks/TaskSourceConnectModal.vue +133 -0
- package/app/components/testing/TestReportWindow.vue +404 -0
- package/app/composables/api/accounts.ts +81 -0
- package/app/composables/api/auth.ts +45 -0
- package/app/composables/api/board.ts +101 -0
- package/app/composables/api/bootstrap.ts +62 -0
- package/app/composables/api/context.ts +25 -0
- package/app/composables/api/documents.ts +74 -0
- package/app/composables/api/execution.ts +127 -0
- package/app/composables/api/fragments.ts +71 -0
- package/app/composables/api/github.ts +131 -0
- package/app/composables/api/models.ts +127 -0
- package/app/composables/api/notifications.ts +23 -0
- package/app/composables/api/presets.ts +29 -0
- package/app/composables/api/recurring.ts +68 -0
- package/app/composables/api/releaseHealth.ts +43 -0
- package/app/composables/api/reviews.ts +146 -0
- package/app/composables/api/slack.ts +54 -0
- package/app/composables/api/tasks.ts +72 -0
- package/app/composables/api/workspaces.ts +36 -0
- package/app/composables/useApi.ts +89 -0
- package/app/composables/useBlockDrag.ts +90 -0
- package/app/composables/useBlockQueries.ts +154 -0
- package/app/composables/useBoardFlow.ts +11 -0
- package/app/composables/useContextLinking.ts +65 -0
- package/app/composables/useDepLabels.ts +26 -0
- package/app/composables/useFrameResize.ts +54 -0
- package/app/composables/useResultView.ts +48 -0
- package/app/composables/useReviewStage.ts +40 -0
- package/app/composables/useSemanticZoom.ts +31 -0
- package/app/composables/useStepApproval.ts +233 -0
- package/app/composables/useStepProse.ts +78 -0
- package/app/composables/useStepTimer.ts +63 -0
- package/app/composables/useTaskExpansion.ts +92 -0
- package/app/composables/useWorkspaceStream.ts +155 -0
- package/app/docs/architecture.md +31 -0
- package/app/pages/index.vue +141 -0
- package/app/stores/accounts.ts +152 -0
- package/app/stores/agentConfig.ts +35 -0
- package/app/stores/agentRuns.ts +122 -0
- package/app/stores/agents.ts +40 -0
- package/app/stores/apiKeys.ts +108 -0
- package/app/stores/auth.ts +166 -0
- package/app/stores/board.spec.ts +205 -0
- package/app/stores/board.ts +286 -0
- package/app/stores/bootstrap.ts +97 -0
- package/app/stores/clarity.ts +196 -0
- package/app/stores/consensus.ts +60 -0
- package/app/stores/documents.ts +176 -0
- package/app/stores/execution.ts +273 -0
- package/app/stores/fragmentLibrary.ts +147 -0
- package/app/stores/fragments.ts +40 -0
- package/app/stores/github.ts +305 -0
- package/app/stores/localModels.ts +51 -0
- package/app/stores/mergePresets.ts +58 -0
- package/app/stores/modelDefaults.ts +76 -0
- package/app/stores/models.ts +134 -0
- package/app/stores/notifications.ts +70 -0
- package/app/stores/observability.ts +144 -0
- package/app/stores/personalSubscriptions.ts +215 -0
- package/app/stores/pipelines.ts +327 -0
- package/app/stores/recurringPipelines.ts +112 -0
- package/app/stores/releaseHealth.ts +75 -0
- package/app/stores/requirements.spec.ts +94 -0
- package/app/stores/requirements.ts +208 -0
- package/app/stores/serviceFragmentDefaults.ts +29 -0
- package/app/stores/services.ts +87 -0
- package/app/stores/slack.ts +142 -0
- package/app/stores/taskExpansion.ts +36 -0
- package/app/stores/tasks.spec.ts +71 -0
- package/app/stores/tasks.ts +176 -0
- package/app/stores/tracker.ts +27 -0
- package/app/stores/ui.ts +434 -0
- package/app/stores/vendorCredentials.ts +54 -0
- package/app/stores/workspace.ts +215 -0
- package/app/stores/workspaceSettings.ts +36 -0
- package/app/types/accounts.ts +77 -0
- package/app/types/bootstrap.ts +83 -0
- package/app/types/clarity.ts +59 -0
- package/app/types/consensus.ts +91 -0
- package/app/types/documents.ts +104 -0
- package/app/types/domain.ts +495 -0
- package/app/types/execution.ts +383 -0
- package/app/types/fragments.ts +72 -0
- package/app/types/github.ts +173 -0
- package/app/types/localModels.ts +73 -0
- package/app/types/merge.ts +71 -0
- package/app/types/models.ts +157 -0
- package/app/types/notifications.ts +74 -0
- package/app/types/recurring.ts +69 -0
- package/app/types/releaseHealth.ts +31 -0
- package/app/types/requirements.ts +61 -0
- package/app/types/services.ts +27 -0
- package/app/types/slack.ts +57 -0
- package/app/types/tasks.ts +82 -0
- package/app/types/tracker.ts +18 -0
- package/app/utils/agentOutput.spec.ts +128 -0
- package/app/utils/agentOutput.ts +173 -0
- package/app/utils/catalog.spec.ts +112 -0
- package/app/utils/catalog.ts +455 -0
- package/app/utils/dnd.ts +29 -0
- package/app/utils/observability.ts +52 -0
- package/app/utils/pipelineRender.ts +151 -0
- package/nuxt.config.ts +55 -0
- package/package.json +45 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// Discover-and-link surface for the workspace's GitHub App installation. Lists
|
|
3
|
+
// the installations the App is already on (via the app JWT) so the user can bind
|
|
4
|
+
// one with a single click — no installation-id typing — falling back to the
|
|
5
|
+
// install redirect and a manual-id entry. Self-loads its list on mount; on a
|
|
6
|
+
// successful connect the github store flips `connected`, which the host surfaces
|
|
7
|
+
// react to. Shared by the GitHub panel and the bootstrap modal so the connect
|
|
8
|
+
// flow lives in one place.
|
|
9
|
+
const github = useGitHubStore()
|
|
10
|
+
const toast = useToast()
|
|
11
|
+
|
|
12
|
+
const installing = ref(false)
|
|
13
|
+
const installationId = ref('')
|
|
14
|
+
const connecting = ref(false)
|
|
15
|
+
// Track which installation row is mid-connect so only its button spins.
|
|
16
|
+
const connectingId = ref<number | null>(null)
|
|
17
|
+
|
|
18
|
+
onMounted(() => {
|
|
19
|
+
void refreshInstallations()
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
function notifyError(title: string, e: unknown) {
|
|
23
|
+
toast.add({
|
|
24
|
+
title,
|
|
25
|
+
description: e instanceof Error ? e.message : String(e),
|
|
26
|
+
icon: 'i-lucide-triangle-alert',
|
|
27
|
+
color: 'error',
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function refreshInstallations() {
|
|
32
|
+
try {
|
|
33
|
+
await github.loadInstallations()
|
|
34
|
+
} catch (e) {
|
|
35
|
+
// A 503 (integration off) is handled by the host; surface anything else.
|
|
36
|
+
notifyError('Could not list GitHub installations', e)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async function install() {
|
|
41
|
+
installing.value = true
|
|
42
|
+
try {
|
|
43
|
+
window.location.href = await github.getInstallUrl()
|
|
44
|
+
} catch (e) {
|
|
45
|
+
notifyError('Could not start the GitHub App install', e)
|
|
46
|
+
installing.value = false
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function connect(id: number, onDone?: () => void) {
|
|
51
|
+
connecting.value = true
|
|
52
|
+
connectingId.value = id
|
|
53
|
+
try {
|
|
54
|
+
await github.connect(id)
|
|
55
|
+
onDone?.()
|
|
56
|
+
toast.add({ title: 'GitHub connected', icon: 'i-lucide-check', color: 'success' })
|
|
57
|
+
} catch (e) {
|
|
58
|
+
notifyError('Could not connect', e)
|
|
59
|
+
} finally {
|
|
60
|
+
connecting.value = false
|
|
61
|
+
connectingId.value = null
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function connectManually() {
|
|
66
|
+
const id = Number(installationId.value.trim())
|
|
67
|
+
if (!Number.isInteger(id) || id <= 0) return
|
|
68
|
+
await connect(id, () => {
|
|
69
|
+
installationId.value = ''
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<template>
|
|
75
|
+
<div class="space-y-3">
|
|
76
|
+
<!-- discovered installations: pick one the App is already on -->
|
|
77
|
+
<section class="space-y-2">
|
|
78
|
+
<div class="flex items-center justify-between">
|
|
79
|
+
<span class="text-xs font-medium uppercase tracking-wide text-slate-500">
|
|
80
|
+
Your installations
|
|
81
|
+
</span>
|
|
82
|
+
<UButton
|
|
83
|
+
size="xs"
|
|
84
|
+
color="neutral"
|
|
85
|
+
variant="ghost"
|
|
86
|
+
icon="i-lucide-refresh-cw"
|
|
87
|
+
:loading="github.loadingInstallations"
|
|
88
|
+
@click="refreshInstallations"
|
|
89
|
+
>
|
|
90
|
+
Refresh
|
|
91
|
+
</UButton>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<div
|
|
95
|
+
v-if="github.loadingInstallations && !github.installations.length"
|
|
96
|
+
class="flex items-center gap-2 py-3 text-sm text-slate-400"
|
|
97
|
+
>
|
|
98
|
+
<UIcon name="i-lucide-loader" class="h-4 w-4 animate-spin" /> Looking for installations…
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<p
|
|
102
|
+
v-else-if="!github.installations.length"
|
|
103
|
+
class="rounded-md border border-dashed border-slate-800 px-3 py-3 text-sm text-slate-400"
|
|
104
|
+
>
|
|
105
|
+
No installations found for the App yet. Install it below, or connect by ID.
|
|
106
|
+
</p>
|
|
107
|
+
|
|
108
|
+
<div
|
|
109
|
+
v-for="inst in github.installations"
|
|
110
|
+
:key="inst.installationId"
|
|
111
|
+
class="flex items-center justify-between gap-2 rounded-md border border-slate-800 bg-slate-900/60 px-3 py-2"
|
|
112
|
+
>
|
|
113
|
+
<div class="flex min-w-0 items-center gap-2">
|
|
114
|
+
<UAvatar
|
|
115
|
+
v-if="inst.accountAvatarUrl"
|
|
116
|
+
:src="inst.accountAvatarUrl"
|
|
117
|
+
size="2xs"
|
|
118
|
+
:alt="inst.accountLogin"
|
|
119
|
+
/>
|
|
120
|
+
<UIcon v-else name="i-lucide-github" class="h-4 w-4 text-slate-400" />
|
|
121
|
+
<div class="min-w-0">
|
|
122
|
+
<div class="truncate text-sm text-slate-200">{{ inst.accountLogin }}</div>
|
|
123
|
+
<div class="text-[11px] text-slate-500">
|
|
124
|
+
{{ inst.targetType }} · installation {{ inst.installationId }}
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
<UBadge
|
|
129
|
+
v-if="inst.connected === 'this'"
|
|
130
|
+
color="success"
|
|
131
|
+
variant="subtle"
|
|
132
|
+
size="sm"
|
|
133
|
+
title="Already linked to this workspace"
|
|
134
|
+
>
|
|
135
|
+
linked
|
|
136
|
+
</UBadge>
|
|
137
|
+
<UBadge
|
|
138
|
+
v-else-if="inst.connected === 'other'"
|
|
139
|
+
color="neutral"
|
|
140
|
+
variant="subtle"
|
|
141
|
+
size="sm"
|
|
142
|
+
title="Already connected to another workspace"
|
|
143
|
+
>
|
|
144
|
+
in use
|
|
145
|
+
</UBadge>
|
|
146
|
+
<UButton
|
|
147
|
+
v-else
|
|
148
|
+
size="xs"
|
|
149
|
+
color="primary"
|
|
150
|
+
variant="subtle"
|
|
151
|
+
icon="i-lucide-plug"
|
|
152
|
+
:loading="connectingId === inst.installationId"
|
|
153
|
+
:disabled="connecting"
|
|
154
|
+
@click="connect(inst.installationId)"
|
|
155
|
+
>
|
|
156
|
+
Connect
|
|
157
|
+
</UButton>
|
|
158
|
+
</div>
|
|
159
|
+
</section>
|
|
160
|
+
|
|
161
|
+
<USeparator label="or" />
|
|
162
|
+
<UButton color="primary" icon="i-lucide-github" :loading="installing" @click="install">
|
|
163
|
+
Install GitHub App
|
|
164
|
+
</UButton>
|
|
165
|
+
|
|
166
|
+
<USeparator label="or connect by ID" />
|
|
167
|
+
<div class="flex items-end gap-2">
|
|
168
|
+
<UFormField label="Installation ID" class="flex-1">
|
|
169
|
+
<UInput v-model="installationId" type="number" placeholder="12345678" class="w-full" />
|
|
170
|
+
</UFormField>
|
|
171
|
+
<UButton
|
|
172
|
+
color="neutral"
|
|
173
|
+
variant="subtle"
|
|
174
|
+
icon="i-lucide-plug"
|
|
175
|
+
:loading="connecting && connectingId === null"
|
|
176
|
+
:disabled="!installationId.trim()"
|
|
177
|
+
@click="connectManually"
|
|
178
|
+
>
|
|
179
|
+
Connect
|
|
180
|
+
</UButton>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
</template>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// Hard onboarding gate shown after login when the GitHub integration is enabled
|
|
3
|
+
// but the workspace has no App installation yet. cat-factory's whole flow runs on
|
|
4
|
+
// the App (agents open PRs on the user's repos), so the board is withheld until
|
|
5
|
+
// the App is installed/connected. Reuses <GitHubConnect>, which drives the
|
|
6
|
+
// account-level install (https://github.com/apps/<slug>/installations/new — the
|
|
7
|
+
// user picks the account/org and grants all or a subset of repos) plus the
|
|
8
|
+
// pick-an-existing-installation path. A "Sign out" escape hatch avoids trapping a
|
|
9
|
+
// user who needs to switch GitHub accounts.
|
|
10
|
+
import GitHubConnect from '~/components/github/GitHubConnect.vue'
|
|
11
|
+
|
|
12
|
+
const auth = useAuthStore()
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div
|
|
17
|
+
class="flex h-full w-full items-center justify-center overflow-y-auto bg-slate-950 text-slate-100"
|
|
18
|
+
>
|
|
19
|
+
<div
|
|
20
|
+
class="my-8 w-full max-w-md rounded-xl border border-slate-800 bg-slate-900/80 p-8 backdrop-blur"
|
|
21
|
+
>
|
|
22
|
+
<div class="mb-5 text-center">
|
|
23
|
+
<UIcon name="i-lucide-github" class="mx-auto mb-3 h-10 w-10 text-indigo-400" />
|
|
24
|
+
<h1 class="mb-1 text-lg font-semibold text-white">Connect cat-factory to GitHub</h1>
|
|
25
|
+
<p class="text-sm text-slate-400">
|
|
26
|
+
cat-factory works by opening pull requests on your repositories. Install the GitHub App on
|
|
27
|
+
your account or organization to continue — you can grant it every repository or pick a
|
|
28
|
+
subset.
|
|
29
|
+
</p>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<GitHubConnect />
|
|
33
|
+
|
|
34
|
+
<p
|
|
35
|
+
v-if="auth.required && auth.user"
|
|
36
|
+
class="mt-6 border-t border-slate-800 pt-4 text-center text-xs text-slate-500"
|
|
37
|
+
>
|
|
38
|
+
Signed in as {{ auth.user.login }} ·
|
|
39
|
+
<button class="text-slate-300 underline-offset-2 hover:underline" @click="auth.logout()">
|
|
40
|
+
Sign out
|
|
41
|
+
</button>
|
|
42
|
+
</p>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|