@themoltnet/agent-daemon 0.65.0 → 0.65.1
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 +16 -4
- package/package.json +7 -7
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;
|
|
@@ -12895,7 +12903,11 @@ function buildAgentServer(input) {
|
|
|
12895
12903
|
return { state: "authorized" };
|
|
12896
12904
|
});
|
|
12897
12905
|
app.get("/v1/native/operator", { schema: { hide: true } }, async (request) => {
|
|
12898
|
-
|
|
12906
|
+
const operator = await requireNativeOrigin(requireAuthorizedOrigin, request, oauth);
|
|
12907
|
+
return {
|
|
12908
|
+
operatorConfigured: operator.operatorConfigured(),
|
|
12909
|
+
email: operator.operatorEmail() ?? null
|
|
12910
|
+
};
|
|
12899
12911
|
});
|
|
12900
12912
|
app.get("/v1/operator/teams", { schema: {
|
|
12901
12913
|
operationId: "listAgentServerOperatorTeams",
|
|
@@ -14236,7 +14248,7 @@ async function writeCache(cache) {
|
|
|
14236
14248
|
}
|
|
14237
14249
|
//#endregion
|
|
14238
14250
|
//#region src/version.ts
|
|
14239
|
-
var DAEMON_VERSION = "0.65.
|
|
14251
|
+
var DAEMON_VERSION = "0.65.1";
|
|
14240
14252
|
//#endregion
|
|
14241
14253
|
//#region src/cli.ts
|
|
14242
14254
|
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.1",
|
|
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.",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"typebox": "^1.2.8",
|
|
87
87
|
"@themoltnet/agent-runtime": "1.4.0",
|
|
88
88
|
"@themoltnet/os-keyring": "0.4.0",
|
|
89
|
-
"@themoltnet/
|
|
90
|
-
"@themoltnet/
|
|
89
|
+
"@themoltnet/sdk": "0.146.0",
|
|
90
|
+
"@themoltnet/pi-runtime": "0.18.4"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@fastify/swagger": "^9.6.1",
|
|
@@ -99,15 +99,15 @@
|
|
|
99
99
|
"vitest": "^3.0.0",
|
|
100
100
|
"@moltnet/agent-eval": "0.1.0",
|
|
101
101
|
"@moltnet/api-client": "0.1.0",
|
|
102
|
-
"@moltnet/bootstrap": "0.1.0",
|
|
103
102
|
"@moltnet/crypto-service": "0.1.0",
|
|
103
|
+
"@moltnet/bootstrap": "0.1.0",
|
|
104
104
|
"@moltnet/execution-plan": "0.1.0",
|
|
105
|
+
"@moltnet/execution-integrations": "0.1.0",
|
|
105
106
|
"@moltnet/loopback-companion": "0.1.0",
|
|
107
|
+
"@moltnet/observability": "0.1.0",
|
|
106
108
|
"@moltnet/models": "0.1.0",
|
|
107
|
-
"@moltnet/tasks": "0.1.0",
|
|
108
109
|
"@moltnet/runtime-profiles": "0.1.0",
|
|
109
|
-
"@moltnet/
|
|
110
|
-
"@moltnet/execution-integrations": "0.1.0"
|
|
110
|
+
"@moltnet/tasks": "0.1.0"
|
|
111
111
|
},
|
|
112
112
|
"nx": {
|
|
113
113
|
"projectType": "application",
|