@volter/supercode-teams 0.2.112 → 0.2.113

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/bin/teams.mjs CHANGED
@@ -165,7 +165,7 @@ async function main() {
165
165
  case 'panes': {
166
166
  if (sub === 'ls') return withNode(async (rpc) => out(await rpc.call('panes.list')));
167
167
  if (sub === 'capture') return withNode(async (rpc) => out((await rpc.call('panes.capture', { pane: rest[0], lines: Number(flags.lines ?? 200) })).text));
168
- if (sub === 'close') return withNode(async (rpc) => out(await rpc.call('panes.close', { pane: rest[0], caller: caller() })));
168
+ if (sub === 'close') return withNode(async (rpc) => out(await rpc.call('panes.close', { pane: rest[0] })));
169
169
  die('panes ls|capture|close');
170
170
  }
171
171
  case 'title': {
package/machine.mjs CHANGED
@@ -625,9 +625,9 @@ export class TeamsMachine extends MachineCore {
625
625
  }
626
626
 
627
627
  /**
628
- * A session acts only on the panes it started: input, a turn, a suspend or a close from a session (`caller`, its
628
+ * A session acts only on the panes it started: input, a turn or a suspend from a session (`caller`, its
629
629
  * address) on a pane another session, a board or a person started is refused, naming who started it. A person (no
630
- * caller) and a board (its cards' own door) act on any pane.
630
+ * caller) and a board (its cards' own door) act on any pane. Close is available to any holder of pane control.
631
631
  */
632
632
  /**
633
633
  * Who is calling, for the pane doors. On the local socket the daemon decides: it hands the connection to its own
@@ -1277,7 +1277,7 @@ export class TeamsMachine extends MachineCore {
1277
1277
  }
1278
1278
  const contextKey = params.pane ?? `p_${randomBytes(9).toString('base64url')}`;
1279
1279
  // Who started the pane: the launching session's (or board's) address, null for a person. A session's later
1280
- // input and close on the pane are refused unless it is this one (#refuseForeign).
1280
+ // input on the pane is refused unless it is this one (#refuseForeign); close is not creator-restricted.
1281
1281
  const by = await this.#callerOf(entry, params).catch(() => null);
1282
1282
  // Who to tell when the pane ends (`open --new … --notify-when-ended`): a session's mail address, and this
1283
1283
  // machine's name as the address a notice from its pane comes from.
@@ -1356,8 +1356,7 @@ export class TeamsMachine extends MachineCore {
1356
1356
  return rows;
1357
1357
  }
1358
1358
  case 'panes.close': {
1359
- need(operator ? 'control' : 'control', `pane:${params.pane}`);
1360
- this.#refuseForeign(params.pane, await this.#callerOf(entry, params));
1359
+ need('control', `pane:${params.pane}`);
1361
1360
  const session = await this.#paneByContext(params.pane);
1362
1361
  if (!session) throw new Error(`no pane with context ${params.pane}`);
1363
1362
  await this.host.closeSession(session.id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-teams",
3
- "version": "0.2.112",
3
+ "version": "0.2.113",
4
4
  "type": "module",
5
5
  "description": "A machine daemon serving this machine's doors, and a local or remote Teams server for shared session discovery, OpenTelemetry ingestion and access to enrolled machines.",
6
6
  "license": "MIT",