@proposit/shared 0.1.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 +32 -0
- package/dist/api-client/argument/batch.d.ts +661 -0
- package/dist/api-client/argument/batch.d.ts.map +1 -0
- package/dist/api-client/argument/batch.js +14 -0
- package/dist/api-client/argument/batch.js.map +1 -0
- package/dist/api-client/argument/claims.d.ts +175 -0
- package/dist/api-client/argument/claims.d.ts.map +1 -0
- package/dist/api-client/argument/claims.js +20 -0
- package/dist/api-client/argument/claims.js.map +1 -0
- package/dist/api-client/argument/index.d.ts +1344 -0
- package/dist/api-client/argument/index.d.ts.map +1 -0
- package/dist/api-client/argument/index.js +62 -0
- package/dist/api-client/argument/index.js.map +1 -0
- package/dist/api-client/argument/logic/index.d.ts +861 -0
- package/dist/api-client/argument/logic/index.d.ts.map +1 -0
- package/dist/api-client/argument/logic/index.js +73 -0
- package/dist/api-client/argument/logic/index.js.map +1 -0
- package/dist/api-client/argument/logic/repair.d.ts +182 -0
- package/dist/api-client/argument/logic/repair.d.ts.map +1 -0
- package/dist/api-client/argument/logic/repair.js +9 -0
- package/dist/api-client/argument/logic/repair.js.map +1 -0
- package/dist/api-client/argument/reactions.d.ts +38 -0
- package/dist/api-client/argument/reactions.d.ts.map +1 -0
- package/dist/api-client/argument/reactions.js +9 -0
- package/dist/api-client/argument/reactions.js.map +1 -0
- package/dist/api-client/argument/reviews.d.ts +183 -0
- package/dist/api-client/argument/reviews.d.ts.map +1 -0
- package/dist/api-client/argument/reviews.js +21 -0
- package/dist/api-client/argument/reviews.js.map +1 -0
- package/dist/api-client/search.d.ts +64 -0
- package/dist/api-client/search.d.ts.map +1 -0
- package/dist/api-client/search.js +19 -0
- package/dist/api-client/search.js.map +1 -0
- package/dist/api-client/user/claims.d.ts +128 -0
- package/dist/api-client/user/claims.d.ts.map +1 -0
- package/dist/api-client/user/claims.js +10 -0
- package/dist/api-client/user/claims.js.map +1 -0
- package/dist/api-client/user/sources.d.ts +41 -0
- package/dist/api-client/user/sources.d.ts.map +1 -0
- package/dist/api-client/user/sources.js +7 -0
- package/dist/api-client/user/sources.js.map +1 -0
- package/dist/checksum.d.ts +2 -0
- package/dist/checksum.d.ts.map +1 -0
- package/dist/checksum.js +32 -0
- package/dist/checksum.js.map +1 -0
- package/dist/consts/argument.d.ts +9 -0
- package/dist/consts/argument.d.ts.map +1 -0
- package/dist/consts/argument.js +17 -0
- package/dist/consts/argument.js.map +1 -0
- package/dist/consts/identity.d.ts +3 -0
- package/dist/consts/identity.d.ts.map +1 -0
- package/dist/consts/identity.js +6 -0
- package/dist/consts/identity.js.map +1 -0
- package/dist/consts/index.d.ts +6 -0
- package/dist/consts/index.d.ts.map +1 -0
- package/dist/consts/index.js +6 -0
- package/dist/consts/index.js.map +1 -0
- package/dist/consts/roles.d.ts +27 -0
- package/dist/consts/roles.d.ts.map +1 -0
- package/dist/consts/roles.js +52 -0
- package/dist/consts/roles.js.map +1 -0
- package/dist/consts/task-status.d.ts +8 -0
- package/dist/consts/task-status.d.ts.map +1 -0
- package/dist/consts/task-status.js +14 -0
- package/dist/consts/task-status.js.map +1 -0
- package/dist/consts/user-tiers.d.ts +7 -0
- package/dist/consts/user-tiers.d.ts.map +1 -0
- package/dist/consts/user-tiers.js +60 -0
- package/dist/consts/user-tiers.js.map +1 -0
- package/dist/engine/engine.d.ts +94 -0
- package/dist/engine/engine.d.ts.map +1 -0
- package/dist/engine/engine.js +313 -0
- package/dist/engine/engine.js.map +1 -0
- package/dist/engine/library-adapters.d.ts +12 -0
- package/dist/engine/library-adapters.d.ts.map +1 -0
- package/dist/engine/library-adapters.js +11 -0
- package/dist/engine/library-adapters.js.map +1 -0
- package/dist/engine/mutations/claims.d.ts +10 -0
- package/dist/engine/mutations/claims.d.ts.map +1 -0
- package/dist/engine/mutations/claims.js +22 -0
- package/dist/engine/mutations/claims.js.map +1 -0
- package/dist/engine/mutations/expressions.d.ts +109 -0
- package/dist/engine/mutations/expressions.d.ts.map +1 -0
- package/dist/engine/mutations/expressions.js +277 -0
- package/dist/engine/mutations/expressions.js.map +1 -0
- package/dist/engine/mutations/index.d.ts +7 -0
- package/dist/engine/mutations/index.d.ts.map +1 -0
- package/dist/engine/mutations/index.js +6 -0
- package/dist/engine/mutations/index.js.map +1 -0
- package/dist/engine/mutations/premises.d.ts +25 -0
- package/dist/engine/mutations/premises.d.ts.map +1 -0
- package/dist/engine/mutations/premises.js +51 -0
- package/dist/engine/mutations/premises.js.map +1 -0
- package/dist/engine/mutations/types.d.ts +11 -0
- package/dist/engine/mutations/types.d.ts.map +1 -0
- package/dist/engine/mutations/types.js +2 -0
- package/dist/engine/mutations/types.js.map +1 -0
- package/dist/engine/mutations/variables.d.ts +27 -0
- package/dist/engine/mutations/variables.d.ts.map +1 -0
- package/dist/engine/mutations/variables.js +16 -0
- package/dist/engine/mutations/variables.js.map +1 -0
- package/dist/engine/optimistic/index.d.ts +4 -0
- package/dist/engine/optimistic/index.d.ts.map +1 -0
- package/dist/engine/optimistic/index.js +3 -0
- package/dist/engine/optimistic/index.js.map +1 -0
- package/dist/engine/optimistic/reconciliation.d.ts +32 -0
- package/dist/engine/optimistic/reconciliation.d.ts.map +1 -0
- package/dist/engine/optimistic/reconciliation.js +140 -0
- package/dist/engine/optimistic/reconciliation.js.map +1 -0
- package/dist/engine/optimistic/types.d.ts +25 -0
- package/dist/engine/optimistic/types.d.ts.map +1 -0
- package/dist/engine/optimistic/types.js +12 -0
- package/dist/engine/optimistic/types.js.map +1 -0
- package/dist/engine/optimistic/verification.d.ts +13 -0
- package/dist/engine/optimistic/verification.d.ts.map +1 -0
- package/dist/engine/optimistic/verification.js +71 -0
- package/dist/engine/optimistic/verification.js.map +1 -0
- package/dist/engine/review/evaluation.d.ts +27 -0
- package/dist/engine/review/evaluation.d.ts.map +1 -0
- package/dist/engine/review/evaluation.js +122 -0
- package/dist/engine/review/evaluation.js.map +1 -0
- package/dist/engine/review/fingerprint.d.ts +9 -0
- package/dist/engine/review/fingerprint.d.ts.map +1 -0
- package/dist/engine/review/fingerprint.js +27 -0
- package/dist/engine/review/fingerprint.js.map +1 -0
- package/dist/engine/review/overlay.d.ts +19 -0
- package/dist/engine/review/overlay.d.ts.map +1 -0
- package/dist/engine/review/overlay.js +81 -0
- package/dist/engine/review/overlay.js.map +1 -0
- package/dist/engine/review/reasons.d.ts +15 -0
- package/dist/engine/review/reasons.d.ts.map +1 -0
- package/dist/engine/review/reasons.js +211 -0
- package/dist/engine/review/reasons.js.map +1 -0
- package/dist/engine/review/review-engine.d.ts +134 -0
- package/dist/engine/review/review-engine.d.ts.map +1 -0
- package/dist/engine/review/review-engine.js +590 -0
- package/dist/engine/review/review-engine.js.map +1 -0
- package/dist/engine/review/review-store.d.ts +63 -0
- package/dist/engine/review/review-store.d.ts.map +1 -0
- package/dist/engine/review/review-store.js +174 -0
- package/dist/engine/review/review-store.js.map +1 -0
- package/dist/engine/review/step-queue.d.ts +27 -0
- package/dist/engine/review/step-queue.d.ts.map +1 -0
- package/dist/engine/review/step-queue.js +34 -0
- package/dist/engine/review/step-queue.js.map +1 -0
- package/dist/engine/review/types.d.ts +16 -0
- package/dist/engine/review/types.d.ts.map +1 -0
- package/dist/engine/review/types.js +2 -0
- package/dist/engine/review/types.js.map +1 -0
- package/dist/engine/review/wire.d.ts +8 -0
- package/dist/engine/review/wire.d.ts.map +1 -0
- package/dist/engine/review/wire.js +97 -0
- package/dist/engine/review/wire.js.map +1 -0
- package/dist/engine/text-tree.d.ts +35 -0
- package/dist/engine/text-tree.d.ts.map +1 -0
- package/dist/engine/text-tree.js +137 -0
- package/dist/engine/text-tree.js.map +1 -0
- package/dist/engine/types.d.ts +42 -0
- package/dist/engine/types.d.ts.map +1 -0
- package/dist/engine/types.js +2 -0
- package/dist/engine/types.js.map +1 -0
- package/dist/errors.d.ts +27 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +61 -0
- package/dist/errors.js.map +1 -0
- package/dist/schemas/api/argument/batch/change-edge-operator.d.ts +281 -0
- package/dist/schemas/api/argument/batch/change-edge-operator.d.ts.map +1 -0
- package/dist/schemas/api/argument/batch/change-edge-operator.js +19 -0
- package/dist/schemas/api/argument/batch/change-edge-operator.js.map +1 -0
- package/dist/schemas/api/argument/batch/create-expression-with-operator.d.ts +280 -0
- package/dist/schemas/api/argument/batch/create-expression-with-operator.d.ts.map +1 -0
- package/dist/schemas/api/argument/batch/create-expression-with-operator.js +22 -0
- package/dist/schemas/api/argument/batch/create-expression-with-operator.js.map +1 -0
- package/dist/schemas/api/argument/batch/provision.d.ts +112 -0
- package/dist/schemas/api/argument/batch/provision.d.ts.map +1 -0
- package/dist/schemas/api/argument/batch/provision.js +10 -0
- package/dist/schemas/api/argument/batch/provision.js.map +1 -0
- package/dist/schemas/api/argument/build.d.ts +50 -0
- package/dist/schemas/api/argument/build.d.ts.map +1 -0
- package/dist/schemas/api/argument/build.js +41 -0
- package/dist/schemas/api/argument/build.js.map +1 -0
- package/dist/schemas/api/argument/claims.d.ts +151 -0
- package/dist/schemas/api/argument/claims.d.ts.map +1 -0
- package/dist/schemas/api/argument/claims.js +24 -0
- package/dist/schemas/api/argument/claims.js.map +1 -0
- package/dist/schemas/api/argument/index.d.ts +682 -0
- package/dist/schemas/api/argument/index.d.ts.map +1 -0
- package/dist/schemas/api/argument/index.js +51 -0
- package/dist/schemas/api/argument/index.js.map +1 -0
- package/dist/schemas/api/argument/logic.d.ts +205 -0
- package/dist/schemas/api/argument/logic.d.ts.map +1 -0
- package/dist/schemas/api/argument/logic.js +77 -0
- package/dist/schemas/api/argument/logic.js.map +1 -0
- package/dist/schemas/api/argument/repair.d.ts +195 -0
- package/dist/schemas/api/argument/repair.d.ts.map +1 -0
- package/dist/schemas/api/argument/repair.js +35 -0
- package/dist/schemas/api/argument/repair.js.map +1 -0
- package/dist/schemas/api/claims.d.ts +250 -0
- package/dist/schemas/api/claims.d.ts.map +1 -0
- package/dist/schemas/api/claims.js +20 -0
- package/dist/schemas/api/claims.js.map +1 -0
- package/dist/schemas/api/reaction/index.d.ts +46 -0
- package/dist/schemas/api/reaction/index.d.ts.map +1 -0
- package/dist/schemas/api/reaction/index.js +15 -0
- package/dist/schemas/api/reaction/index.js.map +1 -0
- package/dist/schemas/api/review/index.d.ts +164 -0
- package/dist/schemas/api/review/index.d.ts.map +1 -0
- package/dist/schemas/api/review/index.js +29 -0
- package/dist/schemas/api/review/index.js.map +1 -0
- package/dist/schemas/api/search.d.ts +109 -0
- package/dist/schemas/api/search.d.ts.map +1 -0
- package/dist/schemas/api/search.js +60 -0
- package/dist/schemas/api/search.js.map +1 -0
- package/dist/schemas/api/sources.d.ts +108 -0
- package/dist/schemas/api/sources.d.ts.map +1 -0
- package/dist/schemas/api/sources.js +28 -0
- package/dist/schemas/api/sources.js.map +1 -0
- package/dist/schemas/api/user/index.d.ts +16 -0
- package/dist/schemas/api/user/index.d.ts.map +1 -0
- package/dist/schemas/api/user/index.js +15 -0
- package/dist/schemas/api/user/index.js.map +1 -0
- package/dist/schemas/common.d.ts +50 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +77 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/schemas/gpt.d.ts +10 -0
- package/dist/schemas/gpt.d.ts.map +1 -0
- package/dist/schemas/gpt.js +27 -0
- package/dist/schemas/gpt.js.map +1 -0
- package/dist/schemas/index.d.ts +8 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +8 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/integrations/index.d.ts +159 -0
- package/dist/schemas/integrations/index.d.ts.map +1 -0
- package/dist/schemas/integrations/index.js +72 -0
- package/dist/schemas/integrations/index.js.map +1 -0
- package/dist/schemas/logic.d.ts +195 -0
- package/dist/schemas/logic.d.ts.map +1 -0
- package/dist/schemas/logic.js +77 -0
- package/dist/schemas/logic.js.map +1 -0
- package/dist/schemas/model/arguments.d.ts +457 -0
- package/dist/schemas/model/arguments.d.ts.map +1 -0
- package/dist/schemas/model/arguments.js +100 -0
- package/dist/schemas/model/arguments.js.map +1 -0
- package/dist/schemas/model/claims.d.ts +53 -0
- package/dist/schemas/model/claims.d.ts.map +1 -0
- package/dist/schemas/model/claims.js +40 -0
- package/dist/schemas/model/claims.js.map +1 -0
- package/dist/schemas/model/forks.d.ts +63 -0
- package/dist/schemas/model/forks.d.ts.map +1 -0
- package/dist/schemas/model/forks.js +63 -0
- package/dist/schemas/model/forks.js.map +1 -0
- package/dist/schemas/model/index.d.ts +6 -0
- package/dist/schemas/model/index.d.ts.map +1 -0
- package/dist/schemas/model/index.js +6 -0
- package/dist/schemas/model/index.js.map +1 -0
- package/dist/schemas/model/references.d.ts +49 -0
- package/dist/schemas/model/references.d.ts.map +1 -0
- package/dist/schemas/model/references.js +46 -0
- package/dist/schemas/model/references.js.map +1 -0
- package/dist/schemas/model/review.d.ts +56 -0
- package/dist/schemas/model/review.d.ts.map +1 -0
- package/dist/schemas/model/review.js +50 -0
- package/dist/schemas/model/review.js.map +1 -0
- package/dist/schemas/model/sources.d.ts +456 -0
- package/dist/schemas/model/sources.d.ts.map +1 -0
- package/dist/schemas/model/sources.js +27 -0
- package/dist/schemas/model/sources.js.map +1 -0
- package/dist/schemas/model/users.d.ts +150 -0
- package/dist/schemas/model/users.d.ts.map +1 -0
- package/dist/schemas/model/users.js +136 -0
- package/dist/schemas/model/users.js.map +1 -0
- package/dist/schemas/model.d.ts +2 -0
- package/dist/schemas/model.d.ts.map +1 -0
- package/dist/schemas/model.js +2 -0
- package/dist/schemas/model.js.map +1 -0
- package/dist/schemas/review.d.ts +1403 -0
- package/dist/schemas/review.d.ts.map +1 -0
- package/dist/schemas/review.js +232 -0
- package/dist/schemas/review.js.map +1 -0
- package/dist/schemas/snapshot.d.ts +165 -0
- package/dist/schemas/snapshot.d.ts.map +1 -0
- package/dist/schemas/snapshot.js +80 -0
- package/dist/schemas/snapshot.js.map +1 -0
- package/dist/schemas/tasks.d.ts +551 -0
- package/dist/schemas/tasks.d.ts.map +1 -0
- package/dist/schemas/tasks.js +113 -0
- package/dist/schemas/tasks.js.map +1 -0
- package/dist/utils/embedding-text.d.ts +15 -0
- package/dist/utils/embedding-text.d.ts.map +1 -0
- package/dist/utils/embedding-text.js +86 -0
- package/dist/utils/embedding-text.js.map +1 -0
- package/dist/utils/format-review-share.d.ts +7 -0
- package/dist/utils/format-review-share.d.ts.map +1 -0
- package/dist/utils/format-review-share.js +16 -0
- package/dist/utils/format-review-share.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/tasks/utils.d.ts +4 -0
- package/dist/utils/tasks/utils.d.ts.map +1 -0
- package/dist/utils/tasks/utils.js +12 -0
- package/dist/utils/tasks/utils.js.map +1 -0
- package/dist/utils/utils.d.ts +25 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +115 -0
- package/dist/utils/utils.js.map +1 -0
- package/package.json +128 -0
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
import { Type, type Static } from "typebox";
|
|
2
|
+
export declare const Roles: {
|
|
3
|
+
readonly User: "user";
|
|
4
|
+
readonly Assistant: "assistant";
|
|
5
|
+
readonly Developer: "developer";
|
|
6
|
+
};
|
|
7
|
+
export declare const ChatUserRole: Type.TLiteral<"user">;
|
|
8
|
+
export declare const ChatAssistantRole: Type.TLiteral<"assistant">;
|
|
9
|
+
export declare const ChatDeveloperRole: Type.TLiteral<"developer">;
|
|
10
|
+
export declare const ChatAnyRole: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
11
|
+
export declare const ChatEntrySchema: Type.TObject<{
|
|
12
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
13
|
+
content: Type.TString;
|
|
14
|
+
}>;
|
|
15
|
+
export type TChatEntry = Static<typeof ChatEntrySchema>;
|
|
16
|
+
export declare function isTaskProgressDelta(obj: unknown): obj is TTaskProgressDelta;
|
|
17
|
+
export declare const ArgumentCreateTask: Type.TObject<{
|
|
18
|
+
id: Type.TString;
|
|
19
|
+
userId: Type.TString;
|
|
20
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
21
|
+
type: Type.TLiteral<"argument_create">;
|
|
22
|
+
data: Type.TObject<{
|
|
23
|
+
argumentId: Type.TString;
|
|
24
|
+
version: Type.TNumber;
|
|
25
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
26
|
+
}>;
|
|
27
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
28
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
29
|
+
tokensUsed: Type.TNumber;
|
|
30
|
+
}>, Type.TNull]>;
|
|
31
|
+
createdOn: import("./common.js").TDateType;
|
|
32
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
33
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
34
|
+
status: Type.TNumber;
|
|
35
|
+
}>;
|
|
36
|
+
export type TArgumentCreateTask = Static<typeof ArgumentCreateTask>;
|
|
37
|
+
export declare const ArgumentBuildReviewTask: Type.TObject<{
|
|
38
|
+
id: Type.TString;
|
|
39
|
+
userId: Type.TString;
|
|
40
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
41
|
+
type: Type.TLiteral<"argument_build_review">;
|
|
42
|
+
data: Type.TObject<{
|
|
43
|
+
argumentId: Type.TString;
|
|
44
|
+
version: Type.TNumber;
|
|
45
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
46
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
47
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
48
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
49
|
+
content: Type.TString;
|
|
50
|
+
}>>;
|
|
51
|
+
}>;
|
|
52
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
53
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
54
|
+
tokensUsed: Type.TNumber;
|
|
55
|
+
output: Type.TObject<{
|
|
56
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
57
|
+
content: Type.TString;
|
|
58
|
+
}>;
|
|
59
|
+
}>, Type.TNull]>;
|
|
60
|
+
createdOn: import("./common.js").TDateType;
|
|
61
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
62
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
63
|
+
status: Type.TNumber;
|
|
64
|
+
}>;
|
|
65
|
+
export type TArgumentBuildReviewTask = Static<typeof ArgumentBuildReviewTask>;
|
|
66
|
+
export declare const ArgumentBuildFinalizeTask: Type.TObject<{
|
|
67
|
+
id: Type.TString;
|
|
68
|
+
userId: Type.TString;
|
|
69
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
70
|
+
type: Type.TLiteral<"argument_build_finalize">;
|
|
71
|
+
data: Type.TObject<{
|
|
72
|
+
argumentId: Type.TString;
|
|
73
|
+
version: Type.TNumber;
|
|
74
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
75
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
76
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
77
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
78
|
+
content: Type.TString;
|
|
79
|
+
}>>;
|
|
80
|
+
}>;
|
|
81
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
82
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
83
|
+
tokensUsed: Type.TNumber;
|
|
84
|
+
output: Type.TObject<{
|
|
85
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
86
|
+
content: Type.TString;
|
|
87
|
+
}>;
|
|
88
|
+
}>, Type.TNull]>;
|
|
89
|
+
createdOn: import("./common.js").TDateType;
|
|
90
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
91
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
92
|
+
status: Type.TNumber;
|
|
93
|
+
}>;
|
|
94
|
+
export type TArgumentBuildFinalizeTask = Static<typeof ArgumentBuildFinalizeTask>;
|
|
95
|
+
export declare const ArgumentBuildSimulateUserTask: Type.TObject<{
|
|
96
|
+
id: Type.TString;
|
|
97
|
+
userId: Type.TString;
|
|
98
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
99
|
+
type: Type.TLiteral<"argument_build_simulate_user">;
|
|
100
|
+
data: Type.TObject<{
|
|
101
|
+
argumentId: Type.TString;
|
|
102
|
+
version: Type.TNumber;
|
|
103
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
104
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
105
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
106
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
107
|
+
content: Type.TString;
|
|
108
|
+
}>>;
|
|
109
|
+
}>;
|
|
110
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
111
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
112
|
+
tokensUsed: Type.TNumber;
|
|
113
|
+
output: Type.TObject<{
|
|
114
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
115
|
+
content: Type.TString;
|
|
116
|
+
}>;
|
|
117
|
+
}>, Type.TNull]>;
|
|
118
|
+
createdOn: import("./common.js").TDateType;
|
|
119
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
120
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
121
|
+
status: Type.TNumber;
|
|
122
|
+
}>;
|
|
123
|
+
export type TArgumentBuildSimulateUserTask = Static<typeof ArgumentBuildSimulateUserTask>;
|
|
124
|
+
export declare const TaskSchemaMap: {
|
|
125
|
+
readonly argument_create: Type.TObject<{
|
|
126
|
+
id: Type.TString;
|
|
127
|
+
userId: Type.TString;
|
|
128
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
129
|
+
type: Type.TLiteral<"argument_create">;
|
|
130
|
+
data: Type.TObject<{
|
|
131
|
+
argumentId: Type.TString;
|
|
132
|
+
version: Type.TNumber;
|
|
133
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
134
|
+
}>;
|
|
135
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
136
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
137
|
+
tokensUsed: Type.TNumber;
|
|
138
|
+
}>, Type.TNull]>;
|
|
139
|
+
createdOn: import("./common.js").TDateType;
|
|
140
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
141
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
142
|
+
status: Type.TNumber;
|
|
143
|
+
}>;
|
|
144
|
+
readonly argument_build_review: Type.TObject<{
|
|
145
|
+
id: Type.TString;
|
|
146
|
+
userId: Type.TString;
|
|
147
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
148
|
+
type: Type.TLiteral<"argument_build_review">;
|
|
149
|
+
data: Type.TObject<{
|
|
150
|
+
argumentId: Type.TString;
|
|
151
|
+
version: Type.TNumber;
|
|
152
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
153
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
154
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
155
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
156
|
+
content: Type.TString;
|
|
157
|
+
}>>;
|
|
158
|
+
}>;
|
|
159
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
160
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
161
|
+
tokensUsed: Type.TNumber;
|
|
162
|
+
output: Type.TObject<{
|
|
163
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
164
|
+
content: Type.TString;
|
|
165
|
+
}>;
|
|
166
|
+
}>, Type.TNull]>;
|
|
167
|
+
createdOn: import("./common.js").TDateType;
|
|
168
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
169
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
170
|
+
status: Type.TNumber;
|
|
171
|
+
}>;
|
|
172
|
+
readonly argument_build_finalize: Type.TObject<{
|
|
173
|
+
id: Type.TString;
|
|
174
|
+
userId: Type.TString;
|
|
175
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
176
|
+
type: Type.TLiteral<"argument_build_finalize">;
|
|
177
|
+
data: Type.TObject<{
|
|
178
|
+
argumentId: Type.TString;
|
|
179
|
+
version: Type.TNumber;
|
|
180
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
181
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
182
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
183
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
184
|
+
content: Type.TString;
|
|
185
|
+
}>>;
|
|
186
|
+
}>;
|
|
187
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
188
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
189
|
+
tokensUsed: Type.TNumber;
|
|
190
|
+
output: Type.TObject<{
|
|
191
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
192
|
+
content: Type.TString;
|
|
193
|
+
}>;
|
|
194
|
+
}>, Type.TNull]>;
|
|
195
|
+
createdOn: import("./common.js").TDateType;
|
|
196
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
197
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
198
|
+
status: Type.TNumber;
|
|
199
|
+
}>;
|
|
200
|
+
readonly argument_build_simulate_user: Type.TObject<{
|
|
201
|
+
id: Type.TString;
|
|
202
|
+
userId: Type.TString;
|
|
203
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
204
|
+
type: Type.TLiteral<"argument_build_simulate_user">;
|
|
205
|
+
data: Type.TObject<{
|
|
206
|
+
argumentId: Type.TString;
|
|
207
|
+
version: Type.TNumber;
|
|
208
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
209
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
210
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
211
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
212
|
+
content: Type.TString;
|
|
213
|
+
}>>;
|
|
214
|
+
}>;
|
|
215
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
216
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
217
|
+
tokensUsed: Type.TNumber;
|
|
218
|
+
output: Type.TObject<{
|
|
219
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
220
|
+
content: Type.TString;
|
|
221
|
+
}>;
|
|
222
|
+
}>, Type.TNull]>;
|
|
223
|
+
createdOn: import("./common.js").TDateType;
|
|
224
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
225
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
226
|
+
status: Type.TNumber;
|
|
227
|
+
}>;
|
|
228
|
+
};
|
|
229
|
+
declare const TaskMapSchema: Type.TObject<{
|
|
230
|
+
argument_create: Type.TObject<{
|
|
231
|
+
id: Type.TString;
|
|
232
|
+
userId: Type.TString;
|
|
233
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
234
|
+
type: Type.TLiteral<"argument_create">;
|
|
235
|
+
data: Type.TObject<{
|
|
236
|
+
argumentId: Type.TString;
|
|
237
|
+
version: Type.TNumber;
|
|
238
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
239
|
+
}>;
|
|
240
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
241
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
242
|
+
tokensUsed: Type.TNumber;
|
|
243
|
+
}>, Type.TNull]>;
|
|
244
|
+
createdOn: import("./common.js").TDateType;
|
|
245
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
246
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
247
|
+
status: Type.TNumber;
|
|
248
|
+
}>;
|
|
249
|
+
argument_build_review: Type.TObject<{
|
|
250
|
+
id: Type.TString;
|
|
251
|
+
userId: Type.TString;
|
|
252
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
253
|
+
type: Type.TLiteral<"argument_build_review">;
|
|
254
|
+
data: Type.TObject<{
|
|
255
|
+
argumentId: Type.TString;
|
|
256
|
+
version: Type.TNumber;
|
|
257
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
258
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
259
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
260
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
261
|
+
content: Type.TString;
|
|
262
|
+
}>>;
|
|
263
|
+
}>;
|
|
264
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
265
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
266
|
+
tokensUsed: Type.TNumber;
|
|
267
|
+
output: Type.TObject<{
|
|
268
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
269
|
+
content: Type.TString;
|
|
270
|
+
}>;
|
|
271
|
+
}>, Type.TNull]>;
|
|
272
|
+
createdOn: import("./common.js").TDateType;
|
|
273
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
274
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
275
|
+
status: Type.TNumber;
|
|
276
|
+
}>;
|
|
277
|
+
argument_build_finalize: Type.TObject<{
|
|
278
|
+
id: Type.TString;
|
|
279
|
+
userId: Type.TString;
|
|
280
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
281
|
+
type: Type.TLiteral<"argument_build_finalize">;
|
|
282
|
+
data: Type.TObject<{
|
|
283
|
+
argumentId: Type.TString;
|
|
284
|
+
version: Type.TNumber;
|
|
285
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
286
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
287
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
288
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
289
|
+
content: Type.TString;
|
|
290
|
+
}>>;
|
|
291
|
+
}>;
|
|
292
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
293
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
294
|
+
tokensUsed: Type.TNumber;
|
|
295
|
+
output: Type.TObject<{
|
|
296
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
297
|
+
content: Type.TString;
|
|
298
|
+
}>;
|
|
299
|
+
}>, Type.TNull]>;
|
|
300
|
+
createdOn: import("./common.js").TDateType;
|
|
301
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
302
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
303
|
+
status: Type.TNumber;
|
|
304
|
+
}>;
|
|
305
|
+
argument_build_simulate_user: Type.TObject<{
|
|
306
|
+
id: Type.TString;
|
|
307
|
+
userId: Type.TString;
|
|
308
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
309
|
+
type: Type.TLiteral<"argument_build_simulate_user">;
|
|
310
|
+
data: Type.TObject<{
|
|
311
|
+
argumentId: Type.TString;
|
|
312
|
+
version: Type.TNumber;
|
|
313
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
314
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
315
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
316
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
317
|
+
content: Type.TString;
|
|
318
|
+
}>>;
|
|
319
|
+
}>;
|
|
320
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
321
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
322
|
+
tokensUsed: Type.TNumber;
|
|
323
|
+
output: Type.TObject<{
|
|
324
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
325
|
+
content: Type.TString;
|
|
326
|
+
}>;
|
|
327
|
+
}>, Type.TNull]>;
|
|
328
|
+
createdOn: import("./common.js").TDateType;
|
|
329
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
330
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
331
|
+
status: Type.TNumber;
|
|
332
|
+
}>;
|
|
333
|
+
}>;
|
|
334
|
+
type _TTaskMap = Static<typeof TaskMapSchema>;
|
|
335
|
+
export declare const TaskSchema: Type.TUnion<[Type.TObject<{
|
|
336
|
+
id: Type.TString;
|
|
337
|
+
userId: Type.TString;
|
|
338
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
339
|
+
type: Type.TLiteral<"argument_create">;
|
|
340
|
+
data: Type.TObject<{
|
|
341
|
+
argumentId: Type.TString;
|
|
342
|
+
version: Type.TNumber;
|
|
343
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
344
|
+
}>;
|
|
345
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
346
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
347
|
+
tokensUsed: Type.TNumber;
|
|
348
|
+
}>, Type.TNull]>;
|
|
349
|
+
createdOn: import("./common.js").TDateType;
|
|
350
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
351
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
352
|
+
status: Type.TNumber;
|
|
353
|
+
}>, Type.TObject<{
|
|
354
|
+
id: Type.TString;
|
|
355
|
+
userId: Type.TString;
|
|
356
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
357
|
+
type: Type.TLiteral<"argument_build_review">;
|
|
358
|
+
data: Type.TObject<{
|
|
359
|
+
argumentId: Type.TString;
|
|
360
|
+
version: Type.TNumber;
|
|
361
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
362
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
363
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
364
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
365
|
+
content: Type.TString;
|
|
366
|
+
}>>;
|
|
367
|
+
}>;
|
|
368
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
369
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
370
|
+
tokensUsed: Type.TNumber;
|
|
371
|
+
output: Type.TObject<{
|
|
372
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
373
|
+
content: Type.TString;
|
|
374
|
+
}>;
|
|
375
|
+
}>, Type.TNull]>;
|
|
376
|
+
createdOn: import("./common.js").TDateType;
|
|
377
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
378
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
379
|
+
status: Type.TNumber;
|
|
380
|
+
}>, Type.TObject<{
|
|
381
|
+
id: Type.TString;
|
|
382
|
+
userId: Type.TString;
|
|
383
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
384
|
+
type: Type.TLiteral<"argument_build_finalize">;
|
|
385
|
+
data: Type.TObject<{
|
|
386
|
+
argumentId: Type.TString;
|
|
387
|
+
version: Type.TNumber;
|
|
388
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
389
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
390
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
391
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
392
|
+
content: Type.TString;
|
|
393
|
+
}>>;
|
|
394
|
+
}>;
|
|
395
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
396
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
397
|
+
tokensUsed: Type.TNumber;
|
|
398
|
+
output: Type.TObject<{
|
|
399
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
400
|
+
content: Type.TString;
|
|
401
|
+
}>;
|
|
402
|
+
}>, Type.TNull]>;
|
|
403
|
+
createdOn: import("./common.js").TDateType;
|
|
404
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
405
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
406
|
+
status: Type.TNumber;
|
|
407
|
+
}>, Type.TObject<{
|
|
408
|
+
id: Type.TString;
|
|
409
|
+
userId: Type.TString;
|
|
410
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
411
|
+
type: Type.TLiteral<"argument_build_simulate_user">;
|
|
412
|
+
data: Type.TObject<{
|
|
413
|
+
argumentId: Type.TString;
|
|
414
|
+
version: Type.TNumber;
|
|
415
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
416
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
417
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
418
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
419
|
+
content: Type.TString;
|
|
420
|
+
}>>;
|
|
421
|
+
}>;
|
|
422
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
423
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
424
|
+
tokensUsed: Type.TNumber;
|
|
425
|
+
output: Type.TObject<{
|
|
426
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
427
|
+
content: Type.TString;
|
|
428
|
+
}>;
|
|
429
|
+
}>, Type.TNull]>;
|
|
430
|
+
createdOn: import("./common.js").TDateType;
|
|
431
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
432
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
433
|
+
status: Type.TNumber;
|
|
434
|
+
}>]>;
|
|
435
|
+
export declare const TaskTypeSchema: Type.TUnion<[Type.TLiteral<"argument_create">, Type.TLiteral<"argument_build_review">, Type.TLiteral<"argument_build_finalize">, Type.TLiteral<"argument_build_simulate_user">]>;
|
|
436
|
+
export declare const TaskProgressDeltaSchema: Type.TObject<{
|
|
437
|
+
id: Type.TString;
|
|
438
|
+
type: Type.TUnion<[Type.TLiteral<"argument_create">, Type.TLiteral<"argument_build_review">, Type.TLiteral<"argument_build_finalize">, Type.TLiteral<"argument_build_simulate_user">]>;
|
|
439
|
+
delta: Type.TString;
|
|
440
|
+
}>;
|
|
441
|
+
export type TTaskProgressDelta = Static<typeof TaskProgressDeltaSchema>;
|
|
442
|
+
export declare function isTask(obj: unknown): obj is TTask;
|
|
443
|
+
export type TTaskType = Static<typeof TaskTypeSchema>;
|
|
444
|
+
export type TTask<T extends TTaskType = TTaskType> = _TTaskMap[T];
|
|
445
|
+
export declare const TaskOrDeltaSchema: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
446
|
+
id: Type.TString;
|
|
447
|
+
userId: Type.TString;
|
|
448
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
449
|
+
type: Type.TLiteral<"argument_create">;
|
|
450
|
+
data: Type.TObject<{
|
|
451
|
+
argumentId: Type.TString;
|
|
452
|
+
version: Type.TNumber;
|
|
453
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
454
|
+
}>;
|
|
455
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
456
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
457
|
+
tokensUsed: Type.TNumber;
|
|
458
|
+
}>, Type.TNull]>;
|
|
459
|
+
createdOn: import("./common.js").TDateType;
|
|
460
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
461
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
462
|
+
status: Type.TNumber;
|
|
463
|
+
}>, Type.TObject<{
|
|
464
|
+
id: Type.TString;
|
|
465
|
+
userId: Type.TString;
|
|
466
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
467
|
+
type: Type.TLiteral<"argument_build_review">;
|
|
468
|
+
data: Type.TObject<{
|
|
469
|
+
argumentId: Type.TString;
|
|
470
|
+
version: Type.TNumber;
|
|
471
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
472
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
473
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
474
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
475
|
+
content: Type.TString;
|
|
476
|
+
}>>;
|
|
477
|
+
}>;
|
|
478
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
479
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
480
|
+
tokensUsed: Type.TNumber;
|
|
481
|
+
output: Type.TObject<{
|
|
482
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
483
|
+
content: Type.TString;
|
|
484
|
+
}>;
|
|
485
|
+
}>, Type.TNull]>;
|
|
486
|
+
createdOn: import("./common.js").TDateType;
|
|
487
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
488
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
489
|
+
status: Type.TNumber;
|
|
490
|
+
}>, Type.TObject<{
|
|
491
|
+
id: Type.TString;
|
|
492
|
+
userId: Type.TString;
|
|
493
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
494
|
+
type: Type.TLiteral<"argument_build_finalize">;
|
|
495
|
+
data: Type.TObject<{
|
|
496
|
+
argumentId: Type.TString;
|
|
497
|
+
version: Type.TNumber;
|
|
498
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
499
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
500
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
501
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
502
|
+
content: Type.TString;
|
|
503
|
+
}>>;
|
|
504
|
+
}>;
|
|
505
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
506
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
507
|
+
tokensUsed: Type.TNumber;
|
|
508
|
+
output: Type.TObject<{
|
|
509
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
510
|
+
content: Type.TString;
|
|
511
|
+
}>;
|
|
512
|
+
}>, Type.TNull]>;
|
|
513
|
+
createdOn: import("./common.js").TDateType;
|
|
514
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
515
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
516
|
+
status: Type.TNumber;
|
|
517
|
+
}>, Type.TObject<{
|
|
518
|
+
id: Type.TString;
|
|
519
|
+
userId: Type.TString;
|
|
520
|
+
previousId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
521
|
+
type: Type.TLiteral<"argument_build_simulate_user">;
|
|
522
|
+
data: Type.TObject<{
|
|
523
|
+
argumentId: Type.TString;
|
|
524
|
+
version: Type.TNumber;
|
|
525
|
+
conversationResponseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
526
|
+
responseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
527
|
+
newPrompts: Type.TArray<Type.TObject<{
|
|
528
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
529
|
+
content: Type.TString;
|
|
530
|
+
}>>;
|
|
531
|
+
}>;
|
|
532
|
+
errorData: Type.TUnion<[Type.TRecord<"^.*$", Type.TAny>, Type.TNull]>;
|
|
533
|
+
resultData: Type.TUnion<[Type.TObject<{
|
|
534
|
+
tokensUsed: Type.TNumber;
|
|
535
|
+
output: Type.TObject<{
|
|
536
|
+
role: Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"assistant">, Type.TLiteral<"developer">]>;
|
|
537
|
+
content: Type.TString;
|
|
538
|
+
}>;
|
|
539
|
+
}>, Type.TNull]>;
|
|
540
|
+
createdOn: import("./common.js").TDateType;
|
|
541
|
+
startedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
542
|
+
completedOn: Type.TUnion<[import("./common.js").TDateType, Type.TNull]>;
|
|
543
|
+
status: Type.TNumber;
|
|
544
|
+
}>]>, Type.TObject<{
|
|
545
|
+
id: Type.TString;
|
|
546
|
+
type: Type.TUnion<[Type.TLiteral<"argument_create">, Type.TLiteral<"argument_build_review">, Type.TLiteral<"argument_build_finalize">, Type.TLiteral<"argument_build_simulate_user">]>;
|
|
547
|
+
delta: Type.TString;
|
|
548
|
+
}>]>;
|
|
549
|
+
export type TTaskOrDelta<T extends TTaskType> = TTask<T> | TTaskProgressDelta;
|
|
550
|
+
export {};
|
|
551
|
+
//# sourceMappingURL=tasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/schemas/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAM3C,eAAO,MAAM,KAAK;;;;CAIR,CAAA;AAEV,eAAO,MAAM,YAAY,uBAA2B,CAAA;AACpD,eAAO,MAAM,iBAAiB,4BAAgC,CAAA;AAC9D,eAAO,MAAM,iBAAiB,4BAAgC,CAAA;AAC9D,eAAO,MAAM,WAAW,8FAItB,CAAA;AAEF,eAAO,MAAM,eAAe;;;EAG1B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAA;AA0BvD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,kBAAkB,CAE3E;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;EAkB7B,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAA;AA0BnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIlC,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIpC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAC3C,OAAO,yBAAyB,CACnC,CAAA;AAED,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIxC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,MAAM,CAC/C,OAAO,6BAA6B,CACvC,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKhB,CAAA;AAEV,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjB,CAAA;AAEF,KAAK,SAAS,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAA;AAE7C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKrB,CAAA;AAEF,eAAO,MAAM,cAAc,kLAA4B,CAAA;AAEvD,eAAO,MAAM,uBAAuB;;;;EASnC,CAAA;AACD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE,wBAAgB,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,KAAK,CAEjD;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA;AACrD,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC,CAAA;AAEjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG5B,CAAA;AACF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import { UUID } from "./common.js";
|
|
3
|
+
import { Nullable } from "./common.js";
|
|
4
|
+
import { EncodableDate } from "./common.js";
|
|
5
|
+
import Value from "typebox/value";
|
|
6
|
+
export const Roles = {
|
|
7
|
+
User: "user",
|
|
8
|
+
Assistant: "assistant",
|
|
9
|
+
Developer: "developer",
|
|
10
|
+
};
|
|
11
|
+
export const ChatUserRole = Type.Literal(Roles.User);
|
|
12
|
+
export const ChatAssistantRole = Type.Literal(Roles.Assistant);
|
|
13
|
+
export const ChatDeveloperRole = Type.Literal(Roles.Developer);
|
|
14
|
+
export const ChatAnyRole = Type.Union([
|
|
15
|
+
ChatUserRole,
|
|
16
|
+
ChatAssistantRole,
|
|
17
|
+
ChatDeveloperRole,
|
|
18
|
+
]);
|
|
19
|
+
export const ChatEntrySchema = Type.Object({
|
|
20
|
+
role: ChatAnyRole,
|
|
21
|
+
content: Type.String(),
|
|
22
|
+
});
|
|
23
|
+
const BaseTaskSchema = Type.Interface([], {
|
|
24
|
+
id: UUID,
|
|
25
|
+
userId: UUID,
|
|
26
|
+
previousId: Nullable(Type.String({
|
|
27
|
+
description: "ID of the previous task in the lineage, if any. Typically, this is set if the task is a retry of a previously failed task.",
|
|
28
|
+
})),
|
|
29
|
+
type: Type.String(),
|
|
30
|
+
// This data is set when the task is created
|
|
31
|
+
data: Type.Null(),
|
|
32
|
+
// This data is set when task fails
|
|
33
|
+
errorData: Nullable(Type.Record(Type.String(), Type.Any())),
|
|
34
|
+
// This data is set when task completes successfully
|
|
35
|
+
resultData: Type.Null(),
|
|
36
|
+
createdOn: EncodableDate,
|
|
37
|
+
startedOn: Nullable(EncodableDate),
|
|
38
|
+
completedOn: Nullable(EncodableDate),
|
|
39
|
+
status: Type.Number(),
|
|
40
|
+
});
|
|
41
|
+
export function isTaskProgressDelta(obj) {
|
|
42
|
+
return Value.Check(TaskProgressDeltaSchema, obj);
|
|
43
|
+
}
|
|
44
|
+
export const ArgumentCreateTask = Type.Interface([BaseTaskSchema], {
|
|
45
|
+
type: Type.Literal("argument_create"),
|
|
46
|
+
data: Type.Object({
|
|
47
|
+
argumentId: Type.String({ format: "uuid" }),
|
|
48
|
+
version: Type.Number(),
|
|
49
|
+
responseId: Type.Optional(Nullable(Type.String())),
|
|
50
|
+
}, { additionalProperties: false }),
|
|
51
|
+
resultData: Nullable(Type.Object({
|
|
52
|
+
tokensUsed: Type.Number(),
|
|
53
|
+
}, { additionalProperties: false })),
|
|
54
|
+
});
|
|
55
|
+
const ArgumentBuilderCommonData = Type.Object({
|
|
56
|
+
argumentId: Type.String({ format: "uuid" }),
|
|
57
|
+
version: Type.Number(),
|
|
58
|
+
conversationResponseId: Type.Optional(Nullable(Type.String())),
|
|
59
|
+
responseId: Type.Optional(Nullable(Type.String())),
|
|
60
|
+
newPrompts: Type.Array(ChatEntrySchema, {
|
|
61
|
+
description: "An array of new messages from the user to include in the conversation",
|
|
62
|
+
}),
|
|
63
|
+
}, { additionalProperties: false });
|
|
64
|
+
const ArgumentBuilderCommonResultData = Nullable(Type.Object({
|
|
65
|
+
tokensUsed: Type.Number(),
|
|
66
|
+
output: ChatEntrySchema,
|
|
67
|
+
}, { additionalProperties: false }));
|
|
68
|
+
export const ArgumentBuildReviewTask = Type.Interface([BaseTaskSchema], {
|
|
69
|
+
type: Type.Literal("argument_build_review"),
|
|
70
|
+
data: ArgumentBuilderCommonData,
|
|
71
|
+
resultData: ArgumentBuilderCommonResultData,
|
|
72
|
+
});
|
|
73
|
+
export const ArgumentBuildFinalizeTask = Type.Interface([BaseTaskSchema], {
|
|
74
|
+
type: Type.Literal("argument_build_finalize"),
|
|
75
|
+
data: ArgumentBuilderCommonData,
|
|
76
|
+
resultData: ArgumentBuilderCommonResultData,
|
|
77
|
+
});
|
|
78
|
+
export const ArgumentBuildSimulateUserTask = Type.Interface([BaseTaskSchema], {
|
|
79
|
+
type: Type.Literal("argument_build_simulate_user"),
|
|
80
|
+
data: ArgumentBuilderCommonData,
|
|
81
|
+
resultData: ArgumentBuilderCommonResultData,
|
|
82
|
+
});
|
|
83
|
+
export const TaskSchemaMap = {
|
|
84
|
+
argument_create: ArgumentCreateTask,
|
|
85
|
+
argument_build_review: ArgumentBuildReviewTask,
|
|
86
|
+
argument_build_finalize: ArgumentBuildFinalizeTask,
|
|
87
|
+
argument_build_simulate_user: ArgumentBuildSimulateUserTask,
|
|
88
|
+
};
|
|
89
|
+
const TaskMapSchema = Type.Object({
|
|
90
|
+
...TaskSchemaMap,
|
|
91
|
+
});
|
|
92
|
+
export const TaskSchema = Type.Union([
|
|
93
|
+
ArgumentCreateTask,
|
|
94
|
+
ArgumentBuildReviewTask,
|
|
95
|
+
ArgumentBuildFinalizeTask,
|
|
96
|
+
ArgumentBuildSimulateUserTask,
|
|
97
|
+
]);
|
|
98
|
+
export const TaskTypeSchema = Type.KeyOf(TaskMapSchema);
|
|
99
|
+
export const TaskProgressDeltaSchema = Type.Object({
|
|
100
|
+
id: UUID,
|
|
101
|
+
type: TaskTypeSchema,
|
|
102
|
+
delta: Type.String(),
|
|
103
|
+
}, {
|
|
104
|
+
additionalProperties: false,
|
|
105
|
+
});
|
|
106
|
+
export function isTask(obj) {
|
|
107
|
+
return Value.Check(TaskSchema, obj);
|
|
108
|
+
}
|
|
109
|
+
export const TaskOrDeltaSchema = Type.Union([
|
|
110
|
+
TaskSchema,
|
|
111
|
+
TaskProgressDeltaSchema,
|
|
112
|
+
]);
|
|
113
|
+
//# sourceMappingURL=tasks.js.map
|