fix: enforce work product taxonomy
This commit is contained in:
1 parent
fa53d15822
commit
67ccfc1160
9 files changed
+261
-38
No files matched your search
@@ -7,5 +7,6 @@ export * from "./contracts/schemas-approvals";
|
||||
export * from "./contracts/schemas-messages";
|
||||
export * from "./contracts/schemas-execution";
|
||||
export * from "./contracts/schemas-misc";
|
||||
export * from "./contracts/schemas-work-products";
|
||||
export * from "./contracts/desktop-api";
|
||||
export * from "./contracts/preload-forwarders";
|
||||
@@ -0,0 +1,45 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const workProductTypeEnum = z.enum([
|
||||
"file",
|
||||
"link",
|
||||
"pull_request",
|
||||
"branch",
|
||||
"commit",
|
||||
"artifact",
|
||||
"document",
|
||||
"preview_url",
|
||||
"runtime_service",
|
||||
]);
|
||||
|
||||
export const workProductProviderEnum = z.enum([
|
||||
"filesystem",
|
||||
"external",
|
||||
"agentcompany",
|
||||
"github",
|
||||
"custom",
|
||||
]);
|
||||
|
||||
export const workProductStatusEnum = z.enum([
|
||||
"active",
|
||||
"ready_for_review",
|
||||
"approved",
|
||||
"merged",
|
||||
"closed",
|
||||
"failed",
|
||||
"draft",
|
||||
"archived",
|
||||
]);
|
||||
|
||||
export const workProductReviewStateEnum = z.enum([
|
||||
"none",
|
||||
"needs_board_review",
|
||||
"approved",
|
||||
"changes_requested",
|
||||
]);
|
||||
|
||||
export type WorkProductType = z.infer<typeof workProductTypeEnum>;
|
||||
export type WorkProductProvider = z.infer<typeof workProductProviderEnum>;
|
||||
export type WorkProductStatus = z.infer<typeof workProductStatusEnum>;
|
||||
export type WorkProductReviewState = z.infer<typeof workProductReviewStateEnum>;
|
||||
|
||||
@@ -235,6 +235,13 @@ export type DocumentType =
|
||||
|
||||
export type DocumentStatus = "draft" | "in_review" | "approved" | "archived" | "superseded";
|
||||
|
||||
export type {
|
||||
WorkProductType,
|
||||
WorkProductProvider,
|
||||
WorkProductStatus,
|
||||
WorkProductReviewState,
|
||||
} from "../contracts/schemas-work-products";
|
||||
|
||||
export type KnowledgeCategory =
|
||||
| "lesson_learned"
|
||||
| "best_practice"
|
||||
|
||||
@@ -23,6 +23,10 @@ import type {
|
||||
ThreadWaitingFor,
|
||||
ThreadNotifyOn,
|
||||
DepartmentId,
|
||||
WorkProductType,
|
||||
WorkProductProvider,
|
||||
WorkProductStatus,
|
||||
WorkProductReviewState,
|
||||
} from "./enums";
|
||||
|
||||
export interface SocialAccountRecord {
|
||||
@@ -103,13 +107,13 @@ export interface WorkProductRecord {
|
||||
projectId: string | null;
|
||||
taskId: string | null;
|
||||
workspaceId: string | null;
|
||||
type: string;
|
||||
provider: string;
|
||||
type: WorkProductType;
|
||||
provider: WorkProductProvider;
|
||||
externalId: string | null;
|
||||
title: string;
|
||||
url: string | null;
|
||||
status: string;
|
||||
reviewState: string;
|
||||
status: WorkProductStatus;
|
||||
reviewState: WorkProductReviewState;
|
||||
isPrimary: boolean;
|
||||
summary: string | null;
|
||||
metadataJson: string | null;
|
||||
|
||||
Reference in new issue
Block a user