@boboddy/sdk 0.0.9-alpha → 0.0.10-alpha
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/apps/api/src/http/routes/authenticated.d.ts +7 -3
- package/dist/apps/api/src/http/routes/feedback-requests.d.ts +2 -0
- package/dist/apps/api/src/http/routes/linear-pipeline-definitions.d.ts +2 -0
- package/dist/apps/api/src/http/routes/linear-pipeline-executions.d.ts +2 -0
- package/dist/apps/api/src/http/routes/project-context-entries.d.ts +2 -0
- package/dist/apps/api/src/http/routes/projects.d.ts +2 -0
- package/dist/apps/api/src/http/routes/step-definition-templates.d.ts +2 -0
- package/dist/apps/api/src/http/routes/step-definitions.d.ts +2 -0
- package/dist/apps/api/src/http/routes/step-execution-route-helpers.d.ts +54 -4
- package/dist/apps/api/src/http/routes/step-executions.d.ts +2 -0
- package/dist/apps/api/src/http/routes/work-items.d.ts +2 -0
- package/dist/packages/core/src/access/authorization/application/{authorization-service.d.ts → user-authorization-service.d.ts} +2 -2
- package/dist/packages/core/src/access/authorization/infra/project-authorization-service.d.ts +6 -4
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/create-project-runtime-session.d.ts +6 -4
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/get-project-runtime-session.d.ts +6 -4
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/list-project-runtime-sessions.d.ts +6 -4
- package/dist/packages/core/src/agent-sessions/project-runtime-session/application/stop-project-runtime-session.d.ts +6 -4
- package/dist/packages/core/src/agent-sessions/runtime-command/application/complete-claimed-runtime-command.d.ts +3 -1
- package/dist/packages/core/src/agent-sessions/runtime-command/application/create-runtime-command.d.ts +6 -4
- package/dist/packages/core/src/agent-sessions/runtime-command/application/fail-claimed-runtime-command.d.ts +3 -1
- package/dist/packages/core/src/agent-sessions/runtime-command/application/interrupt-claimed-runtime-command.d.ts +3 -1
- package/dist/packages/core/src/agent-sessions/runtime-command/application/run-runtime-command-locally.d.ts +5 -4
- package/dist/packages/core/src/agent-sessions/runtime-service/application/create-runtime-service.d.ts +6 -4
- package/dist/packages/core/src/agent-sessions/runtime-service/application/get-runtime-service.d.ts +6 -4
- package/dist/packages/core/src/agent-sessions/runtime-service/application/start-runtime-service-locally.d.ts +6 -4
- package/dist/packages/core/src/agent-sessions/runtime-service/application/stop-runtime-service.d.ts +7 -5
- package/dist/packages/core/src/lib/di.d.ts +5 -4
- package/dist/packages/core/src/lib/errors.d.ts +1 -0
- package/dist/packages/core/src/lib/result.d.ts +15 -0
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/add-linear-pipeline-step-definition.d.ts +6 -2
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/archive-linear-pipeline-definition.d.ts +6 -2
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/create-linear-pipeline-definition.d.ts +3 -1
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/get-linear-pipeline-definition.d.ts +6 -2
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/list-linear-pipeline-definitions.d.ts +3 -1
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/remove-linear-pipeline-step-definition.d.ts +6 -2
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/set-linear-pipeline-step-advancement-policy-definition.d.ts +6 -2
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/update-linear-pipeline-definition.d.ts +6 -2
- package/dist/packages/core/src/pipeline-definitions/pipeline-definition/application/update-linear-pipeline-step-definition.d.ts +6 -2
- package/dist/packages/core/src/pipeline-definitions/step-definition/application/archive-step-definition.d.ts +6 -2
- package/dist/packages/core/src/pipeline-definitions/step-definition/application/create-step-definition.d.ts +3 -1
- package/dist/packages/core/src/pipeline-definitions/step-definition/application/get-step-definition.d.ts +6 -2
- package/dist/packages/core/src/pipeline-definitions/step-definition/application/list-step-definitions.d.ts +3 -1
- package/dist/packages/core/src/pipeline-definitions/step-definition/application/update-step-definition.d.ts +6 -2
- package/dist/packages/core/src/pipeline-definitions/step-definition-template/application/get-step-definition-template.d.ts +3 -1
- package/dist/packages/core/src/pipeline-definitions/step-definition-template/application/instantiate-step-definition-template.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/feedback-request/application/decline-feedback-request.d.ts +2 -3
- package/dist/packages/core/src/pipeline-executions/feedback-request/application/list-feedback-requests-by-step-signal.d.ts +2 -3
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/accept-linear-pipeline-step-run.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/apply-linear-pipeline-step-result-and-advance.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/cancel-linear-pipeline-execution.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/create-linear-pipeline-execution.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/create-linear-pipeline-step-run-attempt.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/get-linear-pipeline-execution.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/list-linear-pipeline-executions-by-definition.d.ts +5 -1
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/list-linear-pipeline-executions.d.ts +3 -1
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/mark-linear-pipeline-step-run-attempt-running.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/queue-first-linear-pipeline-step-run.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/retrigger-linear-pipeline-step-run.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/pipeline-execution/application/start-linear-pipeline-execution.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/step-execution/application/add-step-execution-result.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/step-execution/application/claim-step-executions.d.ts +3 -1
- package/dist/packages/core/src/pipeline-executions/step-execution/application/complete-claimed-step-execution.d.ts +8 -4
- package/dist/packages/core/src/pipeline-executions/step-execution/application/create-step-execution.d.ts +3 -1
- package/dist/packages/core/src/pipeline-executions/step-execution/application/extract-step-execution-signals.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/step-execution/application/get-step-execution-worker-context.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/step-execution/application/get-step-execution.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/step-execution/application/heartbeat-step-execution-claim.d.ts +6 -2
- package/dist/packages/core/src/pipeline-executions/step-execution/application/list-step-executions-by-project.d.ts +3 -1
- package/dist/packages/core/src/pipeline-executions/step-execution/application/mark-step-execution-running.d.ts +6 -2
- package/dist/packages/core/src/projects/project/application/create-project.d.ts +3 -3
- package/dist/packages/core/src/projects/project/application/get-project.d.ts +6 -4
- package/dist/packages/core/src/projects/project/application/list-projects.d.ts +3 -3
- package/dist/packages/core/src/projects/project/application/update-project-membership.d.ts +6 -4
- package/dist/packages/core/src/projects/project-context/application/create-project-context-entry.d.ts +2 -4
- package/dist/packages/core/src/projects/project-context/application/delete-project-context-entry.d.ts +5 -4
- package/dist/packages/core/src/projects/project-context/application/list-project-context-entries.d.ts +2 -3
- package/dist/packages/core/src/work-items/work-item/application/create-work-item.d.ts +6 -6
- package/dist/packages/core/src/work-items/work-item/application/delete-work-items.d.ts +6 -6
- package/dist/packages/core/src/work-items/work-item/application/get-work-items.d.ts +6 -6
- package/dist/packages/core/src/work-items/work-item/application/list-work-items-by-project.d.ts +6 -4
- package/dist/packages/core/src/work-items/work-item/application/upsert-work-item.d.ts +2 -4
- package/package.json +1 -2
- package/dist/apps/api/src/http/project-permission-handler.d.ts +0 -18
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Elysia } from "elysia";
|
|
2
|
-
|
|
2
|
+
import { type UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
|
|
3
|
+
import type { UserAuthorizationService } from "@boboddy/core/access/authorization/application/user-authorization-service";
|
|
4
|
+
export declare const createAuthenticated: (createUserAuthz: (actorId: UuidV7) => UserAuthorizationService) => Elysia<"", {
|
|
3
5
|
decorator: {};
|
|
4
6
|
store: {};
|
|
5
7
|
derive: {};
|
|
@@ -17,7 +19,7 @@ export declare const authenticated: Elysia<"", {
|
|
|
17
19
|
}, {}, {
|
|
18
20
|
derive: {
|
|
19
21
|
readonly auth: {
|
|
20
|
-
readonly userId:
|
|
22
|
+
readonly userId: UuidV7;
|
|
21
23
|
readonly user: {
|
|
22
24
|
id: string;
|
|
23
25
|
createdAt: Date;
|
|
@@ -37,6 +39,7 @@ export declare const authenticated: Elysia<"", {
|
|
|
37
39
|
ipAddress?: string | null | undefined | undefined;
|
|
38
40
|
userAgent?: string | null | undefined | undefined;
|
|
39
41
|
};
|
|
42
|
+
readonly userAuthz: UserAuthorizationService;
|
|
40
43
|
};
|
|
41
44
|
};
|
|
42
45
|
resolve: {};
|
|
@@ -44,7 +47,7 @@ export declare const authenticated: Elysia<"", {
|
|
|
44
47
|
standaloneSchema: {};
|
|
45
48
|
response: import("elysia").ExtractErrorFromHandle<{
|
|
46
49
|
readonly auth: {
|
|
47
|
-
readonly userId:
|
|
50
|
+
readonly userId: UuidV7;
|
|
48
51
|
readonly user: {
|
|
49
52
|
id: string;
|
|
50
53
|
createdAt: Date;
|
|
@@ -64,6 +67,7 @@ export declare const authenticated: Elysia<"", {
|
|
|
64
67
|
ipAddress?: string | null | undefined | undefined;
|
|
65
68
|
userAgent?: string | null | undefined | undefined;
|
|
66
69
|
};
|
|
70
|
+
readonly userAuthz: UserAuthorizationService;
|
|
67
71
|
};
|
|
68
72
|
}>;
|
|
69
73
|
}, {
|
|
@@ -247,6 +247,7 @@ export declare const createFeedbackRequestRoutes: (appContext: AppContext) => El
|
|
|
247
247
|
ipAddress?: string | null | undefined | undefined;
|
|
248
248
|
userAgent?: string | null | undefined | undefined;
|
|
249
249
|
};
|
|
250
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
250
251
|
};
|
|
251
252
|
};
|
|
252
253
|
resolve: {};
|
|
@@ -274,6 +275,7 @@ export declare const createFeedbackRequestRoutes: (appContext: AppContext) => El
|
|
|
274
275
|
ipAddress?: string | null | undefined | undefined;
|
|
275
276
|
userAgent?: string | null | undefined | undefined;
|
|
276
277
|
};
|
|
278
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
277
279
|
};
|
|
278
280
|
}>;
|
|
279
281
|
}>;
|
|
@@ -1529,6 +1529,7 @@ export declare const createLinearPipelineDefinitionRoutes: (appContext: AppConte
|
|
|
1529
1529
|
ipAddress?: string | null | undefined | undefined;
|
|
1530
1530
|
userAgent?: string | null | undefined | undefined;
|
|
1531
1531
|
};
|
|
1532
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
1532
1533
|
};
|
|
1533
1534
|
};
|
|
1534
1535
|
resolve: {};
|
|
@@ -1556,6 +1557,7 @@ export declare const createLinearPipelineDefinitionRoutes: (appContext: AppConte
|
|
|
1556
1557
|
ipAddress?: string | null | undefined | undefined;
|
|
1557
1558
|
userAgent?: string | null | undefined | undefined;
|
|
1558
1559
|
};
|
|
1560
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
1559
1561
|
};
|
|
1560
1562
|
}>;
|
|
1561
1563
|
}>;
|
|
@@ -2506,6 +2506,7 @@ export declare const createLinearPipelineExecutionRoutes: (appContext: AppContex
|
|
|
2506
2506
|
ipAddress?: string | null | undefined | undefined;
|
|
2507
2507
|
userAgent?: string | null | undefined | undefined;
|
|
2508
2508
|
};
|
|
2509
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
2509
2510
|
};
|
|
2510
2511
|
};
|
|
2511
2512
|
resolve: {};
|
|
@@ -2533,6 +2534,7 @@ export declare const createLinearPipelineExecutionRoutes: (appContext: AppContex
|
|
|
2533
2534
|
ipAddress?: string | null | undefined | undefined;
|
|
2534
2535
|
userAgent?: string | null | undefined | undefined;
|
|
2535
2536
|
};
|
|
2537
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
2536
2538
|
};
|
|
2537
2539
|
}>;
|
|
2538
2540
|
}>;
|
|
@@ -353,6 +353,7 @@ export declare const createProjectContextEntriesRoutes: (appContext: AppContext)
|
|
|
353
353
|
ipAddress?: string | null | undefined | undefined;
|
|
354
354
|
userAgent?: string | null | undefined | undefined;
|
|
355
355
|
};
|
|
356
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
356
357
|
};
|
|
357
358
|
};
|
|
358
359
|
resolve: {};
|
|
@@ -380,6 +381,7 @@ export declare const createProjectContextEntriesRoutes: (appContext: AppContext)
|
|
|
380
381
|
ipAddress?: string | null | undefined | undefined;
|
|
381
382
|
userAgent?: string | null | undefined | undefined;
|
|
382
383
|
};
|
|
384
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
383
385
|
};
|
|
384
386
|
}>;
|
|
385
387
|
}>;
|
|
@@ -1872,6 +1872,7 @@ export declare const createProjectRoutes: (appContext: AppContext) => Elysia<"",
|
|
|
1872
1872
|
ipAddress?: string | null | undefined | undefined;
|
|
1873
1873
|
userAgent?: string | null | undefined | undefined;
|
|
1874
1874
|
};
|
|
1875
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
1875
1876
|
};
|
|
1876
1877
|
};
|
|
1877
1878
|
resolve: {};
|
|
@@ -1899,6 +1900,7 @@ export declare const createProjectRoutes: (appContext: AppContext) => Elysia<"",
|
|
|
1899
1900
|
ipAddress?: string | null | undefined | undefined;
|
|
1900
1901
|
userAgent?: string | null | undefined | undefined;
|
|
1901
1902
|
};
|
|
1903
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
1902
1904
|
};
|
|
1903
1905
|
}>;
|
|
1904
1906
|
}>;
|
|
@@ -445,6 +445,7 @@ export declare const createStepDefinitionTemplateRoutes: (appContext: AppContext
|
|
|
445
445
|
ipAddress?: string | null | undefined | undefined;
|
|
446
446
|
userAgent?: string | null | undefined | undefined;
|
|
447
447
|
};
|
|
448
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
448
449
|
};
|
|
449
450
|
};
|
|
450
451
|
resolve: {};
|
|
@@ -472,6 +473,7 @@ export declare const createStepDefinitionTemplateRoutes: (appContext: AppContext
|
|
|
472
473
|
ipAddress?: string | null | undefined | undefined;
|
|
473
474
|
userAgent?: string | null | undefined | undefined;
|
|
474
475
|
};
|
|
476
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
475
477
|
};
|
|
476
478
|
}>;
|
|
477
479
|
}>;
|
|
@@ -883,6 +883,7 @@ export declare const createStepDefinitionRoutes: (appContext: AppContext) => Ely
|
|
|
883
883
|
ipAddress?: string | null | undefined | undefined;
|
|
884
884
|
userAgent?: string | null | undefined | undefined;
|
|
885
885
|
};
|
|
886
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
886
887
|
};
|
|
887
888
|
};
|
|
888
889
|
resolve: {};
|
|
@@ -910,6 +911,7 @@ export declare const createStepDefinitionRoutes: (appContext: AppContext) => Ely
|
|
|
910
911
|
ipAddress?: string | null | undefined | undefined;
|
|
911
912
|
userAgent?: string | null | undefined | undefined;
|
|
912
913
|
};
|
|
914
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
913
915
|
};
|
|
914
916
|
}>;
|
|
915
917
|
}>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type { AppContext } from "@boboddy/core/lib/di";
|
|
3
|
-
import { getStepExecutionInputSchema, getStepExecutionResultInputSchema } from "@boboddy/core/pipeline-executions/step-execution/contracts/step-execution-contracts";
|
|
4
2
|
export declare const stepExecutionIdParamsSchema: z.ZodObject<{
|
|
5
3
|
stepExecutionId: z.ZodString & z.ZodType<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string>>;
|
|
6
4
|
}, z.core.$strip>;
|
|
@@ -10,5 +8,57 @@ export declare const stepExecutionResultIdParamsSchema: z.ZodObject<{
|
|
|
10
8
|
export declare const listStepExecutionsQuerySchema: z.ZodObject<{
|
|
11
9
|
projectId: z.ZodString & z.ZodType<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string, z.core.$ZodTypeInternals<import("@boboddy/core/common/contracts/uuid-v7").UuidV7, string>>;
|
|
12
10
|
}, z.core.$strip>;
|
|
13
|
-
export declare const
|
|
14
|
-
|
|
11
|
+
export declare const stdErrors: {
|
|
12
|
+
401: z.ZodObject<{
|
|
13
|
+
type: z.ZodString;
|
|
14
|
+
title: z.ZodString;
|
|
15
|
+
status: z.ZodNumber;
|
|
16
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
17
|
+
instance: z.ZodOptional<z.ZodString>;
|
|
18
|
+
code: z.ZodOptional<z.ZodString>;
|
|
19
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
20
|
+
path: z.ZodString;
|
|
21
|
+
message: z.ZodString;
|
|
22
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
403: z.ZodObject<{
|
|
26
|
+
type: z.ZodString;
|
|
27
|
+
title: z.ZodString;
|
|
28
|
+
status: z.ZodNumber;
|
|
29
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
30
|
+
instance: z.ZodOptional<z.ZodString>;
|
|
31
|
+
code: z.ZodOptional<z.ZodString>;
|
|
32
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33
|
+
path: z.ZodString;
|
|
34
|
+
message: z.ZodString;
|
|
35
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
422: z.ZodObject<{
|
|
39
|
+
type: z.ZodString;
|
|
40
|
+
title: z.ZodString;
|
|
41
|
+
status: z.ZodNumber;
|
|
42
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
43
|
+
instance: z.ZodOptional<z.ZodString>;
|
|
44
|
+
code: z.ZodOptional<z.ZodString>;
|
|
45
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
46
|
+
path: z.ZodString;
|
|
47
|
+
message: z.ZodString;
|
|
48
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>>>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
500: z.ZodObject<{
|
|
52
|
+
type: z.ZodString;
|
|
53
|
+
title: z.ZodString;
|
|
54
|
+
status: z.ZodNumber;
|
|
55
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
56
|
+
instance: z.ZodOptional<z.ZodString>;
|
|
57
|
+
code: z.ZodOptional<z.ZodString>;
|
|
58
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
59
|
+
path: z.ZodString;
|
|
60
|
+
message: z.ZodString;
|
|
61
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, z.core.$strip>>>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
};
|
|
@@ -1451,6 +1451,7 @@ export declare const createStepExecutionsRoutes: (appContext: AppContext) => Ely
|
|
|
1451
1451
|
ipAddress?: string | null | undefined | undefined;
|
|
1452
1452
|
userAgent?: string | null | undefined | undefined;
|
|
1453
1453
|
};
|
|
1454
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
1454
1455
|
};
|
|
1455
1456
|
};
|
|
1456
1457
|
resolve: {};
|
|
@@ -1478,6 +1479,7 @@ export declare const createStepExecutionsRoutes: (appContext: AppContext) => Ely
|
|
|
1478
1479
|
ipAddress?: string | null | undefined | undefined;
|
|
1479
1480
|
userAgent?: string | null | undefined | undefined;
|
|
1480
1481
|
};
|
|
1482
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
1481
1483
|
};
|
|
1482
1484
|
}>;
|
|
1483
1485
|
}>;
|
|
@@ -932,6 +932,7 @@ export declare const createWorkItemsRoutes: (appContext: AppContext) => Elysia<"
|
|
|
932
932
|
ipAddress?: string | null | undefined | undefined;
|
|
933
933
|
userAgent?: string | null | undefined | undefined;
|
|
934
934
|
};
|
|
935
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
935
936
|
};
|
|
936
937
|
};
|
|
937
938
|
resolve: {};
|
|
@@ -959,6 +960,7 @@ export declare const createWorkItemsRoutes: (appContext: AppContext) => Elysia<"
|
|
|
959
960
|
ipAddress?: string | null | undefined | undefined;
|
|
960
961
|
userAgent?: string | null | undefined | undefined;
|
|
961
962
|
};
|
|
963
|
+
readonly userAuthz: import("@boboddy/core/access/authorization/application/user-authorization-service").UserAuthorizationService;
|
|
962
964
|
};
|
|
963
965
|
}>;
|
|
964
966
|
}>;
|
|
@@ -2,11 +2,11 @@ import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
|
|
|
2
2
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
3
3
|
import type { ProjectPermission } from "@boboddy/core/projects/project/domain/project-permission";
|
|
4
4
|
export type RequireProjectPermissionInput = {
|
|
5
|
-
actorId: UuidV7;
|
|
6
5
|
projectId: UuidV7;
|
|
7
6
|
permission: ProjectPermission;
|
|
8
7
|
dbExecutor?: DbExecutor | undefined;
|
|
9
8
|
};
|
|
10
|
-
export interface
|
|
9
|
+
export interface UserAuthorizationService {
|
|
10
|
+
readonly actorId: UuidV7;
|
|
11
11
|
requireProjectPermission(input: RequireProjectPermissionInput): Promise<void>;
|
|
12
12
|
}
|
package/dist/packages/core/src/access/authorization/infra/project-authorization-service.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
|
|
2
|
-
import type {
|
|
3
|
-
|
|
2
|
+
import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
|
|
3
|
+
import type { UserAuthorizationService, RequireProjectPermissionInput } from "../application/user-authorization-service";
|
|
4
|
+
export declare class ProjectAuthorizationService implements UserAuthorizationService {
|
|
5
|
+
readonly actorId: UuidV7;
|
|
4
6
|
private readonly projectRepo;
|
|
5
|
-
constructor(projectRepo: ProjectRepo);
|
|
6
|
-
requireProjectPermission({
|
|
7
|
+
constructor(actorId: UuidV7, projectRepo: ProjectRepo);
|
|
8
|
+
requireProjectPermission({ projectId, permission, dbExecutor, }: RequireProjectPermissionInput): Promise<void>;
|
|
7
9
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
2
|
import type { TimeProvider } from "@boboddy/core/lib/time-provider";
|
|
3
|
-
import
|
|
3
|
+
import { ResourceNotFoundError } from "@boboddy/core/lib/errors";
|
|
4
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
5
|
+
import type { UserAuthorizationService } from "@boboddy/core/access/authorization/application/user-authorization-service";
|
|
4
6
|
import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
|
|
5
7
|
import type { ProjectRuntimeSessionRepo } from "./project-runtime-session-repo";
|
|
6
8
|
import { type CreateProjectRuntimeSessionInput, type ProjectRuntimeSessionContract } from "../contracts/project-runtime-session-contracts";
|
|
7
|
-
export declare const createProjectRuntimeSession: (input: CreateProjectRuntimeSessionInput, {
|
|
8
|
-
|
|
9
|
+
export declare const createProjectRuntimeSession: (input: CreateProjectRuntimeSessionInput, { userAuthz, projectRepo, projectRuntimeSessionRepo, timeProvider, dbExecutor, }: {
|
|
10
|
+
userAuthz: UserAuthorizationService;
|
|
9
11
|
projectRepo: ProjectRepo;
|
|
10
12
|
projectRuntimeSessionRepo: ProjectRuntimeSessionRepo;
|
|
11
13
|
timeProvider: TimeProvider;
|
|
12
14
|
dbExecutor?: DbExecutor | undefined;
|
|
13
|
-
}) => Promise<ProjectRuntimeSessionContract
|
|
15
|
+
}) => Promise<Result<ProjectRuntimeSessionContract, ResourceNotFoundError>>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
|
-
import
|
|
2
|
+
import { ResourceNotFoundError } from "@boboddy/core/lib/errors";
|
|
3
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
4
|
+
import type { UserAuthorizationService } from "@boboddy/core/access/authorization/application/user-authorization-service";
|
|
3
5
|
import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
|
|
4
6
|
import type { ProjectRuntimeSessionRepo } from "./project-runtime-session-repo";
|
|
5
7
|
import { type GetProjectRuntimeSessionInput, type ProjectRuntimeSessionContract } from "../contracts/project-runtime-session-contracts";
|
|
6
|
-
export declare const getProjectRuntimeSession: (input: GetProjectRuntimeSessionInput, {
|
|
7
|
-
|
|
8
|
+
export declare const getProjectRuntimeSession: (input: GetProjectRuntimeSessionInput, { userAuthz, projectRepo, projectRuntimeSessionRepo, dbExecutor, }: {
|
|
9
|
+
userAuthz: UserAuthorizationService;
|
|
8
10
|
projectRepo: ProjectRepo;
|
|
9
11
|
projectRuntimeSessionRepo: ProjectRuntimeSessionRepo;
|
|
10
12
|
dbExecutor?: DbExecutor | undefined;
|
|
11
|
-
}) => Promise<ProjectRuntimeSessionContract
|
|
13
|
+
}) => Promise<Result<ProjectRuntimeSessionContract, ResourceNotFoundError>>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
|
-
import
|
|
2
|
+
import { ResourceNotFoundError } from "@boboddy/core/lib/errors";
|
|
3
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
4
|
+
import type { UserAuthorizationService } from "@boboddy/core/access/authorization/application/user-authorization-service";
|
|
3
5
|
import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
|
|
4
6
|
import type { ProjectRuntimeSessionRepo } from "./project-runtime-session-repo";
|
|
5
7
|
import { type ListProjectRuntimeSessionsInput, type ProjectRuntimeSessionContract } from "../contracts/project-runtime-session-contracts";
|
|
6
|
-
export declare const listProjectRuntimeSessions: (input: ListProjectRuntimeSessionsInput, {
|
|
7
|
-
|
|
8
|
+
export declare const listProjectRuntimeSessions: (input: ListProjectRuntimeSessionsInput, { userAuthz, projectRepo, projectRuntimeSessionRepo, dbExecutor, }: {
|
|
9
|
+
userAuthz: UserAuthorizationService;
|
|
8
10
|
projectRepo: ProjectRepo;
|
|
9
11
|
projectRuntimeSessionRepo: ProjectRuntimeSessionRepo;
|
|
10
12
|
dbExecutor?: DbExecutor | undefined;
|
|
11
|
-
}) => Promise<ProjectRuntimeSessionContract[]
|
|
13
|
+
}) => Promise<Result<ProjectRuntimeSessionContract[], ResourceNotFoundError>>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
2
|
import type { TimeProvider } from "@boboddy/core/lib/time-provider";
|
|
3
|
-
import
|
|
3
|
+
import { ResourceNotFoundError } from "@boboddy/core/lib/errors";
|
|
4
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
5
|
+
import type { UserAuthorizationService } from "@boboddy/core/access/authorization/application/user-authorization-service";
|
|
4
6
|
import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
|
|
5
7
|
import type { AiContainerLauncher } from "./ai-container-launcher";
|
|
6
8
|
import type { DevcontainerLauncher } from "./devcontainer-launcher";
|
|
@@ -12,8 +14,8 @@ import type { RuntimeServiceRepo } from "../../runtime-service/application/runti
|
|
|
12
14
|
import type { RuntimeSessionServiceExposureProvider } from "../../runtime-service/application/runtime-session-service-exposure-provider";
|
|
13
15
|
import type { RuntimeServiceRunner } from "../../runtime-service/application/runtime-service-runner";
|
|
14
16
|
import { type ProjectRuntimeSessionContract, type StopProjectRuntimeSessionInput } from "../contracts/project-runtime-session-contracts";
|
|
15
|
-
export declare const stopProjectRuntimeSession: (input: StopProjectRuntimeSessionInput, {
|
|
16
|
-
|
|
17
|
+
export declare const stopProjectRuntimeSession: (input: StopProjectRuntimeSessionInput, { userAuthz, projectRepo, projectRuntimeSessionRepo, devcontainerLauncher, aiContainerLauncher, runtimeSessionNetworkManager, runtimeSessionServiceExposureProvider, runtimeServiceRepo, runtimeServiceRunner, runtimeOperationEventPublisher, workspaceManager, timeProvider, dbExecutor, }: {
|
|
18
|
+
userAuthz: UserAuthorizationService;
|
|
17
19
|
projectRepo: ProjectRepo;
|
|
18
20
|
projectRuntimeSessionRepo: ProjectRuntimeSessionRepo;
|
|
19
21
|
devcontainerLauncher: DevcontainerLauncher;
|
|
@@ -26,4 +28,4 @@ export declare const stopProjectRuntimeSession: (input: StopProjectRuntimeSessio
|
|
|
26
28
|
workspaceManager: WorkspaceManager;
|
|
27
29
|
timeProvider: TimeProvider;
|
|
28
30
|
dbExecutor?: DbExecutor | undefined;
|
|
29
|
-
}) => Promise<ProjectRuntimeSessionContract
|
|
31
|
+
}) => Promise<Result<ProjectRuntimeSessionContract, ResourceNotFoundError>>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
|
+
import { ResourceNotFoundError } from "@boboddy/core/lib/errors";
|
|
3
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
2
4
|
import type { TimeProvider } from "@boboddy/core/lib/time-provider";
|
|
3
5
|
import { type Logger } from "@boboddy/core/lib/logger";
|
|
4
6
|
import { type CompleteClaimedRuntimeCommandInput, type GetRuntimeCommandInput, type RuntimeCommandContract } from "../contracts/runtime-command-contracts";
|
|
@@ -8,4 +10,4 @@ export declare const completeClaimedRuntimeCommand: (runtimeCommandIdInput: GetR
|
|
|
8
10
|
timeProvider: TimeProvider;
|
|
9
11
|
dbExecutor?: DbExecutor | undefined;
|
|
10
12
|
logger?: Logger | undefined;
|
|
11
|
-
}) => Promise<RuntimeCommandContract
|
|
13
|
+
}) => Promise<Result<RuntimeCommandContract, ResourceNotFoundError>>;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
2
|
import type { TimeProvider } from "@boboddy/core/lib/time-provider";
|
|
3
3
|
import { type Logger } from "@boboddy/core/lib/logger";
|
|
4
|
-
import
|
|
4
|
+
import { CoreValidationError, ResourceNotFoundError } from "@boboddy/core/lib/errors";
|
|
5
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
6
|
+
import type { UserAuthorizationService } from "@boboddy/core/access/authorization/application/user-authorization-service";
|
|
5
7
|
import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
|
|
6
8
|
import type { ProjectRuntimeSessionRepo } from "@boboddy/core/agent-sessions/project-runtime-session/application/project-runtime-session-repo";
|
|
7
9
|
import type { RuntimeCommandRepo } from "./runtime-command-repo";
|
|
8
10
|
import { type CreateRuntimeCommandInput, type RuntimeCommandContract } from "../contracts/runtime-command-contracts";
|
|
9
|
-
export declare const createRuntimeCommand: (input: CreateRuntimeCommandInput, {
|
|
10
|
-
|
|
11
|
+
export declare const createRuntimeCommand: (input: CreateRuntimeCommandInput, { userAuthz, projectRepo, projectRuntimeSessionRepo, runtimeCommandRepo, timeProvider, dbExecutor, logger, }: {
|
|
12
|
+
userAuthz: UserAuthorizationService;
|
|
11
13
|
projectRepo: ProjectRepo;
|
|
12
14
|
projectRuntimeSessionRepo: ProjectRuntimeSessionRepo;
|
|
13
15
|
runtimeCommandRepo: RuntimeCommandRepo;
|
|
14
16
|
timeProvider: TimeProvider;
|
|
15
17
|
dbExecutor?: DbExecutor | undefined;
|
|
16
18
|
logger?: Logger | undefined;
|
|
17
|
-
}) => Promise<RuntimeCommandContract
|
|
19
|
+
}) => Promise<Result<RuntimeCommandContract, ResourceNotFoundError | CoreValidationError>>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
|
+
import { ResourceNotFoundError } from "@boboddy/core/lib/errors";
|
|
3
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
2
4
|
import type { TimeProvider } from "@boboddy/core/lib/time-provider";
|
|
3
5
|
import { type Logger } from "@boboddy/core/lib/logger";
|
|
4
6
|
import { type FailClaimedRuntimeCommandInput, type GetRuntimeCommandInput, type RuntimeCommandContract } from "../contracts/runtime-command-contracts";
|
|
@@ -8,4 +10,4 @@ export declare const failClaimedRuntimeCommand: (runtimeCommandIdInput: GetRunti
|
|
|
8
10
|
timeProvider: TimeProvider;
|
|
9
11
|
dbExecutor?: DbExecutor | undefined;
|
|
10
12
|
logger?: Logger | undefined;
|
|
11
|
-
}) => Promise<RuntimeCommandContract
|
|
13
|
+
}) => Promise<Result<RuntimeCommandContract, ResourceNotFoundError>>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
|
+
import { ResourceNotFoundError } from "@boboddy/core/lib/errors";
|
|
3
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
2
4
|
import type { TimeProvider } from "@boboddy/core/lib/time-provider";
|
|
3
5
|
import { type Logger } from "@boboddy/core/lib/logger";
|
|
4
6
|
import { type GetRuntimeCommandInput, type InterruptClaimedRuntimeCommandInput, type RuntimeCommandContract } from "../contracts/runtime-command-contracts";
|
|
@@ -8,4 +10,4 @@ export declare const interruptClaimedRuntimeCommand: (runtimeCommandIdInput: Get
|
|
|
8
10
|
timeProvider: TimeProvider;
|
|
9
11
|
dbExecutor?: DbExecutor | undefined;
|
|
10
12
|
logger?: Logger | undefined;
|
|
11
|
-
}) => Promise<RuntimeCommandContract
|
|
13
|
+
}) => Promise<Result<RuntimeCommandContract, ResourceNotFoundError>>;
|
|
@@ -2,17 +2,18 @@ import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
|
2
2
|
import type { TimeProvider } from "@boboddy/core/lib/time-provider";
|
|
3
3
|
import { type Logger } from "@boboddy/core/lib/logger";
|
|
4
4
|
import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
|
|
5
|
-
import
|
|
5
|
+
import { CoreValidationError, ResourceNotFoundError, ResourceOwnershipError } from "@boboddy/core/lib/errors";
|
|
6
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
7
|
+
import type { UserAuthorizationService } from "@boboddy/core/access/authorization/application/user-authorization-service";
|
|
6
8
|
import type { ProjectRuntimeSessionRepo } from "@boboddy/core/agent-sessions/project-runtime-session/application/project-runtime-session-repo";
|
|
7
9
|
import type { RuntimeCommandRepo } from "./runtime-command-repo";
|
|
8
10
|
import type { RuntimeCommandRunner } from "./runtime-command-runner";
|
|
9
11
|
import type { RuntimeOperationEventPublisher } from "../../runtime-operation-event/application/runtime-operation-event-publisher";
|
|
10
12
|
import type { RuntimeCommandContract } from "../contracts/runtime-command-contracts";
|
|
11
13
|
type RunRuntimeCommandLocallyDeps = {
|
|
12
|
-
|
|
14
|
+
userAuthz: UserAuthorizationService;
|
|
13
15
|
projectId: UuidV7;
|
|
14
16
|
projectRuntimeSessionId: UuidV7;
|
|
15
|
-
authz: AuthorizationService;
|
|
16
17
|
workerId: string;
|
|
17
18
|
runtimeCommandRepo: RuntimeCommandRepo;
|
|
18
19
|
projectRuntimeSessionRepo: ProjectRuntimeSessionRepo;
|
|
@@ -22,5 +23,5 @@ type RunRuntimeCommandLocallyDeps = {
|
|
|
22
23
|
dbExecutor?: DbExecutor | undefined;
|
|
23
24
|
logger?: Logger | undefined;
|
|
24
25
|
};
|
|
25
|
-
export declare const runRuntimeCommandLocally: (runtimeCommandId: UuidV7, deps: RunRuntimeCommandLocallyDeps) => Promise<RuntimeCommandContract
|
|
26
|
+
export declare const runRuntimeCommandLocally: (runtimeCommandId: UuidV7, deps: RunRuntimeCommandLocallyDeps) => Promise<Result<RuntimeCommandContract, ResourceNotFoundError | ResourceOwnershipError | CoreValidationError>>;
|
|
26
27
|
export {};
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
2
|
import type { TimeProvider } from "@boboddy/core/lib/time-provider";
|
|
3
3
|
import { type Logger } from "@boboddy/core/lib/logger";
|
|
4
|
-
import
|
|
4
|
+
import { ResourceNotFoundError } from "@boboddy/core/lib/errors";
|
|
5
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
6
|
+
import type { UserAuthorizationService } from "@boboddy/core/access/authorization/application/user-authorization-service";
|
|
5
7
|
import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
|
|
6
8
|
import type { ProjectRuntimeSessionRepo } from "@boboddy/core/agent-sessions/project-runtime-session/application/project-runtime-session-repo";
|
|
7
9
|
import type { RuntimeServiceRepo } from "./runtime-service-repo";
|
|
8
10
|
import { type CreateRuntimeServiceInput, type RuntimeServiceContract } from "../contracts/runtime-service-contracts";
|
|
9
|
-
export declare const createRuntimeService: (input: CreateRuntimeServiceInput, {
|
|
10
|
-
|
|
11
|
+
export declare const createRuntimeService: (input: CreateRuntimeServiceInput, { userAuthz, projectRepo, projectRuntimeSessionRepo, runtimeServiceRepo, timeProvider, dbExecutor, logger, }: {
|
|
12
|
+
userAuthz: UserAuthorizationService;
|
|
11
13
|
projectRepo: ProjectRepo;
|
|
12
14
|
projectRuntimeSessionRepo: ProjectRuntimeSessionRepo;
|
|
13
15
|
runtimeServiceRepo: RuntimeServiceRepo;
|
|
14
16
|
timeProvider: TimeProvider;
|
|
15
17
|
dbExecutor?: DbExecutor | undefined;
|
|
16
18
|
logger?: Logger | undefined;
|
|
17
|
-
}) => Promise<RuntimeServiceContract
|
|
19
|
+
}) => Promise<Result<RuntimeServiceContract, ResourceNotFoundError>>;
|
package/dist/packages/core/src/agent-sessions/runtime-service/application/get-runtime-service.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
|
-
import
|
|
2
|
+
import { ResourceNotFoundError } from "@boboddy/core/lib/errors";
|
|
3
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
4
|
+
import type { UserAuthorizationService } from "@boboddy/core/access/authorization/application/user-authorization-service";
|
|
3
5
|
import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
|
|
4
6
|
import type { RuntimeServiceRepo } from "./runtime-service-repo";
|
|
5
7
|
import { type GetRuntimeServiceInput, type RuntimeServiceContract } from "../contracts/runtime-service-contracts";
|
|
6
|
-
export declare const getRuntimeService: (input: GetRuntimeServiceInput, {
|
|
7
|
-
|
|
8
|
+
export declare const getRuntimeService: (input: GetRuntimeServiceInput, { userAuthz, projectRepo, runtimeServiceRepo, dbExecutor, }: {
|
|
9
|
+
userAuthz: UserAuthorizationService;
|
|
8
10
|
projectRepo: ProjectRepo;
|
|
9
11
|
runtimeServiceRepo: RuntimeServiceRepo;
|
|
10
12
|
dbExecutor?: DbExecutor | undefined;
|
|
11
|
-
}) => Promise<RuntimeServiceContract
|
|
13
|
+
}) => Promise<Result<RuntimeServiceContract, ResourceNotFoundError>>;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
2
|
import type { TimeProvider } from "@boboddy/core/lib/time-provider";
|
|
3
3
|
import { type Logger } from "@boboddy/core/lib/logger";
|
|
4
|
-
import
|
|
4
|
+
import { CoreValidationError, ResourceNotFoundError } from "@boboddy/core/lib/errors";
|
|
5
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
6
|
+
import type { UserAuthorizationService } from "@boboddy/core/access/authorization/application/user-authorization-service";
|
|
5
7
|
import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
|
|
6
8
|
import type { ProjectRuntimeSessionRepo } from "@boboddy/core/agent-sessions/project-runtime-session/application/project-runtime-session-repo";
|
|
7
9
|
import type { RuntimeOperationEventPublisher } from "@boboddy/core/agent-sessions/runtime-operation-event/application/runtime-operation-event-publisher";
|
|
8
10
|
import type { RuntimeServiceRepo } from "./runtime-service-repo";
|
|
9
11
|
import type { RuntimeServiceRunner } from "./runtime-service-runner";
|
|
10
12
|
import { type RuntimeServiceContract, type StartRuntimeServiceInput } from "../contracts/runtime-service-contracts";
|
|
11
|
-
export declare const startRuntimeServiceLocally: (input: StartRuntimeServiceInput, {
|
|
12
|
-
|
|
13
|
+
export declare const startRuntimeServiceLocally: (input: StartRuntimeServiceInput, { userAuthz, projectRepo, projectRuntimeSessionRepo, runtimeServiceRepo, runtimeServiceRunner, runtimeOperationEventPublisher, timeProvider, dbExecutor, logger, }: {
|
|
14
|
+
userAuthz: UserAuthorizationService;
|
|
13
15
|
projectRepo: ProjectRepo;
|
|
14
16
|
projectRuntimeSessionRepo: ProjectRuntimeSessionRepo;
|
|
15
17
|
runtimeServiceRepo: RuntimeServiceRepo;
|
|
@@ -18,4 +20,4 @@ export declare const startRuntimeServiceLocally: (input: StartRuntimeServiceInpu
|
|
|
18
20
|
timeProvider: TimeProvider;
|
|
19
21
|
dbExecutor?: DbExecutor | undefined;
|
|
20
22
|
logger?: Logger | undefined;
|
|
21
|
-
}) => Promise<RuntimeServiceContract
|
|
23
|
+
}) => Promise<Result<RuntimeServiceContract, ResourceNotFoundError | CoreValidationError>>;
|
package/dist/packages/core/src/agent-sessions/runtime-service/application/stop-runtime-service.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { DbExecutor } from "@boboddy/core/lib/db/db-executor";
|
|
2
2
|
import type { TimeProvider } from "@boboddy/core/lib/time-provider";
|
|
3
3
|
import { type Logger } from "@boboddy/core/lib/logger";
|
|
4
|
-
import
|
|
4
|
+
import { CoreValidationError, ResourceNotFoundError } from "@boboddy/core/lib/errors";
|
|
5
|
+
import { Result } from "@boboddy/core/lib/result";
|
|
6
|
+
import type { UserAuthorizationService } from "@boboddy/core/access/authorization/application/user-authorization-service";
|
|
5
7
|
import type { ProjectRepo } from "@boboddy/core/projects/project/application/project-repo";
|
|
6
8
|
import type { ProjectRuntimeSessionRepo } from "@boboddy/core/agent-sessions/project-runtime-session/application/project-runtime-session-repo";
|
|
7
9
|
import { getProjectRuntimeSessionExecutionTarget } from "@boboddy/core/agent-sessions/project-runtime-session/application/project-runtime-session-execution-target";
|
|
@@ -18,9 +20,9 @@ export declare const stopOwnedRuntimeService: (runtimeService: RuntimeServiceEnt
|
|
|
18
20
|
timeProvider: TimeProvider;
|
|
19
21
|
dbExecutor?: DbExecutor | undefined;
|
|
20
22
|
logger?: Logger | undefined;
|
|
21
|
-
}) => Promise<RuntimeServiceEntity
|
|
22
|
-
export declare const stopRuntimeService: (input: StopRuntimeServiceInput, {
|
|
23
|
-
|
|
23
|
+
}) => Promise<Result<RuntimeServiceEntity, CoreValidationError>>;
|
|
24
|
+
export declare const stopRuntimeService: (input: StopRuntimeServiceInput, { userAuthz, projectRepo, projectRuntimeSessionRepo, runtimeServiceRepo, runtimeServiceRunner, runtimeOperationEventPublisher, timeProvider, dbExecutor, logger, }: {
|
|
25
|
+
userAuthz: UserAuthorizationService;
|
|
24
26
|
projectRepo: ProjectRepo;
|
|
25
27
|
projectRuntimeSessionRepo: ProjectRuntimeSessionRepo;
|
|
26
28
|
runtimeServiceRepo: RuntimeServiceRepo;
|
|
@@ -29,4 +31,4 @@ export declare const stopRuntimeService: (input: StopRuntimeServiceInput, { user
|
|
|
29
31
|
timeProvider: TimeProvider;
|
|
30
32
|
dbExecutor?: DbExecutor | undefined;
|
|
31
33
|
logger?: Logger | undefined;
|
|
32
|
-
}) => Promise<RuntimeServiceContract
|
|
34
|
+
}) => Promise<Result<RuntimeServiceContract, ResourceNotFoundError | CoreValidationError>>;
|
|
@@ -24,7 +24,8 @@ import type { RuntimeSessionServiceExposureProvider } from "@boboddy/core/agent-
|
|
|
24
24
|
import { LocalRuntimeCommandRunner } from "@boboddy/core/agent-sessions/runtime-command/infra/local-runtime-command-runner";
|
|
25
25
|
import { InMemoryDomainEventDispatcher } from "@boboddy/core/lib/domain-events/in-memory-domain-event-dispatcher";
|
|
26
26
|
import { type Logger } from "@boboddy/core/lib/logger";
|
|
27
|
-
import type {
|
|
27
|
+
import type { UserAuthorizationService } from "@boboddy/core/access/authorization/application/user-authorization-service";
|
|
28
|
+
import type { UuidV7 } from "@boboddy/core/common/contracts/uuid-v7";
|
|
28
29
|
export type CreateAppContextOverrides = {
|
|
29
30
|
timeProvider?: TimeProvider;
|
|
30
31
|
projectRepo?: ProjectRepo;
|
|
@@ -50,7 +51,7 @@ export type CreateAppContextOverrides = {
|
|
|
50
51
|
projectContextEntryRepo?: ProjectContextEntryRepo;
|
|
51
52
|
feedbackRequestRepo?: FeedbackRequestRepo;
|
|
52
53
|
stepDefinitionTemplateRepo?: StepDefinitionTemplateRepo;
|
|
53
|
-
|
|
54
|
+
createUserAuthorizationService?: (actorId: UuidV7) => UserAuthorizationService;
|
|
54
55
|
logger?: Logger;
|
|
55
56
|
};
|
|
56
57
|
export declare function createAppContext(overrides?: CreateAppContextOverrides): {
|
|
@@ -77,7 +78,7 @@ export declare function createAppContext(overrides?: CreateAppContextOverrides):
|
|
|
77
78
|
projectContextEntryRepo: ProjectContextEntryRepo;
|
|
78
79
|
feedbackRequestRepo: FeedbackRequestRepo;
|
|
79
80
|
stepDefinitionTemplateRepo: StepDefinitionTemplateRepo;
|
|
80
|
-
|
|
81
|
+
createUserAuthorizationService: (actorId: UuidV7) => UserAuthorizationService;
|
|
81
82
|
domainEventDispatcher: InMemoryDomainEventDispatcher;
|
|
82
83
|
timeProvider: TimeProvider;
|
|
83
84
|
};
|
|
@@ -106,7 +107,7 @@ export declare const DefaultAppContext: {
|
|
|
106
107
|
projectContextEntryRepo: ProjectContextEntryRepo;
|
|
107
108
|
feedbackRequestRepo: FeedbackRequestRepo;
|
|
108
109
|
stepDefinitionTemplateRepo: StepDefinitionTemplateRepo;
|
|
109
|
-
|
|
110
|
+
createUserAuthorizationService: (actorId: UuidV7) => UserAuthorizationService;
|
|
110
111
|
domainEventDispatcher: InMemoryDomainEventDispatcher;
|
|
111
112
|
timeProvider: TimeProvider;
|
|
112
113
|
};
|