@themoltnet/agent-daemon 0.65.0 → 0.65.2
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/cli.js +17 -4
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -9626,6 +9626,7 @@ var OperatorOAuth = class {
|
|
|
9626
9626
|
this.operator = {
|
|
9627
9627
|
issuer: value.issuer,
|
|
9628
9628
|
subject: value.subject,
|
|
9629
|
+
email: "email" in value && typeof value.email === "string" ? value.email : void 0,
|
|
9629
9630
|
teams: "teams" in value ? readOperatorTeams(value.teams) : []
|
|
9630
9631
|
};
|
|
9631
9632
|
} catch (error) {
|
|
@@ -9639,6 +9640,9 @@ var OperatorOAuth = class {
|
|
|
9639
9640
|
operatorConfigured() {
|
|
9640
9641
|
return this.operator !== null;
|
|
9641
9642
|
}
|
|
9643
|
+
operatorEmail() {
|
|
9644
|
+
return this.operator?.email;
|
|
9645
|
+
}
|
|
9642
9646
|
listTeams() {
|
|
9643
9647
|
return this.operator?.teams ?? [];
|
|
9644
9648
|
}
|
|
@@ -9665,6 +9669,7 @@ var OperatorOAuth = class {
|
|
|
9665
9669
|
return {
|
|
9666
9670
|
issuer: payload.iss,
|
|
9667
9671
|
subject: payload.sub,
|
|
9672
|
+
email: typeof claims["moltnet:operator_email"] === "string" ? claims["moltnet:operator_email"] : void 0,
|
|
9668
9673
|
provisioning: claims["moltnet:provisioning"],
|
|
9669
9674
|
teams: readOperatorTeams(claims["moltnet:operator_teams"])
|
|
9670
9675
|
};
|
|
@@ -9756,6 +9761,7 @@ var OperatorOAuth = class {
|
|
|
9756
9761
|
writeFileSync(join(this.root, "operator.json"), JSON.stringify({
|
|
9757
9762
|
issuer: operator.issuer,
|
|
9758
9763
|
subject: operator.subject,
|
|
9764
|
+
...operator.email ? { email: operator.email } : {},
|
|
9759
9765
|
teams: grant ? [] : operator.teams
|
|
9760
9766
|
}), {
|
|
9761
9767
|
mode: 384,
|
|
@@ -9769,10 +9775,12 @@ var OperatorOAuth = class {
|
|
|
9769
9775
|
this.operator = {
|
|
9770
9776
|
issuer: operator.issuer,
|
|
9771
9777
|
subject: operator.subject,
|
|
9778
|
+
...operator.email ? { email: operator.email } : {},
|
|
9772
9779
|
teams: grant ? [] : operator.teams
|
|
9773
9780
|
};
|
|
9774
|
-
} else if (!grant) {
|
|
9775
|
-
this.operator.
|
|
9781
|
+
} else if (!grant || operator.email) {
|
|
9782
|
+
if (operator.email) this.operator.email = operator.email;
|
|
9783
|
+
if (!grant) this.operator.teams = operator.teams;
|
|
9776
9784
|
writeFileSync(join(this.root, "operator.json"), JSON.stringify(this.operator), { mode: 384 });
|
|
9777
9785
|
}
|
|
9778
9786
|
return tokens.access_token;
|
|
@@ -11055,6 +11063,7 @@ var LOG_TRUNCATION_MARKER = Buffer.from("[truncated]\n");
|
|
|
11055
11063
|
var INHERITED_ENV_NAMES = new Set([
|
|
11056
11064
|
"COLORTERM",
|
|
11057
11065
|
"FORCE_COLOR",
|
|
11066
|
+
"GONDOLIN_VMM",
|
|
11058
11067
|
"LANG",
|
|
11059
11068
|
"LC_ALL",
|
|
11060
11069
|
"LC_CTYPE",
|
|
@@ -12895,7 +12904,11 @@ function buildAgentServer(input) {
|
|
|
12895
12904
|
return { state: "authorized" };
|
|
12896
12905
|
});
|
|
12897
12906
|
app.get("/v1/native/operator", { schema: { hide: true } }, async (request) => {
|
|
12898
|
-
|
|
12907
|
+
const operator = await requireNativeOrigin(requireAuthorizedOrigin, request, oauth);
|
|
12908
|
+
return {
|
|
12909
|
+
operatorConfigured: operator.operatorConfigured(),
|
|
12910
|
+
email: operator.operatorEmail() ?? null
|
|
12911
|
+
};
|
|
12899
12912
|
});
|
|
12900
12913
|
app.get("/v1/operator/teams", { schema: {
|
|
12901
12914
|
operationId: "listAgentServerOperatorTeams",
|
|
@@ -14236,7 +14249,7 @@ async function writeCache(cache) {
|
|
|
14236
14249
|
}
|
|
14237
14250
|
//#endregion
|
|
14238
14251
|
//#region src/version.ts
|
|
14239
|
-
var DAEMON_VERSION = "0.65.
|
|
14252
|
+
var DAEMON_VERSION = "0.65.2";
|
|
14240
14253
|
//#endregion
|
|
14241
14254
|
//#region src/cli.ts
|
|
14242
14255
|
async function runAgentDaemonCli(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@themoltnet/agent-daemon",
|
|
3
|
-
"version": "0.65.
|
|
3
|
+
"version": "0.65.2",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Universal MoltNet agent daemon host with a built-in Pi/Gondolin runtime and support for trusted operator-owned runtime modules. CLI: moltnet-agent.",
|
|
@@ -98,16 +98,16 @@
|
|
|
98
98
|
"vite-plugin-dts": "^4.5.4",
|
|
99
99
|
"vitest": "^3.0.0",
|
|
100
100
|
"@moltnet/agent-eval": "0.1.0",
|
|
101
|
-
"@moltnet/api-client": "0.1.0",
|
|
102
101
|
"@moltnet/bootstrap": "0.1.0",
|
|
102
|
+
"@moltnet/api-client": "0.1.0",
|
|
103
103
|
"@moltnet/crypto-service": "0.1.0",
|
|
104
|
+
"@moltnet/execution-integrations": "0.1.0",
|
|
104
105
|
"@moltnet/execution-plan": "0.1.0",
|
|
105
106
|
"@moltnet/loopback-companion": "0.1.0",
|
|
106
107
|
"@moltnet/models": "0.1.0",
|
|
107
|
-
"@moltnet/tasks": "0.1.0",
|
|
108
|
-
"@moltnet/runtime-profiles": "0.1.0",
|
|
109
108
|
"@moltnet/observability": "0.1.0",
|
|
110
|
-
"@moltnet/
|
|
109
|
+
"@moltnet/tasks": "0.1.0",
|
|
110
|
+
"@moltnet/runtime-profiles": "0.1.0"
|
|
111
111
|
},
|
|
112
112
|
"nx": {
|
|
113
113
|
"projectType": "application",
|