@volter/supercode-orchestrator 0.4.144 → 0.4.145

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 CHANGED
@@ -299,25 +299,13 @@ platforms:
299
299
  host: 127.0.0.1
300
300
  port: 8090
301
301
  key: ${API_SERVER_KEY}
302
- rh2: # -> adapters/rh2.mjs: Runhuman Room conversations as a channel
303
- enabled: true
304
- token: ${RH2_SESSION_TOKEN} # the bot principal's automation session; a reference loads as a
305
- # credential only at the block's top level or under extra:
306
- extra:
307
- api_url: https://pilot.runhuman.com
308
- organization: peakhealth
309
- principal_id: prn_… # the bot's own principal (is_me, mentions)
310
302
  ```
311
303
 
312
- **The RH2 adapter** (`adapters/rh2.mjs`) holds an RH2 session, follows every active Room the bot is
313
- a member of (or `extra.rooms`), polls each conversation it may read (`GET …/messages?after=`), turns
314
- a person's line (`kind: human`, or a trigger's `automation`) into an `inbound` on the key
315
- `{platform: rh2, kind: channel, chat_id: <roomId>/<conversationId>}`, and posts the reply as an
316
- `agent`-kind message authored as the bot. Typing is RH2 conversation presence, tried once and
317
- forgotten if the deployment has no door for it.
318
-
319
- Both blocks show up in `supercode channels list --harness orchestrator` through the reader that was
320
- already there — `configured` by key *presence*, never by reading a value.
304
+ RH2 integration attaches through an admin-consented app installation. A hand-written
305
+ `platforms: rh2` block grants no integration authority and the runtime reports it as
306
+ unsupported. The reusable RH2 transport remains in `adapters/rh2.mjs`; the Room-chat
307
+ module supplies its app-owned settings and credentials when that module is installed.
308
+ Native Hermes channel configuration remains the worker's configuration.
321
309
 
322
310
  **The Chat SDK sidecar** mounts `chat@4.39.0` (npm package `chat`, repo `vercel/chat`; a
323
311
  devDependency of this package, installed alongside `@chat-adapter/state-memory@4.39.0`). The
package/adapters/rh2.mjs CHANGED
@@ -16,19 +16,9 @@
16
16
  // PATCH /rooms/:room/conversations/:c/messages/:id {body} — a streamed reply grows, a progress line updates, by edit
17
17
  // POST /rooms/:room/conversations/:c/presence {state: "typing"} — best effort, forgotten on 404
18
18
  //
19
- // The block:
20
- // platforms:
21
- // rh2:
22
- // enabled: true
23
- // token: ${RH2_SESSION_TOKEN} # the bot principal's session (loads as credentials.token;
24
- // # a nested `credentials:` block is not read as one)
25
- // extra:
26
- // api_url: https://pilot.runhuman.com # or the boundary's RH2 route
27
- // organization: peakhealth
28
- // headers: '{"x-twins-key":"…"}' # optional extra request headers (JSON)
29
- // rooms: room_a,room_b # optional; default every active Room the bot is in
30
- // principal_id: prn_… # the bot's own principal (is_me / mentions)
31
- // poll_seconds: 2
19
+ // This is reusable transport code. The daemon does not attach it from a
20
+ // platforms block; an installed integration module owns its settings and token.
21
+ // See docs/adr/0006-teams-installable-apps.md (C1) and the Room-chat module (M4).
32
22
  //
33
23
  // The surface key is `{platform: 'rh2', kind: 'channel', chat_id: '<roomId>'}`: a Room is one surface, so the agent it
34
24
  // seats is one session however many of the Room's conversations it takes part in. A line wakes it where RH2 says the bot
package/bin/runtime.mjs CHANGED
@@ -65,7 +65,7 @@ import { hermesAccess } from '../hermes-cli.mjs';
65
65
 
66
66
  import {
67
67
  load, save, refreshVault, step, importFrom, exportTo, closeWorld, Orchestrator, LoopbackAdapter,
68
- ChatSdkAdapter, ApiServerAdapter, Rh2Adapter,
68
+ ChatSdkAdapter, ApiServerAdapter,
69
69
  TICK_MS, accessPolicy, applyOperator, performRemoveProfileDir, OPERATOR_OPS,
70
70
  } from '../index.mjs';
71
71
  import * as events from '../events.mjs';
@@ -86,7 +86,6 @@ const ADAPTERS = {
86
86
  loopback: (platform, profile) => new LoopbackAdapter({ platform, profile }),
87
87
  'chat-sdk': (platform, profile, ctx) => new ChatSdkAdapter({ platform, profile, profileDir: ctx.state.profiles[profile]?.dir ?? null, channel: ctx.channel, vault: ctx.vault, log: ctx.log }),
88
88
  api_server: (platform, profile, ctx) => new ApiServerAdapter({ platform, profile, channel: ctx.channel, vault: ctx.vault, state: ctx.state, log: ctx.log }),
89
- rh2: (platform, profile, ctx) => new Rh2Adapter({ platform, profile, channel: ctx.channel, vault: ctx.vault, refreshVault: () => refreshVault(ctx.state, ctx.vault), log: ctx.log }),
90
89
  };
91
90
 
92
91
  /// The selector a `platforms:` block resolves through: its `extra.adapter`
@@ -341,6 +340,7 @@ function buildAdapters(state, vault = new Map(), log = () => {}) {
341
340
  continue;
342
341
  }
343
342
  const selector = adapterSelector(platform, channel);
343
+ if(selector==='rh2'){report.push({platform,profile:profileName,state:'unsupported (RH2 integration requires an installed app; a platforms block grants no integration authority)'});continue;}
344
344
  const make = ADAPTERS[selector];
345
345
  if (!make) {
346
346
  report.push({ platform, profile: profileName, state: `unsupported (no adapter \`${selector}\` for this platform yet)` });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-orchestrator",
3
- "version": "0.4.144",
3
+ "version": "0.4.145",
4
4
  "type": "module",
5
5
  "description": "The orchestrator runtime over the Volter Harness ontology: one typed operational model whose folder is its serialization, read and written through the harness orchestration doors (docs/ORCHESTRATOR-IR.md)",
6
6
  "exports": {