@badger_badger/badger_hq 1.6.0 → 1.7.0

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.
@@ -1,5 +1,5 @@
1
- import { at as CollectionName, n as AgentMessage, u as AgentSession, J as AnalystProfile, O as AssigneeLoad, R as Assignment, _ as AuditLog, ad as Capture, aF as DataItem, aQ as Database, a_ as Deployment, bO as Mission, dj as Task, bm as HoursLog, cl as ScoutProfile, bY as OrgSettings, ct as ScoutRating, cN as Source, cS as SourceImport, cA as Scraper, cD as ScraperMetric, by as LlmCall } from '../agent-session-oZI9RyQ_.cjs';
2
- export { ab as COLLECTIONS } from '../agent-session-oZI9RyQ_.cjs';
1
+ import { av as CollectionName, n as AgentMessage, u as AgentSession, J as AnalystProfile, P as AssigneeLoad, T as Assignment, a0 as AuditLog, af as Capture, aH as DataItem, aS as Database, b0 as Deployment, bQ as Mission, dj as Task, bo as HoursLog, cm as ScoutProfile, bZ as OrgSettings, cu as ScoutRating, cO as Source, cT as SourceImport, cB as Scraper, cE as ScraperMetric, bA as LlmCall } from '../agent-session-BKq7mARI.cjs';
2
+ export { ad as COLLECTIONS } from '../agent-session-BKq7mARI.cjs';
3
3
  import * as mongoose from 'mongoose';
4
4
  import { Types, IndexDefinition, IndexOptions, Schema, Query, Model, Connection } from 'mongoose';
5
5
  import 'zod';
@@ -2431,6 +2431,7 @@ declare const sourceSchema: Schema<{
2431
2431
  } | undefined;
2432
2432
  lastCollectedAt?: Date | undefined;
2433
2433
  nextVisitAt?: Date | undefined;
