mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-27 19:35:13 +01:00
Implement typed task watchdog proof outcomes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
189fc9b881
commit
b7d72340d5
11 files changed
+638
-42
No files matched your search
@@ -271,6 +271,14 @@ export type PluginIssueOriginKind = `plugin:${string}`;
|
||||
export type IssueOriginKind = BuiltInIssueOriginKind | PluginIssueOriginKind;
|
||||
export const ISSUE_WATCHDOG_DISCOVERY_KINDS = ["product_bug", "platform_bug"] as const;
|
||||
export type IssueWatchdogDiscoveryKind = (typeof ISSUE_WATCHDOG_DISCOVERY_KINDS)[number];
|
||||
export const ISSUE_WATCHDOG_PROOF_OUTCOMES = [
|
||||
"accepted",
|
||||
"restored",
|
||||
"deferred",
|
||||
"failed",
|
||||
"dismissed",
|
||||
] as const;
|
||||
export type IssueWatchdogProofOutcome = (typeof ISSUE_WATCHDOG_PROOF_OUTCOMES)[number];
|
||||
export const ISSUE_SURFACE_VISIBILITIES = ["default", "plugin_operation"] as const;
|
||||
export type IssueSurfaceVisibility = (typeof ISSUE_SURFACE_VISIBILITIES)[number];
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ export {
|
||||
ISSUE_ORIGIN_KINDS,
|
||||
TASK_WATCHDOG_PRODUCT_BUG_ORIGIN_KIND,
|
||||
ISSUE_WATCHDOG_DISCOVERY_KINDS,
|
||||
ISSUE_WATCHDOG_PROOF_OUTCOMES,
|
||||
ISSUE_SURFACE_VISIBILITIES,
|
||||
ISSUE_RECOVERY_ACTION_KINDS,
|
||||
ISSUE_RECOVERY_ACTION_STATUSES,
|
||||
@@ -208,6 +209,7 @@ export {
|
||||
type PluginIssueOriginKind,
|
||||
type IssueOriginKind,
|
||||
type IssueWatchdogDiscoveryKind,
|
||||
type IssueWatchdogProofOutcome,
|
||||
type IssueSurfaceVisibility,
|
||||
type IssueRecoveryActionKind,
|
||||
type IssueRecoveryActionStatus,
|
||||
|
||||
@@ -25,6 +25,7 @@ import type {
|
||||
IssueThreadInteractionKind,
|
||||
IssueThreadInteractionStatus,
|
||||
IssueStatus,
|
||||
IssueWatchdogProofOutcome,
|
||||
} from "../constants.js";
|
||||
import type { Goal } from "./goal.js";
|
||||
import type { Project, ProjectWorkspace } from "./project.js";
|
||||
@@ -503,6 +504,21 @@ export interface IssueExecutionDecision {
|
||||
|
||||
export type IssueWatchdogStatus = "active" | "disabled";
|
||||
|
||||
export interface IssueWatchdogProofOutcomeSummary {
|
||||
id: string;
|
||||
outcome: IssueWatchdogProofOutcome;
|
||||
targetIssueId: string | null;
|
||||
method: string;
|
||||
observedAt: Date;
|
||||
resultClassification: string;
|
||||
redactedDetails: Record<string, unknown>;
|
||||
stopFingerprint: string;
|
||||
proofObligationFingerprint: string;
|
||||
createdByRunId: string | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export interface IssueWatchdogSummary {
|
||||
id: string;
|
||||
companyId: string;
|
||||
@@ -515,6 +531,7 @@ export interface IssueWatchdogSummary {
|
||||
lastReviewedFingerprint: string | null;
|
||||
lastTriggeredAt: Date | null;
|
||||
lastCompletedAt: Date | null;
|
||||
latestProofOutcome?: IssueWatchdogProofOutcomeSummary | null;
|
||||
triggerCount: number;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
|
||||
Reference in new issue
Block a user