@ascenda-one/github-collector 0.1.11 → 0.1.12
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/cli.js +23 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -243,6 +243,8 @@ var require_afterHours = __commonJS({
|
|
|
243
243
|
"use strict";
|
|
244
244
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
245
245
|
exports.isAfterHours = isAfterHours;
|
|
246
|
+
exports.utcOffsetMinutesAt = utcOffsetMinutesAt;
|
|
247
|
+
exports.localHourAt = localHourAt;
|
|
246
248
|
function isAfterHours(now = /* @__PURE__ */ new Date(), start = "19:00", end = "07:00") {
|
|
247
249
|
const currentMinutes = now.getHours() * 60 + now.getMinutes();
|
|
248
250
|
const startMinutes = parseTimeToMinutes(start, 19 * 60);
|
|
@@ -263,6 +265,13 @@ var require_afterHours = __commonJS({
|
|
|
263
265
|
return fallback;
|
|
264
266
|
return Math.max(0, Math.min(23, hours)) * 60 + Math.max(0, Math.min(59, minutes));
|
|
265
267
|
}
|
|
268
|
+
function utcOffsetMinutesAt(at) {
|
|
269
|
+
return -at.getTimezoneOffset();
|
|
270
|
+
}
|
|
271
|
+
function localHourAt(at, utcOffsetMinutes) {
|
|
272
|
+
const shifted = new Date(at.getTime() + utcOffsetMinutes * 6e4);
|
|
273
|
+
return shifted.getUTCHours();
|
|
274
|
+
}
|
|
266
275
|
}
|
|
267
276
|
});
|
|
268
277
|
|
|
@@ -354,7 +363,7 @@ var require_out = __commonJS({
|
|
|
354
363
|
"../packages/tool-contract/out/index.js"(exports) {
|
|
355
364
|
"use strict";
|
|
356
365
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
357
|
-
exports.ASCENDA_SEMANTIC_PROVENANCE = exports.ASCENDA_COLLABORATION_CONSENT_SCOPE = exports.ASCENDA_SEMANTIC_CONSENT_SCOPE = exports.ASCENDA_PROVENANCE = exports.ASCENDA_CONSENT_SCOPE = exports.EVENT_WORKLOAD_CATEGORY = exports.COLLABORATION_EVENT_TYPES = exports.SEMANTIC_WORK_SIGNAL_EVENT_TYPES = void 0;
|
|
366
|
+
exports.ASCENDA_SEMANTIC_PROVENANCE = exports.ASCENDA_HISTORICAL_CONSENT_SCOPE = exports.ASCENDA_COLLABORATION_CONSENT_SCOPE = exports.ASCENDA_SEMANTIC_CONSENT_SCOPE = exports.ASCENDA_PROVENANCE = exports.ASCENDA_CONSENT_SCOPE = exports.EVENT_WORKLOAD_CATEGORY = exports.COLLABORATION_EVENT_TYPES = exports.SEMANTIC_WORK_SIGNAL_EVENT_TYPES = void 0;
|
|
358
367
|
exports.SEMANTIC_WORK_SIGNAL_EVENT_TYPES = [
|
|
359
368
|
"approach_churn_detected",
|
|
360
369
|
"goal_drift_detected",
|
|
@@ -411,6 +420,7 @@ var require_out = __commonJS({
|
|
|
411
420
|
exports.ASCENDA_PROVENANCE = "ai_work_telemetry";
|
|
412
421
|
exports.ASCENDA_SEMANTIC_CONSENT_SCOPE = "semantic_work_signals";
|
|
413
422
|
exports.ASCENDA_COLLABORATION_CONSENT_SCOPE = "workflow_telemetry";
|
|
423
|
+
exports.ASCENDA_HISTORICAL_CONSENT_SCOPE = "historical_import";
|
|
414
424
|
exports.ASCENDA_SEMANTIC_PROVENANCE = "semantic_work_signals";
|
|
415
425
|
}
|
|
416
426
|
});
|
|
@@ -816,6 +826,7 @@ var require_eventSender = __commonJS({
|
|
|
816
826
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
817
827
|
exports.AscendaEventSender = exports.AscendaSemanticEventError = void 0;
|
|
818
828
|
exports.buildEventPayload = buildEventPayload;
|
|
829
|
+
var afterHours_1 = require_afterHours();
|
|
819
830
|
var tool_contract_1 = require_out();
|
|
820
831
|
var eventLog_1 = require_eventLog();
|
|
821
832
|
var http_1 = require_http();
|
|
@@ -833,6 +844,7 @@ var require_eventSender = __commonJS({
|
|
|
833
844
|
toolInstallationId: identity.toolInstallationId,
|
|
834
845
|
source: identity.source,
|
|
835
846
|
occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
847
|
+
utcOffsetMinutes: (0, afterHours_1.utcOffsetMinutesAt)(/* @__PURE__ */ new Date()),
|
|
836
848
|
sessionId: identity.sessionId ?? void 0,
|
|
837
849
|
workspaceHash: identity.workspaceHash ?? void 0,
|
|
838
850
|
consentScope: tool_contract_1.ASCENDA_CONSENT_SCOPE,
|
|
@@ -886,6 +898,7 @@ var require_eventSender = __commonJS({
|
|
|
886
898
|
source: this.config.source,
|
|
887
899
|
eventType: mapped.eventType,
|
|
888
900
|
occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
901
|
+
utcOffsetMinutes: (0, afterHours_1.utcOffsetMinutesAt)(/* @__PURE__ */ new Date()),
|
|
889
902
|
severity: "low",
|
|
890
903
|
sessionId: this.config.sessionId ?? void 0,
|
|
891
904
|
workspaceHash: this.config.workspaceHash ?? void 0,
|
|
@@ -914,6 +927,7 @@ var require_eventSender = __commonJS({
|
|
|
914
927
|
source: this.config.source,
|
|
915
928
|
eventType: mapped.eventType,
|
|
916
929
|
occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
930
|
+
utcOffsetMinutes: (0, afterHours_1.utcOffsetMinutesAt)(/* @__PURE__ */ new Date()),
|
|
917
931
|
severity: "low",
|
|
918
932
|
sessionId: this.config.sessionId ?? void 0,
|
|
919
933
|
workspaceHash: this.config.workspaceHash ?? void 0,
|
|
@@ -1395,8 +1409,8 @@ var require_out2 = __commonJS({
|
|
|
1395
1409
|
"../packages/tool-kit/out/index.js"(exports) {
|
|
1396
1410
|
"use strict";
|
|
1397
1411
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1398
|
-
exports.
|
|
1399
|
-
exports.isRetryableStatus = exports.parseIngestResponse = void 0;
|
|
1412
|
+
exports.renewToolToken = exports.getPairingStatus = exports.createPairingSession = exports.AscendaApiError = exports.liveBusSocketCandidates = exports.liveBusSocketPath = exports.bucketPromptSize = exports.emitLiveSignal = exports.hashWithMachineSalt = exports.readOrCreateMachineSalt = exports.machineSaltFilePath = exports.markFailureNotified = exports.shouldAnnounceFailure = exports.recordSendOutcome = exports.readCollectorState = exports.defaultStateFilePath = exports.readTokenFile = exports.persistEventWriteToken = exports.defaultTokenFilePath = exports.recordTurnStart = exports.consumeTurnDurationMs = exports.loadCliAgentConfig = exports.deliverHookEvents = exports.DEFAULT_API_BASE_URL = exports.resolveEventLogPath = exports.expandUserPath = exports.appendEventLog = exports.EVENT_LOG_ENV_VAR = exports.buildEventPayload = exports.AscendaSemanticEventError = exports.AscendaEventSender = exports.looksLikeCorrection = exports.outcomeForHook = exports.inferOutcome = exports.getNestedNumber = exports.getNestedString = exports.getNested = exports.getNumber = exports.getString = exports.localHourAt = exports.utcOffsetMinutesAt = exports.isAfterHours = exports.bucketDurationMs = exports.bucketLinesChanged = exports.invitesDebrief = exports.classifyWorkMilestone = exports.isReworkGitAction = exports.classifyGitAction = exports.isVerificationCommand = exports.classifyCommand = void 0;
|
|
1413
|
+
exports.isRetryableStatus = exports.parseIngestResponse = exports.postToolEventsBatch = exports.postToolEvent = void 0;
|
|
1400
1414
|
var commandClassifier_1 = require_commandClassifier();
|
|
1401
1415
|
Object.defineProperty(exports, "classifyCommand", { enumerable: true, get: function() {
|
|
1402
1416
|
return commandClassifier_1.classifyCommand;
|
|
@@ -1429,6 +1443,12 @@ var require_out2 = __commonJS({
|
|
|
1429
1443
|
Object.defineProperty(exports, "isAfterHours", { enumerable: true, get: function() {
|
|
1430
1444
|
return afterHours_1.isAfterHours;
|
|
1431
1445
|
} });
|
|
1446
|
+
Object.defineProperty(exports, "utcOffsetMinutesAt", { enumerable: true, get: function() {
|
|
1447
|
+
return afterHours_1.utcOffsetMinutesAt;
|
|
1448
|
+
} });
|
|
1449
|
+
Object.defineProperty(exports, "localHourAt", { enumerable: true, get: function() {
|
|
1450
|
+
return afterHours_1.localHourAt;
|
|
1451
|
+
} });
|
|
1432
1452
|
var payload_1 = require_payload();
|
|
1433
1453
|
Object.defineProperty(exports, "getString", { enumerable: true, get: function() {
|
|
1434
1454
|
return payload_1.getString;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"publishConfig": { "access": "public" },
|
|
3
3
|
"name": "@ascenda-one/github-collector",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.12",
|
|
5
5
|
"description": "Code-forge collaboration collector for Ascenda work telemetry — first-person review and pull-request signals.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|