@bivy/bivy 0.18.6-staging.3 → 0.18.7-staging.1

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.
@@ -208,8 +208,10 @@ export class AppRegistry extends EventEmitter {
208
208
  this.views.set(entry.view.id, entry);
209
209
  this.persisted.set(app.id, { sessionId, workspace, manifest: structuredClone(input), id: app.id, viewIds: app.views.map((v) => v.id), createdAt: app.createdAt, ...(app.reviewMode ? { reviewMode: app.reviewMode } : {}), ...(app.agentNotes ? { agentNotes: true } : {}) });
210
210
  this.persistNotes(app.id);
211
- if (!restore)
211
+ if (!restore) {
212
212
  this.save();
213
+ this.emit("published", app.id);
214
+ }
213
215
  return structuredClone(app);
214
216
  }
215
217
  list(sessionId) {
package/dist/server.js CHANGED
@@ -1938,6 +1938,8 @@ const appService = new AppService(appRegistry, appGateway ?? remotePreview, {
1938
1938
  // the owner gets one push per burst of notes on a view ("2 notes on
1939
1939
  // Storefront"), which opens the Apps sheet at that app. Counts, names and IDs
1940
1940
  // only: the note text never goes through push.
1941
+ // The session advert carries published app IDs (operator reporting only).
1942
+ appRegistry.on("published", () => scheduleAdvertise());
1941
1943
  const NOTES_NOTIFY_MS = 20_000;
1942
1944
  const noteBursts = new Map();
1943
1945
  appRegistry.on("notes", (viewId) => {
@@ -4169,7 +4171,7 @@ async function advertiseSessions() {
4169
4171
  await fetch(`${sessionAdvertiseTarget.controlPlaneUrl.replace(/\/$/, "")}/node/sessions`, {
4170
4172
  method: "POST",
4171
4173
  headers: { "content-type": "application/json", authorization: `Bearer ${sessionAdvertiseTarget.enrollmentToken}` },
4172
- body: JSON.stringify({ sessions }),
4174
+ body: JSON.stringify({ sessions, apps: appRegistry.list().map((app) => app.id) }),
4173
4175
  });
4174
4176
  }
4175
4177
  catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bivy/bivy",
3
- "version": "0.18.6-staging.3",
3
+ "version": "0.18.7-staging.1",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "Run coding agents on machines you own. Open-source, self-hostable agent workspace.",