@opengeni/core 0.19.0 → 0.20.3
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/dependencies.d.ts +4 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/sandbox/fleet.d.ts +2 -0
- package/package.json +9 -9
- package/src/dependencies.ts +4 -0
- package/src/domain/resources.ts +2 -1
- package/src/sandbox/fleet.ts +12 -2
package/dist/sandbox/fleet.d.ts
CHANGED
|
@@ -132,6 +132,8 @@ export type RunOnResult = {
|
|
|
132
132
|
target: string;
|
|
133
133
|
kind: string;
|
|
134
134
|
ok: boolean;
|
|
135
|
+
/** Display name of the target sandbox when known (from the sandboxes row). */
|
|
136
|
+
targetName?: string;
|
|
135
137
|
stdout?: string;
|
|
136
138
|
stderr?: string;
|
|
137
139
|
exitCode?: number | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.3",
|
|
4
4
|
"description": "OpenGeni framework-agnostic core: the domain, access, and billing layers (neutral access, off-HTTP V2 surface). Behavior-preserving extraction from apps/api — keeps Hono's HTTPException for error throwing (typed-errors cleanup deferred).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
37
37
|
"@opengeni/codex": "^0.2.10",
|
|
38
|
-
"@opengeni/config": "^0.10.
|
|
39
|
-
"@opengeni/contracts": "^0.
|
|
40
|
-
"@opengeni/db": "^0.
|
|
41
|
-
"@opengeni/documents": "^0.
|
|
42
|
-
"@opengeni/events": "^0.3.
|
|
43
|
-
"@opengeni/observability": "^0.4.
|
|
44
|
-
"@opengeni/runtime": "^0.18.
|
|
45
|
-
"@opengeni/storage": "^0.2.
|
|
38
|
+
"@opengeni/config": "^0.10.7",
|
|
39
|
+
"@opengeni/contracts": "^0.36.0",
|
|
40
|
+
"@opengeni/db": "^0.27.0",
|
|
41
|
+
"@opengeni/documents": "^0.3.3",
|
|
42
|
+
"@opengeni/events": "^0.3.66",
|
|
43
|
+
"@opengeni/observability": "^0.4.10",
|
|
44
|
+
"@opengeni/runtime": "^0.18.4",
|
|
45
|
+
"@opengeni/storage": "^0.2.60",
|
|
46
46
|
"hono": "^4.12.18"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
package/src/dependencies.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { Settings } from "@opengeni/config";
|
|
|
2
2
|
import type {
|
|
3
3
|
ConnectionCredentialsPort,
|
|
4
4
|
Document,
|
|
5
|
+
DocumentAuthorityKind,
|
|
5
6
|
GitHubAppApiPort,
|
|
6
7
|
ScheduledTask,
|
|
7
8
|
SessionAuthorizationPort,
|
|
@@ -73,6 +74,9 @@ export type DocumentIndexClient = {
|
|
|
73
74
|
accountId: string;
|
|
74
75
|
workspaceId: string;
|
|
75
76
|
documentId: string;
|
|
77
|
+
authorityKind: DocumentAuthorityKind;
|
|
78
|
+
authorityWorkspaceId: string | null;
|
|
79
|
+
authoritySubjectId: string | null;
|
|
76
80
|
}) => Promise<Document | void>;
|
|
77
81
|
};
|
|
78
82
|
|
package/src/domain/resources.ts
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
normalizeRepositorySubpath,
|
|
9
9
|
normalizeResourceMountPath,
|
|
10
10
|
resourceIdentityKey,
|
|
11
|
+
resourceMountPath,
|
|
11
12
|
resourceMountPathCollisionKey,
|
|
12
13
|
ResourceRefConflictError,
|
|
13
14
|
ResourceMountPathError,
|
|
@@ -115,7 +116,7 @@ export function normalizeResources(resources: ResourceRef[]): ResourceRef[] {
|
|
|
115
116
|
for (const resource of resources) {
|
|
116
117
|
let normalized: ResourceRef;
|
|
117
118
|
if (resource.kind === "file") {
|
|
118
|
-
const mountPath = normalizeMountPath(resource
|
|
119
|
+
const mountPath = normalizeMountPath(resourceMountPath(resource));
|
|
119
120
|
normalized = {
|
|
120
121
|
kind: "file",
|
|
121
122
|
fileId: resource.fileId,
|
package/src/sandbox/fleet.ts
CHANGED
|
@@ -510,6 +510,8 @@ export type RunOnResult = {
|
|
|
510
510
|
target: string;
|
|
511
511
|
kind: string;
|
|
512
512
|
ok: boolean;
|
|
513
|
+
/** Display name of the target sandbox when known (from the sandboxes row). */
|
|
514
|
+
targetName?: string;
|
|
513
515
|
stdout?: string;
|
|
514
516
|
stderr?: string;
|
|
515
517
|
exitCode?: number | null;
|
|
@@ -628,6 +630,7 @@ export async function runOnSandbox(
|
|
|
628
630
|
if (sandbox.kind !== "selfhosted" || !sandbox.enrollmentId) {
|
|
629
631
|
return {
|
|
630
632
|
target,
|
|
633
|
+
targetName: sandbox.name,
|
|
631
634
|
kind: op.kind,
|
|
632
635
|
ok: false,
|
|
633
636
|
reason: `run_on routes one-off ops to enrolled selfhosted machines; ${sandbox.kind} targets are reached via the active sandbox (swap to it first)`,
|
|
@@ -635,10 +638,16 @@ export async function runOnSandbox(
|
|
|
635
638
|
}
|
|
636
639
|
const enrollment = await getEnrollment(services.db, ctx.workspaceId, sandbox.enrollmentId);
|
|
637
640
|
if (!enrollment || enrollment.status !== "active") {
|
|
638
|
-
return {
|
|
641
|
+
return {
|
|
642
|
+
target,
|
|
643
|
+
targetName: sandbox.name,
|
|
644
|
+
kind: op.kind,
|
|
645
|
+
ok: false,
|
|
646
|
+
reason: `sandbox ${target} is not enrolled/active`,
|
|
647
|
+
};
|
|
639
648
|
}
|
|
640
649
|
|
|
641
|
-
|
|
650
|
+
const result = await executeRunOnSelfhostedMachine(
|
|
642
651
|
{
|
|
643
652
|
workspaceId: ctx.workspaceId,
|
|
644
653
|
agentId: sandbox.enrollmentId,
|
|
@@ -650,6 +659,7 @@ export async function runOnSandbox(
|
|
|
650
659
|
target,
|
|
651
660
|
op,
|
|
652
661
|
);
|
|
662
|
+
return { ...result, targetName: sandbox.name };
|
|
653
663
|
}
|
|
654
664
|
|
|
655
665
|
export type ProvisionResult =
|