@volter/supercode-teams 0.2.124 → 0.2.126
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/README.md +8 -0
- package/bin/workspace.mjs +12 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,3 +132,11 @@ enrollments).
|
|
|
132
132
|
|
|
133
133
|
`limits.json` is read when the daemon starts: `maxAttachmentsPerPrincipal` (16),
|
|
134
134
|
`protocolFloor` (2), `logRotateBytes` (16 MiB), `logKeep` (8).
|
|
135
|
+
|
|
136
|
+
### RH2 agent DMs
|
|
137
|
+
|
|
138
|
+
Share a session as its RH2 agent with `supercode teams sessions bind REF --room ROOM --agent PRINCIPAL --rh2 ORIGIN`.
|
|
139
|
+
Only the session custodian can grant this binding. The returned `session` can be passed to RH2’s room-member door;
|
|
140
|
+
no session-backed channel is created. The agent DM uses the exact resource `${ROOM}:dm:${PRINCIPAL}`.
|
|
141
|
+
`unbind` accepts the same flags. `--conversation` remains available for existing grants; it is mutually exclusive
|
|
142
|
+
with `--agent`. Opening a DM reads the existing session; sending a turn is a separate action.
|
package/bin/workspace.mjs
CHANGED
|
@@ -307,11 +307,11 @@ async function sessionsCommand(sub, command) {
|
|
|
307
307
|
// A session view (RH2 ADR 0008): its owner lets a workplace Room's Conversation read this session with the tokens that
|
|
308
308
|
// workplace signs. `bind` records it and prints what the workplace's own bind door takes; `unbind` removes it.
|
|
309
309
|
if (sub === 'bind' || sub === 'unbind') {
|
|
310
|
-
only(flags, ['json', 'help', 'context', 'room', 'conversation', 'rh2']); requireArgs(rest, 1, 1, `sessions ${sub} REF --room ROOM --
|
|
311
|
-
if (!flags.room || !flags.conversation || !flags.rh2) usage(`sessions ${sub} needs --room, --conversation and --rh2 (the workplace's origin)`);
|
|
312
|
-
const body = { issuer: new URL(String(flags.rh2)).origin, room: String(flags.room), conversation: String(flags.conversation) };
|
|
310
|
+
only(flags, ['json', 'help', 'context', 'room', 'agent', 'conversation', 'rh2']); requireArgs(rest, 1, 1, `sessions ${sub} REF --room ROOM --agent PRINCIPAL --rh2 ORIGIN`);
|
|
311
|
+
if (!flags.room || (!flags.agent && !flags.conversation) || (flags.agent && flags.conversation) || !flags.rh2) usage(`sessions ${sub} needs --room, --agent (or a legacy --conversation), and --rh2 (the workplace's origin)`);
|
|
312
|
+
const body = { issuer: new URL(String(flags.rh2)).origin, room: String(flags.room), conversation: flags.agent ? `${flags.room}:dm:${flags.agent}` : String(flags.conversation) };
|
|
313
313
|
const bound = await command.client.request(sub === 'bind' ? 'POST' : 'DELETE', `${session.path}/view-bindings`, { body });
|
|
314
|
-
return output({ version: 1, context: scope(context), data: { teamsUrl: new URL(context.origin).origin, team: context.team_id, sessionId: bound.data.session_id, harness: bound.data.harness, principalId: context.principal_id, bindings: bound.data.bindings } });
|
|
314
|
+
return output({ version: 1, context: scope(context), data: { teamsUrl: new URL(context.origin).origin, team: context.team_id, sessionId: bound.data.session_id, harness: bound.data.harness, principalId: context.principal_id, ...(flags.agent ? { agentPrincipalId: String(flags.agent), session: { agentPrincipalId: String(flags.agent), teamsUrl: new URL(context.origin).origin, team: context.team_id, sessionId: bound.data.session_id, harness: bound.data.harness } } : {}), bindings: bound.data.bindings } });
|
|
315
315
|
}
|
|
316
316
|
if (sub === 'rename') { only(flags, ['json', 'help', 'context']); requireArgs(rest, 2, 2, 'sessions rename REF TITLE'); const descriptor = await session.descriptor(); return output(await command.client.request('PATCH', session.path, { body: { title: rest[1] }, ifMatch: descriptor.data.revision })); }
|
|
317
317
|
if (sub === 'delete') { only(flags, ['json', 'help', 'context']); requireArgs(rest, 1, 1, 'sessions delete REF'); const descriptor = await session.descriptor(); await command.client.request('DELETE', session.path, { ifMatch: descriptor.data.revision }); return output({ version: 1, context: scope(context), data: null }); }
|
|
@@ -701,7 +701,14 @@ async function connectorCommand(verb, { flags, rest, output, client, context, te
|
|
|
701
701
|
if (!serviceBin) unsupported('--install requires invocation through the native supercode CLI');
|
|
702
702
|
const serviceEnv = { ...process.env, SUPERCODE_TEAMS_ENTRY: fileURLToPath(new URL('./teams.mjs', import.meta.url)) };
|
|
703
703
|
// Refuse source-backed installs before Windows stops the running connector.
|
|
704
|
-
|
|
704
|
+
try {
|
|
705
|
+
execFileSync(serviceBin, ['__teams-connector-service', 'validate', contextName, path, context.server_id, context.team_id], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'], env: serviceEnv });
|
|
706
|
+
} catch (error) {
|
|
707
|
+
// In particular, an older native CLI may not have the validation door.
|
|
708
|
+
// Its support-report child must not keep a refused Windows install alive.
|
|
709
|
+
await core.close();
|
|
710
|
+
throw error;
|
|
711
|
+
}
|
|
705
712
|
// Ending a Windows task ends only the console host it started, never the connector under it, so the task
|
|
706
713
|
// would refuse its new run while the old connector went on: the running one is asked to stop first.
|
|
707
714
|
if (process.platform === 'win32') await stopRunningConnector(saved);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-teams",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.126",
|
|
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",
|