@cfio/cohort-sync 0.31.8 → 0.31.10

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/dist/index.js CHANGED
@@ -13730,11 +13730,15 @@ function dumpEvent(event) {
13730
13730
  function positiveNumber(value) {
13731
13731
  return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : void 0;
13732
13732
  }
13733
- var PLUGIN_VERSION = true ? "0.31.8" : "unknown";
13733
+ var PLUGIN_VERSION = true ? "0.31.10" : "unknown";
13734
13734
  function resolveGatewayToken(api) {
13735
13735
  const token2 = api.config?.gateway?.auth?.token;
13736
13736
  return typeof token2 === "string" ? token2 : null;
13737
13737
  }
13738
+ function resolveHooksToken(api) {
13739
+ const token2 = api.config?.hooks?.token;
13740
+ return typeof token2 === "string" ? token2 : null;
13741
+ }
13738
13742
  function registerCronEventHandlers(client2, cfg, resolveAgentName, cronTimestampTracker, logger) {
13739
13743
  if (client2.availableEvents.has("cron")) {
13740
13744
  let debounceTimer = null;
@@ -13918,6 +13922,7 @@ async function handleGatewayStart(event, state) {
13918
13922
  logger.debug("cohort-sync: gateway start: bridge after seed", { bridge: Object.fromEntries(getChannelAgentBridge()) });
13919
13923
  state.gatewayPort = event.port;
13920
13924
  const token2 = resolveGatewayToken(api);
13925
+ const hooksToken = resolveHooksToken(api);
13921
13926
  if (token2) {
13922
13927
  state.gatewayToken = token2;
13923
13928
  logger.debug("cohort-sync: gateway client connecting", { port: event.port, hasToken: true });
@@ -13935,7 +13940,7 @@ async function handleGatewayStart(event, state) {
13935
13940
  state.resolveAgentName,
13936
13941
  state.persistentGwClient,
13937
13942
  state.cronTimestampTracker,
13938
- { port: state.gatewayPort, hooksToken: state.gatewayToken }
13943
+ { port: state.gatewayPort, hooksToken }
13939
13944
  );
13940
13945
  state.commandUnsubscriber = unsub;
13941
13946
  } catch (err) {
@@ -13988,7 +13993,7 @@ async function handleGatewayStart(event, state) {
13988
13993
  await startNotificationSubscription(
13989
13994
  event.port,
13990
13995
  cfg,
13991
- api.config.hooks?.token,
13996
+ hooksToken ?? void 0,
13992
13997
  logger,
13993
13998
  state.persistentGwClient,
13994
13999
  resolvedNameMap
@@ -14580,6 +14585,7 @@ function initializeHookState(api, cfg) {
14580
14585
  });
14581
14586
  const gatewayPort = api.config?.gateway?.port ?? null;
14582
14587
  const gatewayToken = resolveGatewayToken(api);
14588
+ const hooksToken = resolveHooksToken(api);
14583
14589
  const cronTimestampTracker = new CronTimestampTracker();
14584
14590
  const cronRunStarts = /* @__PURE__ */ new Map();
14585
14591
  let persistentGwClient = null;
@@ -14595,7 +14601,7 @@ function initializeHookState(api, cfg) {
14595
14601
  resolveAgentName,
14596
14602
  persistentGwClient,
14597
14603
  cronTimestampTracker,
14598
- { port: gatewayPort, hooksToken: gatewayToken }
14604
+ { port: gatewayPort, hooksToken }
14599
14605
  );
14600
14606
  setToolRuntime({
14601
14607
  apiKey: cfg.apiKey,
@@ -12,6 +12,8 @@
12
12
  "tools": [
13
13
  "cohort_comment",
14
14
  "cohort_context",
15
+ "cohort_briefing_context",
16
+ "cohort_briefing",
15
17
  "cohort_task",
16
18
  "cohort_transition",
17
19
  "cohort_assign"
@@ -72,5 +74,5 @@
72
74
  }
73
75
  }
74
76
  },
75
- "version": "0.31.8"
77
+ "version": "0.31.10"
76
78
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfio/cohort-sync",
3
- "version": "0.31.8",
3
+ "version": "0.31.10",
4
4
  "description": "OpenClaw plugin — syncs agent telemetry, sessions, and activity to the Cohort dashboard",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -10,6 +10,8 @@
10
10
  "tools": [
11
11
  "cohort_comment",
12
12
  "cohort_context",
13
+ "cohort_briefing_context",
14
+ "cohort_briefing",
13
15
  "cohort_task",
14
16
  "cohort_transition",
15
17
  "cohort_assign"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfio/cohort-sync",
3
- "version": "0.31.8",
3
+ "version": "0.31.10",
4
4
  "description": "OpenClaw plugin — syncs agent telemetry, sessions, and activity to the Cohort dashboard",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.cohort.bot/gateway",