@badger_badger/badger_hq 1.7.0 → 1.8.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.
- package/CHANGELOG.md +11 -0
- package/dist/{agent-session-BKq7mARI.d.cts → agent-session-C7C0Z1e1.d.cts} +139 -14
- package/dist/{agent-session-BKq7mARI.d.ts → agent-session-C7C0Z1e1.d.ts} +139 -14
- package/dist/index.cjs +22 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -26
- package/dist/index.d.ts +34 -26
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/mongo/index.cjs +16 -0
- package/dist/mongo/index.cjs.map +1 -1
- package/dist/mongo/index.d.cts +229 -17
- package/dist/mongo/index.d.ts +229 -17
- package/dist/mongo/index.js +16 -1
- package/dist/mongo/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -581,6 +581,21 @@ var DiscoveredBySchema = z.object({
|
|
|
581
581
|
userId: ClerkUserId.optional(),
|
|
582
582
|
importId: ObjectIdString.optional()
|
|
583
583
|
});
|
|
584
|
+
var SourceDiscoverySchema = z.object({
|
|
585
|
+
/** The Discovery task whose capture found it. */
|
|
586
|
+
taskId: ObjectIdString,
|
|
587
|
+
/** agent-service capture id, when the source came from a task-tagged capture. */
|
|
588
|
+
captureId: ObjectIdString.optional(),
|
|
589
|
+
/** The page the person captured (e.g. a search or hashtag page), not the source itself. */
|
|
590
|
+
capturedUrl: z.string().url().refine(isHttpUrl, "Expected an http(s) URL").optional(),
|
|
591
|
+
name: z.string().min(1).max(200),
|
|
592
|
+
description: z.string().max(1e3).optional(),
|
|
593
|
+
/** The judge's reason for keeping it. */
|
|
594
|
+
reason: z.string().max(300),
|
|
595
|
+
/** 0..1 relevance from the `judge` capability. */
|
|
596
|
+
relevanceScore: z.number().min(0).max(1),
|
|
597
|
+
discoveredAt: z.coerce.date()
|
|
598
|
+
});
|
|
584
599
|
var SourceSchema = z.object({
|
|
585
600
|
_id: ObjectIdString,
|
|
586
601
|
orgId: ClerkOrgId,
|
|
@@ -598,6 +613,7 @@ var SourceSchema = z.object({
|
|
|
598
613
|
tags: z.array(z.string().min(1)).default([]),
|
|
599
614
|
status: SourceStatus.default("active"),
|
|
600
615
|
discoveredBy: DiscoveredBySchema,
|
|
616
|
+
discovery: SourceDiscoverySchema.optional(),
|
|
601
617
|
lastCollectedAt: z.coerce.date().optional(),
|
|
602
618
|
nextVisitAt: z.coerce.date().optional(),
|
|
603
619
|
/** Activity-based wait set by the last visit, before current urgency (see `effectiveDueAt`). */
|
|
@@ -611,6 +627,7 @@ var SourceCreateSchema = SourceSchema.omit({
|
|
|
611
627
|
updatedAt: true,
|
|
612
628
|
deletedAt: true,
|
|
613
629
|
discoveredBy: true,
|
|
630
|
+
discovery: true,
|
|
614
631
|
lastCollectedAt: true,
|
|
615
632
|
visitIntervalMs: true
|
|
616
633
|
});
|
|
@@ -1205,6 +1222,10 @@ var SourceIntakeBodySchema = z.object({
|
|
|
1205
1222
|
/** The discovery task the session works; its mission's monitor task receives gated sources. */
|
|
1206
1223
|
taskId: ObjectIdString,
|
|
1207
1224
|
discoveredByUserId: ClerkUserId,
|
|
1225
|
+
/** agent-service capture the candidates came from (task-tagged captures). */
|
|
1226
|
+
captureId: ObjectIdString.optional(),
|
|
1227
|
+
/** The page that capture was taken on. */
|
|
1228
|
+
capturedUrl: z.string().url().refine(isHttpUrl, "Expected an http(s) URL").optional(),
|
|
1208
1229
|
candidates: z.array(SourceIntakeCandidateSchema).min(1).max(MAX_SOURCE_INTAKE_CANDIDATES)
|
|
1209
1230
|
});
|
|
1210
1231
|
var SourceIntakeResultSchema = z.object({
|
|
@@ -1249,6 +1270,6 @@ var PriorityAlertResponseSchema = z.object({
|
|
|
1249
1270
|
var INTERNAL_ERROR_CODE_VALUES = ["UNAUTHENTICATED", "NOT_FOUND", "VALIDATION_ERROR", "INTERNAL"];
|
|
1250
1271
|
var InternalErrorCode = z.enum(INTERNAL_ERROR_CODE_VALUES);
|
|
1251
1272
|
|
|
1252
|
-
export { ACCESS_ISSUE_VALUES, AGENT_CARD_KIND_VALUES, AGENT_ERROR_CODE_VALUES, AGENT_MESSAGE_KIND_VALUES, AGENT_MESSAGE_ROLE_VALUES, AGENT_ROLE_VALUES, AGENT_SESSION_MODE_VALUES, AGENT_SESSION_STATUS_VALUES, AGENT_SOURCE_OUTCOME_VALUES, ASSIGNEE_TYPE_VALUES, ASSIGNMENT_SOURCE_VALUES, ASSIGNMENT_STATUS_VALUES, AccessIssue, AgentActiveSessionResponseSchema, AgentAssignmentItemSchema, AgentAssignmentVersionSchema, AgentAssignmentVersionsResponseSchema, AgentAssignmentsResponseSchema, AgentCaptureFieldsSchema, AgentCaptureResponseSchema, AgentCardKind, AgentCardSchema, AgentErrorCode, AgentErrorSchema, AgentMeSchema, AgentMessageCreateSchema, AgentMessageKind, AgentMessageRole, AgentMessageSchema, AgentMessageViewSchema, AgentMessagesQuerySchema, AgentMessagesResponseSchema, AgentOrgRefSchema, AgentReplyBodySchema, AgentRole, AgentSessionBudgetSchema, AgentSessionCreateSchema, AgentSessionMode, AgentSessionResponseSchema, AgentSessionSchema, AgentSessionStartBodySchema, AgentSessionStartResponseSchema, AgentSessionStatsSchema, AgentSessionStatus, AgentSessionUpdateSchema, AgentSessionViewSchema, AgentSourceOutcome, AgentStreamEventSchema, AgentTaskCriteriaSchema, AgentTaskSchema, AgentTaskSourceSchema, AgentTaskTargetSchema, AnalystProfileSchema, AnalystProfileUpdateSchema, ApiErrorSchema, AssigneeLoadSchema, AssigneeType, AssignmentCreateSchema, AssignmentSchema, AssignmentSource, AssignmentStatus, AssignmentUpdateSchema, AuditLogCreateSchema, AuditLogSchema, AuditLogUpdateSchema, AuditTargetSchema, AvailabilityWindowSchema, BlobRefSchema, CAPTURE_DOM_STATUS_VALUES, CAPTURE_STATUS_VALUES, CAPTURE_WINDOW_MODE_VALUES, COLLECTIONS, COLLECTOR_TYPE_VALUES, CaptureCreateSchema, CaptureDomSnapshotSchema, CaptureDomStatus, CaptureDomSummarySchema, CapturePromptCardSchema, CaptureRegionSchema, CaptureSchema, CaptureStatus, CaptureThumbCardSchema, CaptureWindowMode, CaptureWindowSchema, ClerkOrgId, ClerkUserId, CollectorSchema, CollectorType, ConnectionString, CoverageWindowSchema, DATABASE_COLLECTION_VALUES, DATABASE_STATUS_VALUES, DEFAULT_ANALYST_TASK_LIMIT, DEFAULT_SCOUT_TASK_LIMIT, DEPLOYMENT_KIND_VALUES, DEPLOYMENT_STATUS_VALUES, DISCOVERED_BY_TYPE_VALUES, DataItemContentSchema, DataItemCreateSchema, DataItemEntitySchema, DataItemSchema, DataItemUpdateSchema, DatabaseCollection, DatabaseCreateSchema, DatabaseId, DatabaseName, DatabaseSchema, DatabaseStatus, DatabaseUpdateSchema, DeploymentCreateSchema, DeploymentKind, DeploymentSchema, DeploymentStatus, DeploymentStepSchema, DeploymentUpdateSchema, DiscoveredBySchema, DiscoveredByType, DomBlockSchema, DomLinkSchema, DomRectSchema, Email, GLOBAL_LOAD_SCOPE, GeoSchema, HHmm, HOURS_LOG_SOURCE_VALUES, HoursLogCreateSchema, HoursLogSchema, HoursLogSource, HoursLogUpdateSchema, HoursProposalCardSchema, INTERNAL_ERROR_CODE_VALUES, InternalErrorCode, ItemResultCardSchema, LLM_CAPABILITY_VALUES, LLM_OUTCOME_VALUES, LLM_PROVIDER_VALUES, LanguageCode, LlmCallCreateSchema, LlmCallSchema, LlmCapability, LlmOutcome, LlmProvider, LlmUsageSchema, LoadScope, MAX_AGENT_MESSAGE_TEXT_LENGTH, MAX_CAPTURE_WINDOW_DAYS, MAX_RATING_COMMENT_LENGTH, MAX_SOURCE_IMPORT_ROW_ERRORS, MAX_SOURCE_INTAKE_CANDIDATES, MISSION_PRIORITY_VALUES, MISSION_STATUS_VALUES, MONITOR_TASK_MAX_SOURCES, MatchingFieldsSchema, MissionCreateSchema, MissionPriority, MissionSchema, MissionStatus, MissionUpdateSchema, ObjectIdString, OpenLinkCardSchema, OrgSettingsSchema, OrgSettingsUpdateSchema, OverdueLevelSchema, PLATFORM_VALUES, PaginatedSchema, PaginationQuerySchema, Platform, PlatformAccessSchema, PriorityAlertBodySchema, PriorityAlertResponseSchema, QuickRepliesCardSchema, QuickReplyOptionSchema, RATER_TYPE_VALUES, REGION_MODE_VALUES, RaterType, RatingScore, RatingSummarySchema, RegionMode, SCOUT_STATUS_VALUES, SCRAPER_STATUS_VALUES, SERVER_MANAGED_KEYS, SOURCE_ACCESS_VALUES, SOURCE_IMPORT_KIND_VALUES, SOURCE_IMPORT_STATUS_VALUES, SOURCE_INTAKE_OUTCOME_VALUES, SOURCE_ROUTE_VALUES, SOURCE_STATUS_VALUES, SOURCE_TYPE_VALUES, ScoutProfileCreateSchema, ScoutProfileSchema, ScoutProfileUpdateSchema, ScoutRatingInputSchema, ScoutRatingSchema, ScoutSelfUpdateSchema, ScoutStatus, ScraperCreateSchema, ScraperMetricCreateSchema, ScraperMetricSchema, ScraperMetricUpdateSchema, ScraperSchema, ScraperStatus, ScraperUpdateSchema, SoftDeleteSchema, SourceAccess, SourceCreateSchema, SourceImportCreateSchema, SourceImportKind, SourceImportRowErrorSchema, SourceImportSchema, SourceImportStatus, SourceImportSummarySchema, SourceImportUpdateSchema, SourceIntakeBodySchema, SourceIntakeCandidateSchema, SourceIntakeOutcome, SourceIntakeResponseSchema, SourceIntakeResultSchema, SourceRatingSchema, SourceResultCardSchema, SourceRoute, SourceSchema, SourceStatus, SourceType, SourceUpdateSchema, SourceVisitBodySchema, SourceVisitResponseSchema, SpecialAccessSchema, SystemRecommendationInputSchema, SystemRecommendationSchema, TASK_KIND_VALUES, TASK_ORIGIN_VALUES, TASK_STATUS_VALUES, TaskCreateSchema, TaskCriteriaSchema, TaskKind, TaskOrigin, TaskSchema, TaskStatus, TaskTargetSchema, TaskUpdateSchema, TimeZone, TimestampsSchema, URGENCY_FACTOR, VETTING_STATUS_VALUES, VISIT_INTERVAL_MAX_MS, VISIT_INTERVAL_MIN_MS, VettingStatus, baseVisitInterval, clampInterval, effectiveDueAt, effectiveInterval, isHttpUrl, overdueLevel, urgencyFactor };
|
|
1273
|
+
export { ACCESS_ISSUE_VALUES, AGENT_CARD_KIND_VALUES, AGENT_ERROR_CODE_VALUES, AGENT_MESSAGE_KIND_VALUES, AGENT_MESSAGE_ROLE_VALUES, AGENT_ROLE_VALUES, AGENT_SESSION_MODE_VALUES, AGENT_SESSION_STATUS_VALUES, AGENT_SOURCE_OUTCOME_VALUES, ASSIGNEE_TYPE_VALUES, ASSIGNMENT_SOURCE_VALUES, ASSIGNMENT_STATUS_VALUES, AccessIssue, AgentActiveSessionResponseSchema, AgentAssignmentItemSchema, AgentAssignmentVersionSchema, AgentAssignmentVersionsResponseSchema, AgentAssignmentsResponseSchema, AgentCaptureFieldsSchema, AgentCaptureResponseSchema, AgentCardKind, AgentCardSchema, AgentErrorCode, AgentErrorSchema, AgentMeSchema, AgentMessageCreateSchema, AgentMessageKind, AgentMessageRole, AgentMessageSchema, AgentMessageViewSchema, AgentMessagesQuerySchema, AgentMessagesResponseSchema, AgentOrgRefSchema, AgentReplyBodySchema, AgentRole, AgentSessionBudgetSchema, AgentSessionCreateSchema, AgentSessionMode, AgentSessionResponseSchema, AgentSessionSchema, AgentSessionStartBodySchema, AgentSessionStartResponseSchema, AgentSessionStatsSchema, AgentSessionStatus, AgentSessionUpdateSchema, AgentSessionViewSchema, AgentSourceOutcome, AgentStreamEventSchema, AgentTaskCriteriaSchema, AgentTaskSchema, AgentTaskSourceSchema, AgentTaskTargetSchema, AnalystProfileSchema, AnalystProfileUpdateSchema, ApiErrorSchema, AssigneeLoadSchema, AssigneeType, AssignmentCreateSchema, AssignmentSchema, AssignmentSource, AssignmentStatus, AssignmentUpdateSchema, AuditLogCreateSchema, AuditLogSchema, AuditLogUpdateSchema, AuditTargetSchema, AvailabilityWindowSchema, BlobRefSchema, CAPTURE_DOM_STATUS_VALUES, CAPTURE_STATUS_VALUES, CAPTURE_WINDOW_MODE_VALUES, COLLECTIONS, COLLECTOR_TYPE_VALUES, CaptureCreateSchema, CaptureDomSnapshotSchema, CaptureDomStatus, CaptureDomSummarySchema, CapturePromptCardSchema, CaptureRegionSchema, CaptureSchema, CaptureStatus, CaptureThumbCardSchema, CaptureWindowMode, CaptureWindowSchema, ClerkOrgId, ClerkUserId, CollectorSchema, CollectorType, ConnectionString, CoverageWindowSchema, DATABASE_COLLECTION_VALUES, DATABASE_STATUS_VALUES, DEFAULT_ANALYST_TASK_LIMIT, DEFAULT_SCOUT_TASK_LIMIT, DEPLOYMENT_KIND_VALUES, DEPLOYMENT_STATUS_VALUES, DISCOVERED_BY_TYPE_VALUES, DataItemContentSchema, DataItemCreateSchema, DataItemEntitySchema, DataItemSchema, DataItemUpdateSchema, DatabaseCollection, DatabaseCreateSchema, DatabaseId, DatabaseName, DatabaseSchema, DatabaseStatus, DatabaseUpdateSchema, DeploymentCreateSchema, DeploymentKind, DeploymentSchema, DeploymentStatus, DeploymentStepSchema, DeploymentUpdateSchema, DiscoveredBySchema, DiscoveredByType, DomBlockSchema, DomLinkSchema, DomRectSchema, Email, GLOBAL_LOAD_SCOPE, GeoSchema, HHmm, HOURS_LOG_SOURCE_VALUES, HoursLogCreateSchema, HoursLogSchema, HoursLogSource, HoursLogUpdateSchema, HoursProposalCardSchema, INTERNAL_ERROR_CODE_VALUES, InternalErrorCode, ItemResultCardSchema, LLM_CAPABILITY_VALUES, LLM_OUTCOME_VALUES, LLM_PROVIDER_VALUES, LanguageCode, LlmCallCreateSchema, LlmCallSchema, LlmCapability, LlmOutcome, LlmProvider, LlmUsageSchema, LoadScope, MAX_AGENT_MESSAGE_TEXT_LENGTH, MAX_CAPTURE_WINDOW_DAYS, MAX_RATING_COMMENT_LENGTH, MAX_SOURCE_IMPORT_ROW_ERRORS, MAX_SOURCE_INTAKE_CANDIDATES, MISSION_PRIORITY_VALUES, MISSION_STATUS_VALUES, MONITOR_TASK_MAX_SOURCES, MatchingFieldsSchema, MissionCreateSchema, MissionPriority, MissionSchema, MissionStatus, MissionUpdateSchema, ObjectIdString, OpenLinkCardSchema, OrgSettingsSchema, OrgSettingsUpdateSchema, OverdueLevelSchema, PLATFORM_VALUES, PaginatedSchema, PaginationQuerySchema, Platform, PlatformAccessSchema, PriorityAlertBodySchema, PriorityAlertResponseSchema, QuickRepliesCardSchema, QuickReplyOptionSchema, RATER_TYPE_VALUES, REGION_MODE_VALUES, RaterType, RatingScore, RatingSummarySchema, RegionMode, SCOUT_STATUS_VALUES, SCRAPER_STATUS_VALUES, SERVER_MANAGED_KEYS, SOURCE_ACCESS_VALUES, SOURCE_IMPORT_KIND_VALUES, SOURCE_IMPORT_STATUS_VALUES, SOURCE_INTAKE_OUTCOME_VALUES, SOURCE_ROUTE_VALUES, SOURCE_STATUS_VALUES, SOURCE_TYPE_VALUES, ScoutProfileCreateSchema, ScoutProfileSchema, ScoutProfileUpdateSchema, ScoutRatingInputSchema, ScoutRatingSchema, ScoutSelfUpdateSchema, ScoutStatus, ScraperCreateSchema, ScraperMetricCreateSchema, ScraperMetricSchema, ScraperMetricUpdateSchema, ScraperSchema, ScraperStatus, ScraperUpdateSchema, SoftDeleteSchema, SourceAccess, SourceCreateSchema, SourceDiscoverySchema, SourceImportCreateSchema, SourceImportKind, SourceImportRowErrorSchema, SourceImportSchema, SourceImportStatus, SourceImportSummarySchema, SourceImportUpdateSchema, SourceIntakeBodySchema, SourceIntakeCandidateSchema, SourceIntakeOutcome, SourceIntakeResponseSchema, SourceIntakeResultSchema, SourceRatingSchema, SourceResultCardSchema, SourceRoute, SourceSchema, SourceStatus, SourceType, SourceUpdateSchema, SourceVisitBodySchema, SourceVisitResponseSchema, SpecialAccessSchema, SystemRecommendationInputSchema, SystemRecommendationSchema, TASK_KIND_VALUES, TASK_ORIGIN_VALUES, TASK_STATUS_VALUES, TaskCreateSchema, TaskCriteriaSchema, TaskKind, TaskOrigin, TaskSchema, TaskStatus, TaskTargetSchema, TaskUpdateSchema, TimeZone, TimestampsSchema, URGENCY_FACTOR, VETTING_STATUS_VALUES, VISIT_INTERVAL_MAX_MS, VISIT_INTERVAL_MIN_MS, VettingStatus, baseVisitInterval, clampInterval, effectiveDueAt, effectiveInterval, isHttpUrl, overdueLevel, urgencyFactor };
|
|
1253
1274
|
//# sourceMappingURL=index.js.map
|
|
1254
1275
|
//# sourceMappingURL=index.js.map
|