@volter/teams 0.2.15 → 0.2.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/teams",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "type": "module",
5
5
  "description": "Volter Teams, the neutral team plane: machine identity and daemon core, the local door and server link, admission from machine grants, product doors, and the Teams server's neutral routes (company RFC 0008).",
6
6
  "license": "MIT",
@@ -143,6 +143,8 @@ export async function agentSessionRoute(ctx){
143
143
  // A session this machine captured is declared its agent's by the machine itself, from the agent its launch named
144
144
  // (the session's environment): the machine's custodian holds the session, so it records the lineage when it manages
145
145
  // the agent, exactly as a declaration through /agents/{id}/sessions does.
146
+ // `main` is the launch's (SUPERCODE_AGENT_MAIN, chosen by the launcher): the custodian may set it through
147
+ // /agents/{id}/sessions already, so the machine acting for its custodian gains no authority by carrying it.
146
148
  if(auth.kind!=='machine'||auth.machine_id!==match[1])fail(403,'forbidden','the owning machine declares its sessions\' agents');
147
149
  const body=await parseJson(req);exact(body,['session','agent','main']);
148
150
  if(typeof body.session!=='string'||typeof body.agent!=='string'||body.main!==undefined&&typeof body.main!=='boolean')fail(400,'invalid_request','session, agent and optional main boolean are required');