@volter/supercode-orchestrator 0.4.143 → 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 +5 -17
- package/adapters/rh2.mjs +3 -13
- package/bin/runtime.mjs +2 -2
- package/board/ci.mjs +9 -2
- package/package.json +1 -1
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
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
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
|
|
20
|
-
//
|
|
21
|
-
//
|
|
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,
|
|
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/board/ci.mjs
CHANGED
|
@@ -98,14 +98,21 @@ export function observeCompletionEvidence(board, id, entry, payload = {}) {
|
|
|
98
98
|
// need a successful native deployment containing this task's native changes.
|
|
99
99
|
// Retain each artifact's actual SHA, rather than calling the SDK run a native release.
|
|
100
100
|
state.coverage = [];
|
|
101
|
-
|
|
101
|
+
const deployments = new Map();
|
|
102
102
|
for (const rule of matchedRules) {
|
|
103
103
|
if (rule.workflows.includes(receipt.workflowName)) continue;
|
|
104
|
-
|
|
104
|
+
for (const workflow of rule.workflows) {
|
|
105
|
+
if (!deployments.has(workflow)) deployments.set(workflow, JSON.parse(run('gh', ['run', 'list', '--repo', repo, '--workflow', workflow, '--limit', '100', '--json', 'databaseId,workflowName,headSha,status,conclusion,url'], path)));
|
|
106
|
+
}
|
|
107
|
+
const successful = rule.workflows.flatMap(workflow => deployments.get(workflow)).filter(row => row.status === 'completed' && row.conclusion === 'success');
|
|
105
108
|
const covering = successful.find(row => {
|
|
106
109
|
if (!rule.workflows.includes(row.workflowName) || !configured.includes(row.workflowName)) return false;
|
|
107
110
|
try {
|
|
108
111
|
run('git', ['merge-base', '--is-ancestor', rule.changed_at, row.headSha], path);
|
|
112
|
+
try {
|
|
113
|
+
run('git', ['merge-base', '--is-ancestor', commit, row.headSha], path);
|
|
114
|
+
return true;
|
|
115
|
+
} catch {}
|
|
109
116
|
run('git', ['merge-base', '--is-ancestor', row.headSha, commit], path);
|
|
110
117
|
// Any later change in these paths requires another native deployment,
|
|
111
118
|
// even when a different task authored that change.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-orchestrator",
|
|
3
|
-
"version": "0.4.
|
|
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": {
|