@locusai/shared 0.14.4 → 0.15.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/dist/index.js +637 -445
- package/dist/models/autonomy.d.ts +24 -0
- package/dist/models/autonomy.d.ts.map +1 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/job.d.ts +87 -0
- package/dist/models/job.d.ts.map +1 -0
- package/dist/models/suggestion.d.ts +43 -0
- package/dist/models/suggestion.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare enum RiskLevel {
|
|
3
|
+
LOW = "LOW",
|
|
4
|
+
HIGH = "HIGH"
|
|
5
|
+
}
|
|
6
|
+
export declare enum ChangeCategory {
|
|
7
|
+
FIX = "FIX",
|
|
8
|
+
REFACTOR = "REFACTOR",
|
|
9
|
+
STYLE = "STYLE",
|
|
10
|
+
DEPENDENCY = "DEPENDENCY",
|
|
11
|
+
FEATURE = "FEATURE",
|
|
12
|
+
ARCHITECTURE = "ARCHITECTURE",
|
|
13
|
+
DATABASE = "DATABASE",
|
|
14
|
+
AUTH = "AUTH",
|
|
15
|
+
API = "API"
|
|
16
|
+
}
|
|
17
|
+
export declare const AutonomyRuleSchema: z.ZodObject<{
|
|
18
|
+
category: z.ZodEnum<typeof ChangeCategory>;
|
|
19
|
+
riskLevel: z.ZodEnum<typeof RiskLevel>;
|
|
20
|
+
autoExecute: z.ZodBoolean;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type AutonomyRule = z.infer<typeof AutonomyRuleSchema>;
|
|
23
|
+
export declare const DEFAULT_AUTONOMY_RULES: AutonomyRule[];
|
|
24
|
+
//# sourceMappingURL=autonomy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autonomy.d.ts","sourceRoot":"","sources":["../../src/models/autonomy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,oBAAY,SAAS;IACnB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED,oBAAY,cAAc;IACxB,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,GAAG,QAAQ;CACZ;AAMD,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAM9D,eAAO,MAAM,sBAAsB,EAAE,YAAY,EA0ChD,CAAC"}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
export * from "./activity";
|
|
2
2
|
export * from "./agent";
|
|
3
3
|
export * from "./auth";
|
|
4
|
+
export * from "./autonomy";
|
|
4
5
|
export * from "./aws-instance";
|
|
5
6
|
export * from "./ci";
|
|
6
7
|
export * from "./doc";
|
|
7
8
|
export * from "./doc-group";
|
|
8
9
|
export * from "./invitation";
|
|
10
|
+
export * from "./job";
|
|
9
11
|
export * from "./organization";
|
|
10
12
|
export * from "./sprint";
|
|
13
|
+
export * from "./suggestion";
|
|
11
14
|
export * from "./task";
|
|
12
15
|
export * from "./user";
|
|
13
16
|
export * from "./workspace";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,MAAM,CAAC;AACrB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,MAAM,CAAC;AACrB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare enum JobType {
|
|
3
|
+
LINT_SCAN = "LINT_SCAN",
|
|
4
|
+
DEPENDENCY_CHECK = "DEPENDENCY_CHECK",
|
|
5
|
+
TODO_CLEANUP = "TODO_CLEANUP",
|
|
6
|
+
FLAKY_TEST_DETECTION = "FLAKY_TEST_DETECTION",
|
|
7
|
+
CUSTOM = "CUSTOM"
|
|
8
|
+
}
|
|
9
|
+
export declare enum JobStatus {
|
|
10
|
+
IDLE = "IDLE",
|
|
11
|
+
RUNNING = "RUNNING",
|
|
12
|
+
COMPLETED = "COMPLETED",
|
|
13
|
+
FAILED = "FAILED",
|
|
14
|
+
CANCELLED = "CANCELLED"
|
|
15
|
+
}
|
|
16
|
+
export declare enum JobSeverity {
|
|
17
|
+
AUTO_EXECUTE = "AUTO_EXECUTE",
|
|
18
|
+
REQUIRE_APPROVAL = "REQUIRE_APPROVAL"
|
|
19
|
+
}
|
|
20
|
+
export declare const JobScheduleSchema: z.ZodObject<{
|
|
21
|
+
cronExpression: z.ZodString;
|
|
22
|
+
enabled: z.ZodBoolean;
|
|
23
|
+
lastRunAt: z.ZodOptional<z.ZodString>;
|
|
24
|
+
nextRunAt: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type JobSchedule = z.infer<typeof JobScheduleSchema>;
|
|
27
|
+
export declare const JobConfigSchema: z.ZodObject<{
|
|
28
|
+
type: z.ZodEnum<typeof JobType>;
|
|
29
|
+
schedule: z.ZodObject<{
|
|
30
|
+
cronExpression: z.ZodString;
|
|
31
|
+
enabled: z.ZodBoolean;
|
|
32
|
+
lastRunAt: z.ZodOptional<z.ZodString>;
|
|
33
|
+
nextRunAt: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
severity: z.ZodEnum<typeof JobSeverity>;
|
|
36
|
+
enabled: z.ZodBoolean;
|
|
37
|
+
options: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type JobConfig = z.infer<typeof JobConfigSchema>;
|
|
40
|
+
export declare const JobRunResultSchema: z.ZodObject<{
|
|
41
|
+
summary: z.ZodString;
|
|
42
|
+
filesChanged: z.ZodNumber;
|
|
43
|
+
prUrl: z.ZodOptional<z.ZodString>;
|
|
44
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export type JobRunResult = z.infer<typeof JobRunResultSchema>;
|
|
47
|
+
export declare const JobRunSchema: z.ZodObject<{
|
|
48
|
+
id: z.ZodString;
|
|
49
|
+
jobType: z.ZodEnum<typeof JobType>;
|
|
50
|
+
status: z.ZodEnum<typeof JobStatus>;
|
|
51
|
+
startedAt: z.ZodString;
|
|
52
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
53
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
summary: z.ZodString;
|
|
55
|
+
filesChanged: z.ZodNumber;
|
|
56
|
+
prUrl: z.ZodOptional<z.ZodString>;
|
|
57
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
workspaceId: z.ZodString;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export type JobRun = z.infer<typeof JobRunSchema>;
|
|
62
|
+
export declare const CreateJobRunSchema: z.ZodObject<{
|
|
63
|
+
jobType: z.ZodEnum<typeof JobType>;
|
|
64
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JobStatus>>>;
|
|
65
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
66
|
+
error: z.ZodOptional<z.ZodString>;
|
|
67
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
summary: z.ZodString;
|
|
69
|
+
filesChanged: z.ZodNumber;
|
|
70
|
+
prUrl: z.ZodOptional<z.ZodString>;
|
|
71
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
export type CreateJobRun = z.infer<typeof CreateJobRunSchema>;
|
|
75
|
+
export declare const UpdateJobRunSchema: z.ZodObject<{
|
|
76
|
+
status: z.ZodOptional<z.ZodEnum<typeof JobStatus>>;
|
|
77
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
78
|
+
summary: z.ZodString;
|
|
79
|
+
filesChanged: z.ZodNumber;
|
|
80
|
+
prUrl: z.ZodOptional<z.ZodString>;
|
|
81
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
84
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
export type UpdateJobRun = z.infer<typeof UpdateJobRunSchema>;
|
|
87
|
+
//# sourceMapping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OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare enum SuggestionStatus {
|
|
3
|
+
NEW = "NEW",
|
|
4
|
+
NOTIFIED = "NOTIFIED",
|
|
5
|
+
ACTED_ON = "ACTED_ON",
|
|
6
|
+
SKIPPED = "SKIPPED",
|
|
7
|
+
EXPIRED = "EXPIRED"
|
|
8
|
+
}
|
|
9
|
+
export declare enum SuggestionType {
|
|
10
|
+
CODE_FIX = "CODE_FIX",
|
|
11
|
+
DEPENDENCY_UPDATE = "DEPENDENCY_UPDATE",
|
|
12
|
+
NEXT_STEP = "NEXT_STEP",
|
|
13
|
+
REFACTOR = "REFACTOR",
|
|
14
|
+
TEST_FIX = "TEST_FIX"
|
|
15
|
+
}
|
|
16
|
+
export declare const SUGGESTION_TTL_HOURS = 24;
|
|
17
|
+
export declare const SuggestionSchema: z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
type: z.ZodEnum<typeof SuggestionType>;
|
|
20
|
+
status: z.ZodEnum<typeof SuggestionStatus>;
|
|
21
|
+
title: z.ZodString;
|
|
22
|
+
description: z.ZodString;
|
|
23
|
+
jobRunId: z.ZodOptional<z.ZodString>;
|
|
24
|
+
workspaceId: z.ZodString;
|
|
25
|
+
createdAt: z.ZodString;
|
|
26
|
+
expiresAt: z.ZodString;
|
|
27
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type Suggestion = z.infer<typeof SuggestionSchema>;
|
|
30
|
+
export declare const CreateSuggestionSchema: z.ZodObject<{
|
|
31
|
+
type: z.ZodEnum<typeof SuggestionType>;
|
|
32
|
+
title: z.ZodString;
|
|
33
|
+
description: z.ZodString;
|
|
34
|
+
jobRunId: z.ZodOptional<z.ZodString>;
|
|
35
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
36
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type CreateSuggestion = z.infer<typeof CreateSuggestionSchema>;
|
|
39
|
+
export declare const UpdateSuggestionStatusSchema: z.ZodObject<{
|
|
40
|
+
status: z.ZodEnum<typeof SuggestionStatus>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export type UpdateSuggestionStatus = z.infer<typeof UpdateSuggestionStatusSchema>;
|
|
43
|
+
//# sourceMappingURL=suggestion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../src/models/suggestion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,oBAAY,gBAAgB;IAC1B,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,iBAAiB,sBAAsB;IACvC,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACtB;AAMD,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAMvC,eAAO,MAAM,gBAAgB;;;;;;;;;;;iBAW3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAM1D,eAAO,MAAM,sBAAsB;;;;;;;iBAOjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC"}
|