@atlaskit/collab-provider 39.1.4 → 39.1.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 39.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 39.1.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [`d4a516b9f1709`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d4a516b9f1709) -
14
+ Gate core presence publication, movement and avatar filtering behind
15
+ agentic_presence_facepile_master_exp while preserving child controls and legacy fallbacks.
16
+
3
17
  ## 39.1.4
4
18
 
5
19
  ### Patch Changes
@@ -11,6 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
11
11
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
14
15
  var _fg = require("@atlaskit/platform-feature-flags/fg");
15
16
  var _disconnectedReasonMapper = require("../disconnected-reason-mapper");
16
17
  var _const = require("../helpers/const");
@@ -157,7 +158,7 @@ var ParticipantsService = exports.ParticipantsService = /*#__PURE__*/function ()
157
158
  var name = (0, _fg.fg)('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 || (_identity$agentName = identity.agentName) === null || _identity$agentName === void 0 ? void 0 : _identity$agentName.trim()) || (existing === null || existing === void 0 ? void 0 : existing.name) || '' : '';
158
159
  var agentNamedId = (0, _fg.fg)('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 || (_identity$agentNamedI = identity.agentNamedId) === null || _identity$agentNamedI === void 0 ? void 0 : _identity$agentNamedI.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentNamedId) : undefined;
159
160
  var wasInactive = existing ? Date.now() - existing.lastActive >= AGENT_PRESENCE_INACTIVE_MS : false;
160
- var participant = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload), (0, _fg.fg)('platform_move_presence_agents') ? {
161
+ var participant = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload), (0, _isExperimentEnabled.isExperimentEnabled)('agentic_presence_facepile_master_exp') && (0, _fg.fg)('platform_move_presence_agents') ? {
161
162
  presenceActivity: 'editor'
162
163
  } : {}), {}, {
163
164
  // `payload.userId` is typed `string | undefined`; here it is always the (string)
@@ -180,7 +181,7 @@ var ParticipantsService = exports.ParticipantsService = /*#__PURE__*/function ()
180
181
 
181
182
  // Active refreshes stay silent. Re-emit when an inactive agent becomes active so consumers
182
183
  // can update its presentation immediately.
183
- if (!existing || hasAgentTypeChanged || existing.name !== name || existing.agentId !== agentId || existing.agentName !== (name || undefined) || existing.agentNamedId !== agentNamedId || (0, _fg.fg)('platform_move_presence_agents') && wasInactive) {
184
+ if (!existing || hasAgentTypeChanged || existing.name !== name || existing.agentId !== agentId || existing.agentName !== (name || undefined) || existing.agentNamedId !== agentNamedId || (0, _isExperimentEnabled.isExperimentEnabled)('agentic_presence_facepile_master_exp') && (0, _fg.fg)('platform_move_presence_agents') && wasInactive) {
184
185
  _this.emitPresence({
185
186
  joined: [participant]
186
187
  }, 'adding agent participant from remote step');
@@ -196,14 +197,14 @@ var ParticipantsService = exports.ParticipantsService = /*#__PURE__*/function ()
196
197
  if (existingTimer !== undefined) {
197
198
  clearTimeout(existingTimer);
198
199
  }
199
- var ttl = (0, _fg.fg)('platform_move_presence_agents') ? AGENT_PRESENCE_TTL_MS : AGENT_PRESENCE_INACTIVE_MS;
200
+ var ttl = (0, _isExperimentEnabled.isExperimentEnabled)('agentic_presence_facepile_master_exp') && (0, _fg.fg)('platform_move_presence_agents') ? AGENT_PRESENCE_TTL_MS : AGENT_PRESENCE_INACTIVE_MS;
200
201
  var delay = Math.max(0, lastActive + ttl - Date.now());
201
202
  _this.agentPresenceTimers.set(sessionId, window.setTimeout(function () {
202
203
  return _this.removeAgentParticipant(sessionId);
203
204
  }, delay));
204
205
  });
205
206
  (0, _defineProperty2.default)(this, "scheduleRemoteAgentExpiry", function (participant) {
206
- if (!(0, _fg.fg)('platform_move_presence_agents') || !(0, _utils.isAIProviderID)(participant.userId) || !Number.isFinite(participant.lastActive)) {
207
+ if (!(0, _utils.isAIProviderID)(participant.userId) || !Number.isFinite(participant.lastActive) || !((0, _isExperimentEnabled.isExperimentEnabled)('agentic_presence_facepile_master_exp') && (0, _fg.fg)('platform_move_presence_agents'))) {
207
208
  return;
208
209
  }
209
210
  _this.resetAgentPresenceTimer(participant.sessionId, participant.lastActive);
@@ -217,7 +218,7 @@ var ParticipantsService = exports.ParticipantsService = /*#__PURE__*/function ()
217
218
  });
218
219
  (0, _defineProperty2.default)(this, "hasAgentBecomeActive", function (previous, current) {
219
220
  var now = Date.now();
220
- return (0, _fg.fg)('platform_move_presence_agents') && (0, _utils.isAIProviderID)(current.userId) && now - previous.lastActive >= AGENT_PRESENCE_INACTIVE_MS && now - current.lastActive < AGENT_PRESENCE_INACTIVE_MS;
221
+ return (0, _utils.isAIProviderID)(current.userId) && (0, _isExperimentEnabled.isExperimentEnabled)('agentic_presence_facepile_master_exp') && (0, _fg.fg)('platform_move_presence_agents') && now - previous.lastActive >= AGENT_PRESENCE_INACTIVE_MS && now - current.lastActive < AGENT_PRESENCE_INACTIVE_MS;
221
222
  });
222
223
  /**
223
224
  * Removes an inactive agent participant once its sliding window elapses and emits the `presence`
@@ -486,7 +487,7 @@ var ParticipantsService = exports.ParticipantsService = /*#__PURE__*/function ()
486
487
  while (1) switch (_context4.prev = _context4.next) {
487
488
  case 0:
488
489
  gatedPayload = _objectSpread(_objectSpread({}, payload), {}, {
489
- agentType: (0, _fg.fg)('platform_move_presence_agents') ? payload.agentType : undefined
490
+ agentType: (0, _isExperimentEnabled.isExperimentEnabled)('agentic_presence_facepile_master_exp') && (0, _fg.fg)('platform_move_presence_agents') ? payload.agentType : undefined
490
491
  });
491
492
  if (!_this.batchProps) {
492
493
  _context4.next = 1;
@@ -546,7 +547,7 @@ var ParticipantsService = exports.ParticipantsService = /*#__PURE__*/function ()
546
547
  }, 'participant leaving');
547
548
  });
