@volter/supercode-teams 0.3.121 → 0.3.122

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
@@ -187,7 +187,12 @@ async function main() {
187
187
  process.on('SIGTERM', stop);
188
188
  return;
189
189
  }
190
- if (sub === 'status') { out(readJson(p.machine, { running: false })); return; }
190
+ if (sub === 'status') {
191
+ // and every supercode process here still running a release an install replaced (t_8e109edc)
192
+ let stale_releases = null;
193
+ try { stale_releases = await (await import('@volter/supercode-health/drift')).staleSupercode(); } catch { /* not read */ }
194
+ out({ ...readJson(p.machine, { running: false }), stale_releases }); return;
195
+ }
191
196
  // `machine restart [--machine M] [--reason text]`: the daemon (this one, or M's through the server) restarts under its service.
192
197
  if (sub === 'restart') return withNode(async (rpc) => out(await rpc.call('machine.restart', { reason: flags.reason ? String(flags.reason) : null })));
193
198
  die('machine start|status|restart');
package/bin/workspace.mjs CHANGED
@@ -2,9 +2,9 @@
2
2
  import { StringDecoder } from 'node:string_decoder';
3
3
  import { hostname } from 'node:os';
4
4
  import { agentSessionHint } from './workspace/agent-session.mjs';
5
- import { fileURLToPath } from 'node:url';
5
+ import { fileURLToPath, pathToFileURL } from 'node:url';
6
6
  import { existsSync, readFileSync, realpathSync, rmSync } from 'node:fs';
7
- import { basename, join, resolve } from 'node:path';
7
+ import { basename, dirname, join, resolve } from 'node:path';
8
8
  import { execFileSync, spawn } from 'node:child_process';
9
9
  import { createHash } from 'node:crypto';
10
10
  import { SupercodeHarnessClient } from '@volter/supercode-harness-sdk';
@@ -1119,6 +1119,7 @@ async function connectorCommand(verb, { flags, rest, output, client, context, te
1119
1119
  if (!flags.json) {
1120
1120
  process.stdout.write(`Connected ${saved.machine.name} to team ${context.team_name ?? context.team_id}; it stays connected (a ${service.kind ?? 'background'} service).\n`);
1121
1121
  for (const line of service.message_tools ?? []) process.stdout.write(` ${line}\n`);
1122
+ for (const line of await releaseSkills()) process.stdout.write(` ${line}\n`);
1122
1123
  return;
1123
1124
  }
1124
1125
  return output({ version: 1, context: scope(context), data: { machine: saved.machine, source: saved.source, service, ...(addedRule ? { rule: addedRule } : {}) } });
@@ -1486,3 +1487,17 @@ function stampStderr() {
1486
1487
  };
1487
1488
  process.stderr.__stamped = true;
1488
1489
  }
1490
+
1491
+ /**
1492
+ * The skills of the release this Teams package belongs to (`@volter/supercode`'s lib/skills.mjs, the package that
1493
+ * holds it), put into every harness here: a machine connected to a team has agents that know supercode
1494
+ * (t_266912ff). A Teams package run from a checkout or installed alone has no release beside it, and installs none.
1495
+ */
1496
+ async function releaseSkills() {
1497
+ const release = join(dirname(fileURLToPath(import.meta.url)), '..', '..', '..', '..');
1498
+ try {
1499
+ if (JSON.parse(readFileSync(join(release, 'package.json'), 'utf8')).name !== '@volter/supercode') return [];
1500
+ const { installSkills } = await import(pathToFileURL(join(release, 'lib', 'skills.mjs')).href);
1501
+ return installSkills();
1502
+ } catch { return []; }
1503
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-teams",
3
- "version": "0.3.121",
3
+ "version": "0.3.122",
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",