@cat-factory/app 0.35.0 → 0.37.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/app/components/auth/UserMenu.vue +11 -1
- package/app/components/brainstorm/BrainstormWindow.vue +2 -1
- package/app/components/clarity/ClarityReviewWindow.vue +2 -1
- package/app/components/gates/GateResultView.vue +107 -12
- package/app/components/layout/IntegrationBackTitle.vue +12 -7
- package/app/components/layout/IntegrationsHub.vue +191 -43
- package/app/components/layout/NotificationsInbox.vue +16 -0
- package/app/components/layout/PersonalSetupModal.vue +141 -0
- package/app/components/pipeline/PipelineBuilder.vue +1 -1
- package/app/components/providers/VendorCredentialsModal.vue +7 -2
- package/app/components/slack/SlackPanel.vue +1 -0
- package/app/composables/api/accounts.ts +36 -51
- package/app/composables/api/auth.ts +20 -19
- package/app/composables/api/board.ts +60 -40
- package/app/composables/api/bootstrap.ts +25 -22
- package/app/composables/api/client.ts +102 -0
- package/app/composables/api/context.ts +25 -6
- package/app/composables/api/documents.ts +36 -34
- package/app/composables/api/execution.ts +65 -48
- package/app/composables/api/followUps.ts +26 -26
- package/app/composables/api/fragments.ts +47 -34
- package/app/composables/api/github.ts +65 -45
- package/app/composables/api/humanReview.ts +19 -0
- package/app/composables/api/humanTest.ts +15 -11
- package/app/composables/api/kaizen.ts +8 -6
- package/app/composables/api/localSettings.ts +5 -4
- package/app/composables/api/models.ts +58 -51
- package/app/composables/api/notifications.ts +13 -7
- package/app/composables/api/presets.ts +34 -28
- package/app/composables/api/providerConnections.ts +68 -26
- package/app/composables/api/recurring.ts +40 -30
- package/app/composables/api/releaseHealth.ts +28 -26
- package/app/composables/api/reviews.ts +136 -114
- package/app/composables/api/sandbox.ts +52 -34
- package/app/composables/api/slack.ts +22 -25
- package/app/composables/api/spec.ts +3 -3
- package/app/composables/api/tasks.ts +42 -41
- package/app/composables/api/userSecrets.ts +12 -17
- package/app/composables/api/workspaces.ts +21 -15
- package/app/composables/useApi.ts +11 -1
- package/app/composables/useIntegrationBack.ts +9 -3
- package/app/pages/index.vue +2 -0
- package/app/stores/auth.ts +2 -1
- package/app/stores/board.ts +2 -1
- package/app/stores/brainstorm.ts +2 -2
- package/app/stores/clarity.ts +6 -2
- package/app/stores/execution.ts +3 -2
- package/app/stores/github.ts +1 -2
- package/app/stores/humanReview.ts +41 -0
- package/app/stores/mergePresets.ts +2 -6
- package/app/stores/pipelines.ts +1 -1
- package/app/stores/recurringPipelines.ts +2 -7
- package/app/stores/sandbox.ts +1 -2
- package/app/stores/ui.ts +62 -19
- package/app/types/accountSettings.ts +11 -36
- package/app/types/accounts.ts +16 -71
- package/app/types/bootstrap.ts +13 -75
- package/app/types/brainstorm.ts +13 -38
- package/app/types/clarity.ts +12 -43
- package/app/types/consensus.ts +16 -89
- package/app/types/documents.ts +19 -94
- package/app/types/domain.ts +54 -582
- package/app/types/execution.ts +48 -499
- package/app/types/fragments.ts +15 -83
- package/app/types/github.ts +25 -161
- package/app/types/incidentEnrichment.ts +10 -25
- package/app/types/localModels.ts +11 -61
- package/app/types/localSettings.ts +9 -26
- package/app/types/merge.ts +10 -68
- package/app/types/model-presets.ts +7 -28
- package/app/types/models.ts +16 -164
- package/app/types/notifications.ts +18 -76
- package/app/types/openrouter.ts +8 -34
- package/app/types/providerConnections.ts +21 -41
- package/app/types/provisioningLogs.ts +9 -29
- package/app/types/recurring.ts +10 -63
- package/app/types/releaseHealth.ts +15 -39
- package/app/types/requirements.ts +14 -84
- package/app/types/sandbox.ts +45 -161
- package/app/types/services.ts +3 -22
- package/app/types/slack.ts +10 -47
- package/app/types/spec.ts +15 -68
- package/app/types/tasks.ts +15 -111
- package/app/types/tracker.ts +9 -24
- package/app/types/userSecrets.ts +12 -47
- package/app/utils/catalog.ts +12 -0
- package/package.json +9 -2
|
@@ -1,76 +1,18 @@
|
|
|
1
|
-
// Notification shapes
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export type NotificationStatus = 'open' | 'acted' | 'dismissed'
|
|
20
|
-
|
|
21
|
-
/** The on-call agent's recommendation on a `release_regression`. */
|
|
22
|
-
export type OnCallRecommendation = 'revert' | 'hold' | 'monitor'
|
|
23
|
-
|
|
24
|
-
/** The on-call agent's assessment of a post-release regression. */
|
|
25
|
-
export interface OnCallAssessment {
|
|
26
|
-
culpritConfidence: number
|
|
27
|
-
recommendation: OnCallRecommendation
|
|
28
|
-
rationale: string
|
|
29
|
-
evidence?: string[]
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** A regressed monitor/SLO on a `release_regression`. */
|
|
33
|
-
export interface ReleaseSignal {
|
|
34
|
-
kind: 'monitor' | 'slo'
|
|
35
|
-
id: string
|
|
36
|
-
name: string
|
|
37
|
-
state: 'ok' | 'warn' | 'alert' | 'no_data'
|
|
38
|
-
detail?: string
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/** Optional structured detail for rendering a notification card. */
|
|
42
|
-
export interface NotificationPayload {
|
|
43
|
-
assessment?: MergeAssessment
|
|
44
|
-
prUrl?: string
|
|
45
|
-
pipelineName?: string
|
|
46
|
-
findingCount?: number
|
|
47
|
-
/** The on-call assessment, on a `release_regression`. */
|
|
48
|
-
onCallAssessment?: OnCallAssessment
|
|
49
|
-
/** The regressed monitors/SLOs, on a `release_regression`. */
|
|
50
|
-
releaseSignals?: ReleaseSignal[]
|
|
51
|
-
/** A proposed revert PR URL, when known. */
|
|
52
|
-
revertUrl?: string
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/** A human-actionable item surfaced on the board. */
|
|
56
|
-
/**
|
|
57
|
-
* Render urgency. A notification starts `normal` (the inbox's usual per-type colour) and
|
|
58
|
-
* is escalated to `urgent` (red) by the backend's sweep once it has waited for a human
|
|
59
|
-
* past the workspace's `waitingEscalationMinutes` threshold. Absent ⇒ `normal`.
|
|
60
|
-
*/
|
|
61
|
-
export type NotificationSeverity = 'normal' | 'urgent'
|
|
62
|
-
|
|
63
|
-
export interface Notification {
|
|
64
|
-
id: string
|
|
65
|
-
type: NotificationType
|
|
66
|
-
status: NotificationStatus
|
|
67
|
-
/** Render urgency (yellow vs red); escalated by the backend sweep. Absent ⇒ normal. */
|
|
68
|
-
severity?: NotificationSeverity
|
|
69
|
-
blockId: string | null
|
|
70
|
-
executionId: string | null
|
|
71
|
-
title: string
|
|
72
|
-
body: string
|
|
73
|
-
payload?: NotificationPayload | null
|
|
74
|
-
createdAt: number
|
|
75
|
-
resolvedAt: number | null
|
|
76
|
-
}
|
|
1
|
+
// Notification shapes. A notification is a first-class, human-actionable item
|
|
2
|
+
// surfaced on the board that outlives the run that raised it (a PR awaiting a
|
|
3
|
+
// merge decision, a completed pipeline awaiting confirmation, CI that gave up).
|
|
4
|
+
//
|
|
5
|
+
// All wire shapes are sourced from @cat-factory/contracts (single source of
|
|
6
|
+
// truth). The historical frontend name `ReleaseSignal` is the contract's
|
|
7
|
+
// `ReleaseSignalWire`.
|
|
8
|
+
|
|
9
|
+
export type {
|
|
10
|
+
NotificationType,
|
|
11
|
+
NotificationStatus,
|
|
12
|
+
OnCallRecommendation,
|
|
13
|
+
OnCallAssessment,
|
|
14
|
+
NotificationPayload,
|
|
15
|
+
NotificationSeverity,
|
|
16
|
+
Notification,
|
|
17
|
+
ReleaseSignalWire as ReleaseSignal,
|
|
18
|
+
} from '@cat-factory/contracts'
|
package/app/types/openrouter.ts
CHANGED
|
@@ -8,38 +8,12 @@
|
|
|
8
8
|
// Mirrors the `@cat-factory/contracts` `openrouter` schemas exactly, so a payload
|
|
9
9
|
// returned by the backend drops straight into the Pinia store without translation.
|
|
10
10
|
// ---------------------------------------------------------------------------
|
|
11
|
+
//
|
|
12
|
+
// All wire shapes are sourced from @cat-factory/contracts (single source of truth).
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/** Total context window (input + output tokens), when reported. */
|
|
19
|
-
contextLength?: number
|
|
20
|
-
/** Input price per 1M tokens, in the spend currency. */
|
|
21
|
-
inputPerMillion: number
|
|
22
|
-
/** Output price per 1M tokens, in the spend currency. */
|
|
23
|
-
outputPerMillion: number
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** A workspace's enabled OpenRouter models (the persisted subset). */
|
|
27
|
-
export interface OpenRouterCatalog {
|
|
28
|
-
models: OpenRouterModelMeta[]
|
|
29
|
-
createdAt: number
|
|
30
|
-
updatedAt: number
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/** Replace a workspace's enabled OpenRouter models with this subset (+ metadata). */
|
|
34
|
-
export interface UpsertOpenRouterCatalogInput {
|
|
35
|
-
models: OpenRouterModelMeta[]
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/** The result of probing OpenRouter's live `/models` for the browse list. */
|
|
39
|
-
export interface OpenRouterRefreshResult {
|
|
40
|
-
reachable: boolean
|
|
41
|
-
/** Every model OpenRouter currently serves (empty when unreachable). */
|
|
42
|
-
models: OpenRouterModelMeta[]
|
|
43
|
-
/** Human-readable failure reason when `reachable` is false. */
|
|
44
|
-
error?: string
|
|
45
|
-
}
|
|
14
|
+
export type {
|
|
15
|
+
OpenRouterModelMeta,
|
|
16
|
+
OpenRouterCatalog,
|
|
17
|
+
UpsertOpenRouterCatalogInput,
|
|
18
|
+
OpenRouterRefreshResult,
|
|
19
|
+
} from '@cat-factory/contracts'
|
|
@@ -1,44 +1,22 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
1
|
+
// Provider self-description + connection wire contracts for the generic connect form
|
|
2
|
+
// used by the two infrastructure providers: the ephemeral-environment provider and the
|
|
3
|
+
// self-hosted runner pool. Both speak the same ProviderDescriptor.
|
|
4
|
+
//
|
|
5
|
+
// The shared shapes are sourced from @cat-factory/contracts (single source of truth).
|
|
6
|
+
// The register/test request bodies are the union of the two per-kind contract inputs
|
|
7
|
+
// (the composable picks the right contract per kind). `ProviderConnectionKind` and the
|
|
8
|
+
// generic `ProviderConnection` view have no exported contract type, so they stay
|
|
9
|
+
// frontend-only below.
|
|
10
|
+
|
|
11
|
+
export type {
|
|
12
|
+
ProviderConfigField,
|
|
13
|
+
ProviderDescriptor,
|
|
14
|
+
ConnectionTestResult,
|
|
15
|
+
} from '@cat-factory/contracts'
|
|
5
16
|
|
|
6
17
|
/** The two infrastructure providers configured through the generic connect form. */
|
|
7
18
|
export type ProviderConnectionKind = 'environment' | 'runner-pool'
|
|
8
19
|
|
|
9
|
-
/** One config value a provider needs, rendered as a single form field. */
|
|
10
|
-
export interface ProviderConfigField {
|
|
11
|
-
key: string
|
|
12
|
-
label: string
|
|
13
|
-
help?: string
|
|
14
|
-
placeholder?: string
|
|
15
|
-
secret?: boolean
|
|
16
|
-
required?: boolean
|
|
17
|
-
type?: 'text' | 'password' | 'select'
|
|
18
|
-
options?: { value: string; label: string }[]
|
|
19
|
-
/** The provider/manifest default; a field with one is optional (UI shows a hint). */
|
|
20
|
-
default?: string
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/** What the SPA needs to render a provider's connect form. */
|
|
24
|
-
export interface ProviderDescriptor {
|
|
25
|
-
providerId: string
|
|
26
|
-
label: string
|
|
27
|
-
kind: 'native' | 'manifest'
|
|
28
|
-
configFields: ProviderConfigField[]
|
|
29
|
-
supportsTest: boolean
|
|
30
|
-
/** Required-without-default keys not yet supplied (drives the banner). */
|
|
31
|
-
missingRequired: string[]
|
|
32
|
-
/** Base manifest a native provider's flat fields are overlaid onto before save. */
|
|
33
|
-
manifestTemplate?: Record<string, unknown>
|
|
34
|
-
/**
|
|
35
|
-
* The CURRENT saved manifest (non-secret — only secret-ref key names), present once a
|
|
36
|
-
* connection exists. Edits are overlaid onto this (not the bare `manifestTemplate`) so
|
|
37
|
-
* re-saving preserves previously-stored providerConfig instead of dropping it.
|
|
38
|
-
*/
|
|
39
|
-
savedManifest?: Record<string, unknown>
|
|
40
|
-
}
|
|
41
|
-
|
|
42
20
|
/** A workspace's provider binding, as exposed to clients (never secret values). */
|
|
43
21
|
export interface ProviderConnection {
|
|
44
22
|
providerId: string
|
|
@@ -49,10 +27,11 @@ export interface ProviderConnection {
|
|
|
49
27
|
secretKeys: string[]
|
|
50
28
|
}
|
|
51
29
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
30
|
+
// The connect form builds the manifest dynamically from a server-provided scaffold
|
|
31
|
+
// (`ProviderDescriptor.manifestTemplate`/`savedManifest`) overlaid with form values, so
|
|
32
|
+
// the FE treats it as an opaque JSON bag. The backend re-validates it against the precise
|
|
33
|
+
// per-provider manifest contract on receipt; the composable casts to the contract input
|
|
34
|
+
// type at the single `send` boundary.
|
|
56
35
|
|
|
57
36
|
/** The assembled register payload (a full manifest + the write-only secret bundle). */
|
|
58
37
|
export interface RegisterProviderInput {
|
|
@@ -60,6 +39,7 @@ export interface RegisterProviderInput {
|
|
|
60
39
|
secrets: Record<string, string>
|
|
61
40
|
}
|
|
62
41
|
|
|
42
|
+
/** The test/probe payload (manifest-driven or native), shared by both providers. */
|
|
63
43
|
export interface TestProviderInput {
|
|
64
44
|
manifest?: Record<string, unknown>
|
|
65
45
|
config?: Record<string, string>
|
|
@@ -1,32 +1,12 @@
|
|
|
1
1
|
// Frontend mirror of the unified provisioning event-log wire shapes
|
|
2
2
|
// (`@cat-factory/contracts` provisioning-logs.ts). Drives the "View logs" drawers in
|
|
3
3
|
// the environment-provider + runner-pool config panels and the run-details env surface.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export type
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
| 'poll-failure'
|
|
14
|
-
|
|
15
|
-
export type ProvisioningOutcome = 'success' | 'failure'
|
|
16
|
-
|
|
17
|
-
/** One provisioning attempt (spin-up / tear-down), as returned by the logs endpoint. */
|
|
18
|
-
export interface ProvisioningLogEntry {
|
|
19
|
-
id: string
|
|
20
|
-
workspaceId: string
|
|
21
|
-
subsystem: ProvisioningSubsystem
|
|
22
|
-
operation: ProvisioningOperation
|
|
23
|
-
targetId: string | null
|
|
24
|
-
providerId: string | null
|
|
25
|
-
blockId: string | null
|
|
26
|
-
executionId: string | null
|
|
27
|
-
outcome: ProvisioningOutcome
|
|
28
|
-
/** The verbatim provider/runtime error on a failure, else null. */
|
|
29
|
-
error: string | null
|
|
30
|
-
detail: string | null
|
|
31
|
-
createdAt: number
|
|
32
|
-
}
|
|
4
|
+
//
|
|
5
|
+
// All wire shapes are sourced from @cat-factory/contracts (single source of truth).
|
|
6
|
+
|
|
7
|
+
export type {
|
|
8
|
+
ProvisioningSubsystem,
|
|
9
|
+
ProvisioningOperation,
|
|
10
|
+
ProvisioningOutcome,
|
|
11
|
+
ProvisioningLogEntry,
|
|
12
|
+
} from '@cat-factory/contracts'
|
package/app/types/recurring.ts
CHANGED
|
@@ -3,67 +3,14 @@
|
|
|
3
3
|
// run every `intervalHours`, constrained to an optional allowed window (weekdays +
|
|
4
4
|
// an hour-of-day range, in the schedule's timezone). Each schedule owns one reused
|
|
5
5
|
// on-board task block; firing it starts the pipeline against that block.
|
|
6
|
+
//
|
|
7
|
+
// All wire shapes are sourced from @cat-factory/contracts (single source of truth).
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
weekdays: number[]
|
|
16
|
-
/** Inclusive start of the allowed hour-of-day window, or null for no lower bound. */
|
|
17
|
-
windowStartHour: number | null
|
|
18
|
-
/** Exclusive end of the allowed hour-of-day window, or null for no upper bound. */
|
|
19
|
-
windowEndHour: number | null
|
|
20
|
-
/** IANA timezone the weekday/hour window is evaluated in (e.g. 'UTC'). */
|
|
21
|
-
timezone: string
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/** A recurring pipeline attached to a service. */
|
|
25
|
-
export interface PipelineSchedule {
|
|
26
|
-
id: string
|
|
27
|
-
/** The reused on-board task block the pipeline runs against. */
|
|
28
|
-
blockId: string
|
|
29
|
-
/** The service frame it lives in. */
|
|
30
|
-
frameId: string
|
|
31
|
-
pipelineId: string
|
|
32
|
-
template: ScheduleTemplate
|
|
33
|
-
name: string
|
|
34
|
-
recurrence: Recurrence
|
|
35
|
-
enabled: boolean
|
|
36
|
-
lastRunAt: number | null
|
|
37
|
-
/** Computed epoch-ms of the next eligible fire. */
|
|
38
|
-
nextRunAt: number
|
|
39
|
-
createdAt: number
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/** One historical fire of a schedule (retained ~1 week), shown in the inspector. */
|
|
43
|
-
export interface ScheduleRun {
|
|
44
|
-
id: string
|
|
45
|
-
scheduleId: string
|
|
46
|
-
executionId: string | null
|
|
47
|
-
status: 'running' | 'done' | 'failed' | 'skipped'
|
|
48
|
-
startedAt: number
|
|
49
|
-
finishedAt: number | null
|
|
50
|
-
outcome: string | null
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface CreateScheduleInput {
|
|
54
|
-
frameId: string
|
|
55
|
-
pipelineId: string
|
|
56
|
-
template?: ScheduleTemplate
|
|
57
|
-
name: string
|
|
58
|
-
recurrence: Recurrence
|
|
59
|
-
enabled?: boolean
|
|
60
|
-
/** The prompt/description for the reused on-board task; empty → the template seed. */
|
|
61
|
-
description?: string
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface UpdateScheduleInput {
|
|
65
|
-
name?: string
|
|
66
|
-
pipelineId?: string
|
|
67
|
-
recurrence?: Recurrence
|
|
68
|
-
enabled?: boolean
|
|
69
|
-
}
|
|
9
|
+
export type {
|
|
10
|
+
ScheduleTemplate,
|
|
11
|
+
Recurrence,
|
|
12
|
+
PipelineSchedule,
|
|
13
|
+
ScheduleRun,
|
|
14
|
+
CreateScheduleInput,
|
|
15
|
+
UpdateScheduleInput,
|
|
16
|
+
} from '@cat-factory/contracts'
|
|
@@ -1,39 +1,15 @@
|
|
|
1
|
-
// Post-release-health (observability) settings shapes
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/** Set/replace the workspace's observability connection. */
|
|
17
|
-
export interface UpsertObservabilityConnectionInput {
|
|
18
|
-
provider: ObservabilityProviderKind
|
|
19
|
-
credentials: {
|
|
20
|
-
site: string
|
|
21
|
-
apiKey: string
|
|
22
|
-
appKey: string
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** A block's monitor/SLO mapping for the post-release-health gate. */
|
|
27
|
-
export interface ReleaseHealthConfig {
|
|
28
|
-
blockId: string
|
|
29
|
-
monitorIds: string[]
|
|
30
|
-
sloIds: string[]
|
|
31
|
-
envTag: string | null
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/** Create/replace a block's release-health config. */
|
|
35
|
-
export interface UpsertReleaseHealthConfigInput {
|
|
36
|
-
monitorIds?: string[]
|
|
37
|
-
sloIds?: string[]
|
|
38
|
-
envTag?: string | null
|
|
39
|
-
}
|
|
1
|
+
// Post-release-health (observability) settings shapes. Per-workspace observability
|
|
2
|
+
// connection (provider + credentials, write-only, never read back) and the per-block
|
|
3
|
+
// monitor/SLO mappings the post-release-health gate reads.
|
|
4
|
+
//
|
|
5
|
+
// All wire shapes are sourced from @cat-factory/contracts (single source of truth).
|
|
6
|
+
// The historical frontend name `ReleaseHealthConfig` is the contract's
|
|
7
|
+
// `ReleaseHealthConfigWire`.
|
|
8
|
+
|
|
9
|
+
export type {
|
|
10
|
+
ObservabilityProviderKind,
|
|
11
|
+
ObservabilityConnectionView,
|
|
12
|
+
UpsertObservabilityConnectionInput,
|
|
13
|
+
UpsertReleaseHealthConfigInput,
|
|
14
|
+
ReleaseHealthConfigWire as ReleaseHealthConfig,
|
|
15
|
+
} from '@cat-factory/contracts'
|
|
@@ -5,87 +5,17 @@
|
|
|
5
5
|
// A stateless reviewer agent inspects a block's collected requirements and
|
|
6
6
|
// raises questions / gaps / clarifications; a human answers or dismisses each;
|
|
7
7
|
// then the agent folds the answers back into the block's requirements.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export type
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
category: ReviewItemCategory
|
|
23
|
-
severity: ReviewItemSeverity
|
|
24
|
-
title: string
|
|
25
|
-
detail: string
|
|
26
|
-
status: ReviewItemStatus
|
|
27
|
-
reply: string | null
|
|
28
|
-
createdAt: number
|
|
29
|
-
updatedAt: number
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* - `ready`: the reviewer raised findings awaiting human answers/dismissals.
|
|
34
|
-
* - `incorporating`: transient; the driver is folding the answers into a document (the FIRST
|
|
35
|
-
* async stage — the user is back on the board).
|
|
36
|
-
* - `reviewing`: transient; the reviewer is RE-reviewing the folded document (the SECOND
|
|
37
|
-
* async stage). Distinct from `incorporating` so the UI can show which stage is running.
|
|
38
|
-
* - `merged`: the companion produced a document (an internal transient on the async path).
|
|
39
|
-
* - `exceeded`: the iteration cap was hit with findings open — awaiting the human's choice.
|
|
40
|
-
* - `incorporated`: terminal; the requirements phase is settled.
|
|
41
|
-
*/
|
|
42
|
-
export type RequirementReviewStatus =
|
|
43
|
-
| 'ready'
|
|
44
|
-
| 'incorporating'
|
|
45
|
-
| 'reviewing'
|
|
46
|
-
| 'merged'
|
|
47
|
-
| 'exceeded'
|
|
48
|
-
| 'incorporated'
|
|
49
|
-
|
|
50
|
-
/** How a human resolves a review that hit its iteration cap. */
|
|
51
|
-
export type ResolveRequirementsExceededChoice = 'extra-round' | 'proceed' | 'stop-reset'
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Lifecycle of a Requirement-Writer recommendation. `pending` is a placeholder created the
|
|
55
|
-
* moment the human requests it — the Writer is still producing the suggestion in the background
|
|
56
|
-
* (the async story); it fills in to `ready` via the `requirements` stream.
|
|
57
|
-
*/
|
|
58
|
-
export type RecommendationStatus = 'pending' | 'ready' | 'accepted' | 'rejected'
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* A Requirement-Writer suggestion for one finding. First-class on the review (survives the
|
|
62
|
-
* re-review item churn); the source finding is snapshotted by title/detail. `groundedInFragment`
|
|
63
|
-
* marks a suggestion taken straight from a best-practice fragment (the "current standard").
|
|
64
|
-
*/
|
|
65
|
-
export interface RequirementRecommendation {
|
|
66
|
-
id: string
|
|
67
|
-
sourceFinding: { title: string; detail: string; itemId?: string }
|
|
68
|
-
recommendedText: string
|
|
69
|
-
status: RecommendationStatus
|
|
70
|
-
note: string | null
|
|
71
|
-
groundedInFragment: { id: string; title: string } | null
|
|
72
|
-
createdAt: number
|
|
73
|
-
updatedAt: number
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface RequirementReview {
|
|
77
|
-
id: string
|
|
78
|
-
blockId: string
|
|
79
|
-
status: RequirementReviewStatus
|
|
80
|
-
items: RequirementReviewItem[]
|
|
81
|
-
model: string | null
|
|
82
|
-
incorporatedRequirements: string | null
|
|
83
|
-
/** Reviewer passes run so far (initial review is 1; each re-review adds one). */
|
|
84
|
-
iteration: number
|
|
85
|
-
/** The reviewer-pass budget (from the task's merge preset; an extra round bumps it). */
|
|
86
|
-
maxIterations: number
|
|
87
|
-
/** Requirement-Writer suggestions awaiting (or settled by) human accept/reject. */
|
|
88
|
-
recommendations: RequirementRecommendation[]
|
|
89
|
-
createdAt: number
|
|
90
|
-
updatedAt: number
|
|
91
|
-
}
|
|
8
|
+
//
|
|
9
|
+
// All wire shapes are sourced from @cat-factory/contracts (single source of truth).
|
|
10
|
+
|
|
11
|
+
export type {
|
|
12
|
+
ReviewItemCategory,
|
|
13
|
+
ReviewItemSeverity,
|
|
14
|
+
ReviewItemStatus,
|
|
15
|
+
RequirementReviewItem,
|
|
16
|
+
RequirementReviewStatus,
|
|
17
|
+
ResolveRequirementsExceededChoice,
|
|
18
|
+
RecommendationStatus,
|
|
19
|
+
RequirementRecommendation,
|
|
20
|
+
RequirementReview,
|
|
21
|
+
} from '@cat-factory/contracts'
|