2434
+ visitIntervalMs?: number | undefined;
2434
2435
  }, mongoose.Model<{
2435
2436
  type: "channel" | "group" | "profile" | "forum" | "site";
2436
2437
  status: "active" | "paused" | "closed" | "access_problem";
@@ -2461,6 +2462,7 @@ declare const sourceSchema: Schema<{
2461
2462
  } | undefined;
2462
2463
  lastCollectedAt?: Date | undefined;
2463
2464
  nextVisitAt?: Date | undefined;
2465
+ visitIntervalMs?: number | undefined;
2464
2466
  }, any, any, any, mongoose.Document<unknown, any, {
2465
2467
  type: "channel" | "group" | "profile" | "forum" | "site";
2466
2468
  status: "active" | "paused" | "closed" | "access_problem";
@@ -2491,6 +2493,7 @@ declare const sourceSchema: Schema<{
2491
2493
  } | undefined;
2492
2494
  lastCollectedAt?: Date | undefined;
2493
2495
  nextVisitAt?: Date | undefined;
2496
+ visitIntervalMs?: number | undefined;
2494
2497
  }, any, {}> & {
2495
2498
  type: "channel" | "group" | "profile" | "forum" | "site";
2496
2499
  status: "active" | "paused" | "closed" | "access_problem";
@@ -2521,6 +2524,7 @@ declare const sourceSchema: Schema<{
2521
2524
  } | undefined;
2522
2525
  lastCollectedAt?: Date | undefined;
2523
2526
  nextVisitAt?: Date | undefined;
2527
+ visitIntervalMs?: number | undefined;
2524
2528
  } & Required<{
2525
2529
  _id: mongoose.Types.ObjectId;
2526
2530
  }> & {
@@ -2555,6 +2559,7 @@ declare const sourceSchema: Schema<{
2555
2559
  } | undefined;
2556
2560
  lastCollectedAt?: Date | undefined;
2557
2561
  nextVisitAt?: Date | undefined;
2562
+ visitIntervalMs?: number | undefined;
2558
2563
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
2559
2564
  type: "channel" | "group" | "profile" | "forum" | "site";
2560
2565
  status: "active" | "paused" | "closed" | "access_problem";
@@ -2585,6 +2590,7 @@ declare const sourceSchema: Schema<{
2585
2590
  } | undefined;
2586
2591
  lastCollectedAt?: Date | undefined;
2587
2592
  nextVisitAt?: Date | undefined;
2593
+ visitIntervalMs?: number | undefined;
2588
2594
  }>, {}, mongoose.DefaultSchemaOptions> & mongoose.FlatRecord<{
2589
2595
  type: "channel" | "group" | "profile" | "forum" | "site";
2590
2596
  status: "active" | "paused" | "closed" | "access_problem";
@@ -2615,6 +2621,7 @@ declare const sourceSchema: Schema<{
2615
2621
  } | undefined;
2616
2622
  lastCollectedAt?: Date | undefined;
2617
2623
  nextVisitAt?: Date | undefined;
2624
+ visitIntervalMs?: number | undefined;
2618
2625
  }> & Required<{
2619
2626
  _id: mongoose.Types.ObjectId;
2620
2627
  }> & {
@@ -6449,6 +6456,7 @@ declare const SCHEMAS: {
6449
6456
  } | undefined;
6450
6457
  lastCollectedAt?: Date | undefined;
6451
6458
  nextVisitAt?: Date | undefined;
6459
+ visitIntervalMs?: number | undefined;
6452
6460
  }, mongoose.Model<{
6453
6461
  type: "channel" | "group" | "profile" | "forum" | "site";
6454
6462
  status: "active" | "paused" | "closed" | "access_problem";
@@ -6479,6 +6487,7 @@ declare const SCHEMAS: {
6479
6487
  } | undefined;
6480
6488
  lastCollectedAt?: Date | undefined;
6481
6489
  nextVisitAt?: Date | undefined;
6490
+ visitIntervalMs?: number | undefined;
6482
6491
  }, any, any, any, mongoose.Document<unknown, any, {
6483
6492
  type: "channel" | "group" | "profile" | "forum" | "site";
6484
6493
  status: "active" | "paused" | "closed" | "access_problem";
@@ -6509,6 +6518,7 @@ declare const SCHEMAS: {
6509
6518
  } | undefined;
6510
6519
  lastCollectedAt?: Date | undefined;
6511
6520
  nextVisitAt?: Date | undefined;
6521
+ visitIntervalMs?: number | undefined;
6512
6522
  }, any, {}> & {
6513
6523
  type: "channel" | "group" | "profile" | "forum" | "site";
6514
6524
  status: "active" | "paused" | "closed" | "access_problem";
@@ -6539,6 +6549,7 @@ declare const SCHEMAS: {
6539
6549
  } | undefined;
6540
6550
  lastCollectedAt?: Date | undefined;
6541
6551
  nextVisitAt?: Date | undefined;
6552
+ visitIntervalMs?: number | undefined;
6542
6553
  } & Required<{
6543
6554
  _id: mongoose.Types.ObjectId;
6544
6555
  }> & {
@@ -6573,6 +6584,7 @@ declare const SCHEMAS: {
6573
6584
  } | undefined;
6574
6585
  lastCollectedAt?: Date | undefined;
6575
6586
  nextVisitAt?: Date | undefined;
6587
+ visitIntervalMs?: number | undefined;
6576
6588
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
6577
6589
  type: "channel" | "group" | "profile" | "forum" | "site";
6578
6590
  status: "active" | "paused" | "closed" | "access_problem";
@@ -6603,6 +6615,7 @@ declare const SCHEMAS: {
6603
6615
  } | undefined;
6604
6616
  lastCollectedAt?: Date | undefined;
6605
6617
  nextVisitAt?: Date | undefined;
6618
+ visitIntervalMs?: number | undefined;
6606
6619
  }>, {}, mongoose.DefaultSchemaOptions> & mongoose.FlatRecord<{
6607
6620
  type: "channel" | "group" | "profile" | "forum" | "site";
6608
6621
  status: "active" | "paused" | "closed" | "access_problem";
@@ -6633,6 +6646,7 @@ declare const SCHEMAS: {
6633
6646
  } | undefined;
6634
6647
  lastCollectedAt?: Date | undefined;
6635
6648
  nextVisitAt?: Date | undefined;
6649
+ visitIntervalMs?: number | undefined;
6636
6650
  }> & Required<{
6637
6651
  _id: mongoose.Types.ObjectId;
6638
6652
  }> & {
@@ -1,5 +1,5 @@
1
- import { at as CollectionName, n as AgentMessage, u as AgentSession, J as AnalystProfile, O as AssigneeLoad, R as Assignment, _ as AuditLog, ad as Capture, aF as DataItem, aQ as Database, a_ as Deployment, bO as Mission, dj as Task, bm as HoursLog, cl as ScoutProfile, bY as OrgSettings, ct as ScoutRating, cN as Source, cS as SourceImport, cA as Scraper, cD as ScraperMetric, by as LlmCall } from '../agent-session-oZI9RyQ_.js';
2
- export { ab as COLLECTIONS } from '../agent-session-oZI9RyQ_.js';
1
+ import { av as CollectionName, n as AgentMessage, u as AgentSession, J as AnalystProfile, P as AssigneeLoad, T as Assignment, a0 as AuditLog, af as Capture, aH as DataItem, aS as Database, b0 as Deployment, bQ as Mission, dj as Task, bo as HoursLog, cm as ScoutProfile, bZ as OrgSettings, cu as ScoutRating, cO as Source, cT as SourceImport, cB as Scraper, cE as ScraperMetric, bA as LlmCall } from '../agent-session-BKq7mARI.js';
2
+ export { ad as COLLECTIONS } from '../agent-session-BKq7mARI.js';
3
3
  import * as mongoose from 'mongoose';
4
4
  import { Types, IndexDefinition, IndexOptions, Schema, Query, Model, Connection } from 'mongoose';
5
5
  import 'zod';
@@ -2431,6 +2431,7 @@ declare const sourceSchema: Schema<{
2431
2431
  } | undefined;
2432
2432
  lastCollectedAt?: Date | undefined;
2433
2433
  nextVisitAt?: Date | undefined;
2434
+ visitIntervalMs?: number | undefined;
2434
2435
  }, mongoose.Model<{
2435
2436
  type: "channel" | "group" | "profile" | "forum" | "site";
2436
2437
  status: "active" | "paused" | "closed" | "access_problem";
@@ -2461,6 +2462,7 @@ declare const sourceSchema: Schema<{
2461
2462
  } | undefined;
2462
2463
  lastCollectedAt?: Date | undefined;
2463
2464
  nextVisitAt?: Date | undefined;
2465
+ visitIntervalMs?: number | undefined;
2464
2466
  }, any, any, any, mongoose.Document<unknown, any, {
2465
2467
  type: "channel" | "group" | "profile" | "forum" | "site";
2466
2468
  status: "active" | "paused" | "closed" | "access_problem";
@@ -2491,6 +2493,7 @@ declare const sourceSchema: Schema<{
2491
2493
  } | undefined;
2492
2494
  lastCollectedAt?: Date | undefined;
2493
2495
  nextVisitAt?: Date | undefined;
2496
+ visitIntervalMs?: number | undefined;
2494
2497
  }, any, {}> & {
2495
2498
  type: "channel" | "group" | "profile" | "forum" | "site";
2496
2499
  status: "active" | "paused" | "closed" | "access_problem";
@@ -2521,6 +2524,7 @@ declare const sourceSchema: Schema<{
2521
2524
  } | undefined;
2522
2525
  lastCollectedAt?: Date | undefined;
2523
2526
  nextVisitAt?: Date | undefined;
2527
+ visitIntervalMs?: number | undefined;
2524
2528
  } & Required<{
2525
2529
  _id: mongoose.Types.ObjectId;
2526
2530
  }> & {
@@ -2555,6 +2559,7 @@ declare const sourceSchema: Schema<{
2555
2559
  } | undefined;
2556
2560
  lastCollectedAt?: Date | undefined;
2557
2561
  nextVisitAt?: Date | undefined;
2562
+ visitIntervalMs?: number | undefined;
2558
2563
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
2559
2564
  type: "channel" | "group" | "profile" | "forum" | "site";
2560
2565
  status: "active" | "paused" | "closed" | "access_problem";
@@ -2585,6 +2590,7 @@ declare const sourceSchema: Schema<{
2585
2590
  } | undefined;
2586
2591
  lastCollectedAt?: Date | undefined;
2587
2592
  nextVisitAt?: Date | undefined;
2593
+ visitIntervalMs?: number | undefined;
2588
2594
  }>, {}, mongoose.DefaultSchemaOptions> & mongoose.FlatRecord<{
2589
2595
  type: "channel" | "group" | "profile" | "forum" | "site";
2590
2596
  status: "active" | "paused" | "closed" | "access_problem";
@@ -2615,6 +2621,7 @@ declare const sourceSchema: Schema<{
2615
2621
  } | undefined;
2616
2622
  lastCollectedAt?: Date | undefined;
2617
2623
  nextVisitAt?: Date | undefined;
2624
+ visitIntervalMs?: number | undefined;
2618
2625
  }> & Required<{
2619
2626
  _id: mongoose.Types.ObjectId;
2620
2627
  }> & {
@@ -6449,6 +6456,7 @@ declare const SCHEMAS: {
6449
6456
  } | undefined;
6450
6457
  lastCollectedAt?: Date | undefined;
6451
6458
  nextVisitAt?: Date | undefined;
6459
+ visitIntervalMs?: number | undefined;
6452
6460
  }, mongoose.Model<{
6453
6461
  type: "channel" | "group" | "profile" | "forum" | "site";
6454
6462
  status: "active" | "paused" | "closed" | "access_problem";
@@ -6479,6 +6487,7 @@ declare const SCHEMAS: {
6479
6487
  } | undefined;
6480
6488
  lastCollectedAt?: Date | undefined;
6481
6489
  nextVisitAt?: Date | undefined;
6490
+ visitIntervalMs?: number | undefined;
6482
6491
  }, any, any, any, mongoose.Document<unknown, any, {
6483
6492
  type: "channel" | "group" | "profile" | "forum" | "site";
6484
6493
  status: "active" | "paused" | "closed" | "access_problem";
@@ -6509,6 +6518,7 @@ declare const SCHEMAS: {
6509
6518
  } | undefined;
6510
6519
  lastCollectedAt?: Date | undefined;
6511
6520
  nextVisitAt?: Date | undefined;
6521
+ visitIntervalMs?: number | undefined;
6512
6522
  }, any, {}> & {
6513
6523
  type: "channel" | "group" | "profile" | "forum" | "site";
6514
6524
  status: "active" | "paused" | "closed" | "access_problem";
@@ -6539,6 +6549,7 @@ declare const SCHEMAS: {
6539
6549
  } | undefined;
6540
6550
  lastCollectedAt?: Date | undefined;
6541
6551
  nextVisitAt?: Date | undefined;
6552
+ visitIntervalMs?: number | undefined;
6542
6553
  } & Required<{
6543
6554
  _id: mongoose.Types.ObjectId;
6544
6555
  }> & {
@@ -6573,6 +6584,7 @@ declare const SCHEMAS: {
6573
6584
  } | undefined;
6574
6585
  lastCollectedAt?: Date | undefined;
6575
6586
  nextVisitAt?: Date | undefined;
6587
+ visitIntervalMs?: number | undefined;
6576
6588
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
6577
6589
  type: "channel" | "group" | "profile" | "forum" | "site";
6578
6590
  status: "active" | "paused" | "closed" | "access_problem";
@@ -6603,6 +6615,7 @@ declare const SCHEMAS: {
6603
6615
  } | undefined;
6604
6616
  lastCollectedAt?: Date | undefined;
6605
6617
  nextVisitAt?: Date | undefined;
6618
+ visitIntervalMs?: number | undefined;
6606
6619
  }>, {}, mongoose.DefaultSchemaOptions> & mongoose.FlatRecord<{
6607
6620
  type: "channel" | "group" | "profile" | "forum" | "site";
6608
6621
  status: "active" | "paused" | "closed" | "access_problem";
@@ -6633,6 +6646,7 @@ declare const SCHEMAS: {
6633
6646
  } | undefined;
6634
6647
  lastCollectedAt?: Date | undefined;
6635
6648
  nextVisitAt?: Date | undefined;
6649
+ visitIntervalMs?: number | undefined;
6636
6650
  }> & Required<{
6637
6651
  _id: mongoose.Types.ObjectId;
6638
6652
  }> & {
@@ -245,6 +245,8 @@ var INDEXES = {
245
245
  options: { unique: true, partialFilterExpression: NOT_SOFT_DELETED_FILTER }
246
246
  },
247
247
  { key: { orgId: 1, route: 1, status: 1 } },
248
+ // Multikey: the sources attached to a Monitor task (cap counts, agents' version polls).
249
+ { key: { orgId: 1, taskIds: 1 } },
248
250
  // Partition key of the shared database; drives the future split into physical databases.
249
251
  { key: { orgId: 1, databaseId: 1 } }
250
252
  ],
@@ -1131,6 +1133,7 @@ var sourceSchema = new Schema(
1131
1133
  discoveredBy: { type: discoveredBySchema, required: true },
1132
1134
  lastCollectedAt: { type: Date },
1133
1135
  nextVisitAt: { type: Date },
1136
+ visitIntervalMs: { type: Number, min: 1 },
1134
1137
  deletedAt: { type: Date }
1135
1138
  },
1136
1139
  collectionOptions(COLLECTIONS.sources)