548
549
  (0, _defineProperty2.default)(this, "disconnect", function (reason, sessionId) {
549
- var left = (0, _fg.fg)('platform_move_presence_agents') ? [].concat((0, _toConsumableArray2.default)(_this.participantsState.getParticipants()), (0, _toConsumableArray2.default)(_this.participantsState.getAIProviderParticipants())) : _this.participantsState.getParticipants();
550
+ var left = (0, _isExperimentEnabled.isExperimentEnabled)('agentic_presence_facepile_master_exp') && (0, _fg.fg)('platform_move_presence_agents') ? [].concat((0, _toConsumableArray2.default)(_this.participantsState.getParticipants()), (0, _toConsumableArray2.default)(_this.participantsState.getAIProviderParticipants())) : _this.participantsState.getParticipants();
550
551
  _this.participantsState.clear();
551
552
  // Stop any pending agent presence timers so they don't fire against cleared state.
552
553
  _this.clearAgentPresenceTimers();
@@ -836,7 +837,7 @@ var ParticipantsService = exports.ParticipantsService = /*#__PURE__*/function ()
836
837
  // AAID and carrying an `agentType`. These ids come from the editor AI plugin instead,
837
838
  // keyed on the agent's Convo-AI id with no `agentType`, so re-broadcasting them adds a
838
839
  // second, unresolvable participant for an agent that is already present.
839
- if (!(0, _fg.fg)('platform_move_presence_agents')) {
840
+ if (!((0, _isExperimentEnabled.isExperimentEnabled)('agentic_presence_facepile_master_exp') && (0, _fg.fg)('platform_move_presence_agents'))) {
840
841
  _this.sendAIProvidersPresence();
841
842
  }
842
843
  } catch (error) {
@@ -15,6 +15,7 @@ var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
15
15
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _uuid = require("uuid");
18
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
18
19
  var _fg = require("@atlaskit/platform-feature-flags/fg");
19
20
  var _analyticsHelper = _interopRequireDefault(require("../analytics/analytics-helper"));
20
21
  var _performance = require("../analytics/performance");
@@ -667,7 +668,7 @@ var Provider = exports.Provider = /*#__PURE__*/function (_Emitter) {
667
668
  selection: data.selection
668
669
  }), (0, _performance.shouldTelepointerBeSampled)() ? (0, _telepointersHelper.telepointerCallback)(this.config.documentAri) : undefined);
669
670
  } else if ((data === null || data === void 0 ? void 0 : data.type) === 'ai-provider:change') {
670
- if (!(0, _fg.fg)('platform_move_presence_agents')) {
671
+ if (!((0, _isExperimentEnabled.isExperimentEnabled)('agentic_presence_facepile_master_exp') && (0, _fg.fg)('platform_move_presence_agents'))) {
671
672
  this.participantsService.sendAIProviderChanged(_objectSpread(_objectSpread({}, basePayload), data));
672
673
  }
673
674
  } else if ((data === null || data === void 0 ? void 0 : data.type) === 'participant:activity') {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/collab-provider";
8
- var version = exports.version = "39.1.3";
8
+ var version = exports.version = "39.1.5";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -1,4 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
2
3
  import { fg } from '@atlaskit/platform-feature-flags/fg';
3
4
  import { disconnectedReasonMapper } from '../disconnected-reason-mapper';
4
5
  import { EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
@@ -146,7 +147,7 @@ export class ParticipantsService {
146
147
  const wasInactive = existing ? Date.now() - existing.lastActive >= AGENT_PRESENCE_INACTIVE_MS : false;
147
148
  const participant = {
148
149
  ...payload,
149
- ...(fg('platform_move_presence_agents') ? {
150
+ ...(isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') ? {
150
151
  presenceActivity: 'editor'
151
152
  } : {}),
152
153
  // `payload.userId` is typed `string | undefined`; here it is always the (string)
@@ -171,7 +172,7 @@ export class ParticipantsService {
171
172
 
172
173
  // Active refreshes stay silent. Re-emit when an inactive agent becomes active so consumers
173
174
  // can update its presentation immediately.
174
- if (!existing || hasAgentTypeChanged || existing.name !== name || existing.agentId !== agentId || existing.agentName !== (name || undefined) || existing.agentNamedId !== agentNamedId || fg('platform_move_presence_agents') && wasInactive) {
175
+ if (!existing || hasAgentTypeChanged || existing.name !== name || existing.agentId !== agentId || existing.agentName !== (name || undefined) || existing.agentNamedId !== agentNamedId || isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') && wasInactive) {
175
176
  this.emitPresence({
176
177
  joined: [participant]
177
178
  }, 'adding agent participant from remote step');
@@ -187,12 +188,12 @@ export class ParticipantsService {
187
188
  if (existingTimer !== undefined) {
188
189
  clearTimeout(existingTimer);
189
190
  }
190
- const ttl = fg('platform_move_presence_agents') ? AGENT_PRESENCE_TTL_MS : AGENT_PRESENCE_INACTIVE_MS;
191
+ const ttl = isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') ? AGENT_PRESENCE_TTL_MS : AGENT_PRESENCE_INACTIVE_MS;
191
192
  const delay = Math.max(0, lastActive + ttl - Date.now());
192
193
  this.agentPresenceTimers.set(sessionId, window.setTimeout(() => this.removeAgentParticipant(sessionId), delay));
193
194
  });
194
195
  _defineProperty(this, "scheduleRemoteAgentExpiry", participant => {
195
- if (!fg('platform_move_presence_agents') || !isAIProviderID(participant.userId) || !Number.isFinite(participant.lastActive)) {
196
+ if (!isAIProviderID(participant.userId) || !Number.isFinite(participant.lastActive) || !(isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents'))) {
196
197
  return;
197
198
  }
198
199
  this.resetAgentPresenceTimer(participant.sessionId, participant.lastActive);
@@ -206,7 +207,7 @@ export class ParticipantsService {
206
207
  });
207
208
  _defineProperty(this, "hasAgentBecomeActive", (previous, current) => {
208
209
  const now = Date.now();
209
- return fg('platform_move_presence_agents') && isAIProviderID(current.userId) && now - previous.lastActive >= AGENT_PRESENCE_INACTIVE_MS && now - current.lastActive < AGENT_PRESENCE_INACTIVE_MS;
210
+ return isAIProviderID(current.userId) && isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') && now - previous.lastActive >= AGENT_PRESENCE_INACTIVE_MS && now - current.lastActive < AGENT_PRESENCE_INACTIVE_MS;
210
211
  });
211
212
  /**
212
213
  * Removes an inactive agent participant once its sliding window elapses and emits the `presence`
@@ -412,7 +413,7 @@ export class ParticipantsService {
412
413
  _defineProperty(this, "onParticipantUpdated", async payload => {
413
414
  const gatedPayload = {
414
415
  ...payload,
415
- agentType: fg('platform_move_presence_agents') ? payload.agentType : undefined
416
+ agentType: isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') ? payload.agentType : undefined
416
417
  };
417
418
  if (this.batchProps) {
418
419
  this.updateParticipantLazy(gatedPayload);
@@ -456,7 +457,7 @@ export class ParticipantsService {
456
457
  }, 'participant leaving');
457
458
  });
458
459
  _defineProperty(this, "disconnect", (reason, sessionId) => {
459
- const left = fg('platform_move_presence_agents') ? [...this.participantsState.getParticipants(), ...this.participantsState.getAIProviderParticipants()] : this.participantsState.getParticipants();
460
+ const left = isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') ? [...this.participantsState.getParticipants(), ...this.participantsState.getAIProviderParticipants()] : this.participantsState.getParticipants();
460
461
  this.participantsState.clear();
461
462
  // Stop any pending agent presence timers so they don't fire against cleared state.
462
463
  this.clearAgentPresenceTimers();
@@ -677,7 +678,7 @@ export class ParticipantsService {
677
678
  // AAID and carrying an `agentType`. These ids come from the editor AI plugin instead,
678
679
  // keyed on the agent's Convo-AI id with no `agentType`, so re-broadcasting them adds a
679
680
  // second, unresolvable participant for an agent that is already present.
680
- if (!fg('platform_move_presence_agents')) {
681
+ if (!(isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents'))) {
681
682
  this.sendAIProvidersPresence();
682
683
  }
683
684
  } catch (error) {
@@ -1,6 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
3
  import { v4 as uuidv4 } from 'uuid';
4
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
4
5
  import { fg } from '@atlaskit/platform-feature-flags/fg';
5
6
  import AnalyticsHelper from '../analytics/analytics-helper';
6
7
  import { shouldTelepointerBeSampled } from '../analytics/performance';
@@ -570,7 +571,7 @@ export class Provider extends Emitter {
570
571
  selection: data.selection
571
572
  }, shouldTelepointerBeSampled() ? telepointerCallback(this.config.documentAri) : undefined);
572
573
  } else if ((data === null || data === void 0 ? void 0 : data.type) === 'ai-provider:change') {
573
- if (!fg('platform_move_presence_agents')) {
574
+ if (!(isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents'))) {
574
575
  this.participantsService.sendAIProviderChanged({
575
576
  ...basePayload,
576
577
  ...data
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "39.1.3";
2
+ export const version = "39.1.5";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -6,6 +6,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
6
6
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
7
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8
8
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
9
10
  import { fg } from '@atlaskit/platform-feature-flags/fg';
10
11
  import { disconnectedReasonMapper } from '../disconnected-reason-mapper';
11
12
  import { EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
@@ -150,7 +151,7 @@ export var ParticipantsService = /*#__PURE__*/function () {
150
151
  var name = fg('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 || (_identity$agentName = identity.agentName) === null || _identity$agentName === void 0 ? void 0 : _identity$agentName.trim()) || (existing === null || existing === void 0 ? void 0 : existing.name) || '' : '';
151
152
  var agentNamedId = fg('confluence_ncs_step_diffing_version_history') ? (identity === null || identity === void 0 || (_identity$agentNamedI = identity.agentNamedId) === null || _identity$agentNamedI === void 0 ? void 0 : _identity$agentNamedI.trim()) || (existing === null || existing === void 0 ? void 0 : existing.agentNamedId) : undefined;
152
153
  var wasInactive = existing ? Date.now() - existing.lastActive >= AGENT_PRESENCE_INACTIVE_MS : false;
153
- var participant = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload), fg('platform_move_presence_agents') ? {
154
+ var participant = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload), isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') ? {
154
155
  presenceActivity: 'editor'
155
156
  } : {}), {}, {
156
157
  // `payload.userId` is typed `string | undefined`; here it is always the (string)
@@ -173,7 +174,7 @@ export var ParticipantsService = /*#__PURE__*/function () {
173
174
 
174
175
  // Active refreshes stay silent. Re-emit when an inactive agent becomes active so consumers
175
176
  // can update its presentation immediately.
176
- if (!existing || hasAgentTypeChanged || existing.name !== name || existing.agentId !== agentId || existing.agentName !== (name || undefined) || existing.agentNamedId !== agentNamedId || fg('platform_move_presence_agents') && wasInactive) {
177
+ if (!existing || hasAgentTypeChanged || existing.name !== name || existing.agentId !== agentId || existing.agentName !== (name || undefined) || existing.agentNamedId !== agentNamedId || isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') && wasInactive) {
177
178
  _this.emitPresence({
178
179
  joined: [participant]
179
180
  }, 'adding agent participant from remote step');
@@ -189,14 +190,14 @@ export var ParticipantsService = /*#__PURE__*/function () {
189
190
  if (existingTimer !== undefined) {
190
191
  clearTimeout(existingTimer);
191
192
  }
192
- var ttl = fg('platform_move_presence_agents') ? AGENT_PRESENCE_TTL_MS : AGENT_PRESENCE_INACTIVE_MS;
193
+ var ttl = isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') ? AGENT_PRESENCE_TTL_MS : AGENT_PRESENCE_INACTIVE_MS;
193
194
  var delay = Math.max(0, lastActive + ttl - Date.now());
194
195
  _this.agentPresenceTimers.set(sessionId, window.setTimeout(function () {
195
196
  return _this.removeAgentParticipant(sessionId);
196
197
  }, delay));
197
198
  });
198
199
  _defineProperty(this, "scheduleRemoteAgentExpiry", function (participant) {
199
- if (!fg('platform_move_presence_agents') || !isAIProviderID(participant.userId) || !Number.isFinite(participant.lastActive)) {
200
+ if (!isAIProviderID(participant.userId) || !Number.isFinite(participant.lastActive) || !(isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents'))) {
200
201
  return;
201
202
  }
202
203
  _this.resetAgentPresenceTimer(participant.sessionId, participant.lastActive);
@@ -210,7 +211,7 @@ export var ParticipantsService = /*#__PURE__*/function () {
210
211
  });
211
212
  _defineProperty(this, "hasAgentBecomeActive", function (previous, current) {
212
213
  var now = Date.now();
213
- return fg('platform_move_presence_agents') && isAIProviderID(current.userId) && now - previous.lastActive >= AGENT_PRESENCE_INACTIVE_MS && now - current.lastActive < AGENT_PRESENCE_INACTIVE_MS;
214
+ return isAIProviderID(current.userId) && isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') && now - previous.lastActive >= AGENT_PRESENCE_INACTIVE_MS && now - current.lastActive < AGENT_PRESENCE_INACTIVE_MS;
214
215
  });
215
216
  /**
216
217
  * Removes an inactive agent participant once its sliding window elapses and emits the `presence`
@@ -479,7 +480,7 @@ export var ParticipantsService = /*#__PURE__*/function () {
479
480
  while (1) switch (_context4.prev = _context4.next) {
480
481
  case 0:
481
482
  gatedPayload = _objectSpread(_objectSpread({}, payload), {}, {
482
- agentType: fg('platform_move_presence_agents') ? payload.agentType : undefined
483
+ agentType: isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') ? payload.agentType : undefined
483
484
  });
484
485
  if (!_this.batchProps) {
485
486
  _context4.next = 1;
@@ -539,7 +540,7 @@ export var ParticipantsService = /*#__PURE__*/function () {
539
540
  }, 'participant leaving');
540
541
  });
541
542
  _defineProperty(this, "disconnect", function (reason, sessionId) {
542
- var left = fg('platform_move_presence_agents') ? [].concat(_toConsumableArray(_this.participantsState.getParticipants()), _toConsumableArray(_this.participantsState.getAIProviderParticipants())) : _this.participantsState.getParticipants();
543
+ var left = isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents') ? [].concat(_toConsumableArray(_this.participantsState.getParticipants()), _toConsumableArray(_this.participantsState.getAIProviderParticipants())) : _this.participantsState.getParticipants();
543
544
  _this.participantsState.clear();
544
545
  // Stop any pending agent presence timers so they don't fire against cleared state.
545
546
  _this.clearAgentPresenceTimers();
@@ -829,7 +830,7 @@ export var ParticipantsService = /*#__PURE__*/function () {
829
830
  // AAID and carrying an `agentType`. These ids come from the editor AI plugin instead,
830
831
  // keyed on the agent's Convo-AI id with no `agentType`, so re-broadcasting them adds a
831
832
  // second, unresolvable participant for an agent that is already present.
832
- if (!fg('platform_move_presence_agents')) {
833
+ if (!(isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents'))) {
833
834
  _this.sendAIProvidersPresence();
834
835
  }
835
836
  } catch (error) {
@@ -14,6 +14,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
14
14
  function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
15
15
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
16
16
  import { v4 as uuidv4 } from 'uuid';
17
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
17
18
  import { fg } from '@atlaskit/platform-feature-flags/fg';
18
19
  import AnalyticsHelper from '../analytics/analytics-helper';
19
20
  import { shouldTelepointerBeSampled } from '../analytics/performance';
@@ -661,7 +662,7 @@ export var Provider = /*#__PURE__*/function (_Emitter) {
661
662
  selection: data.selection
662
663
  }), shouldTelepointerBeSampled() ? telepointerCallback(this.config.documentAri) : undefined);
663
664
  } else if ((data === null || data === void 0 ? void 0 : data.type) === 'ai-provider:change') {
664
- if (!fg('platform_move_presence_agents')) {
665
+ if (!(isExperimentEnabled('agentic_presence_facepile_master_exp') && fg('platform_move_presence_agents'))) {
665
666
  this.participantsService.sendAIProviderChanged(_objectSpread(_objectSpread({}, basePayload), data));
666
667
  }
667
668
  } else if ((data === null || data === void 0 ? void 0 : data.type) === 'participant:activity') {
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "39.1.3";
2
+ export var version = "39.1.5";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "39.1.4",
3
+ "version": "39.1.6",
4
4
  "description": "A provider for collaborative editing.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,7 +30,7 @@
30
30
  "@atlaskit/platform-feature-flags": "^2.2.0",
31
31
  "@atlaskit/prosemirror-collab": "^1.1.0",
32
32
  "@atlaskit/react-ufo": "^8.4.0",
33
- "@atlaskit/tmp-editor-statsig": "^254.0.0",
33
+ "@atlaskit/tmp-editor-statsig": "^255.0.0",
34
34
  "@atlaskit/ufo": "^2.0.0",
35
35
  "@atlaskit/util-service-support": "^7.4.0",
36
36
  "@babel/runtime": "^7.0.0",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@atlaskit/adf-schema": "^57.7.0",
46
- "@atlaskit/editor-common": "^134.7.0",
46
+ "@atlaskit/editor-common": "^134.8.0",
47
47
  "@atlaskit/editor-test-helpers": "workspace:^",
48
48
  "@atlassian/a11y-jest-testing": "^0.17.0",
49
49
  "@atlassian/experiment-test-utils": "^0.2.0",
@@ -73,6 +73,6 @@
73
73
  }
74
74
  },
75
75
  "peerDependencies": {
76
- "@atlaskit/editor-common": "^134.7.0"
76
+ "@atlaskit/editor-common": "^134.8.0"
77
77
  }
78
78
  }