@ascenda-one/agent-mcp 0.1.26 → 0.1.28
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 +399 -118
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -411,39 +411,44 @@ var require_metricKeys = __commonJS({
|
|
|
411
411
|
exports.METRIC_KEYS = {
|
|
412
412
|
// ── Read by a backend reader ────────────────────────────────────────────
|
|
413
413
|
contextWindowPeakPct: {
|
|
414
|
+
family: "context",
|
|
414
415
|
readBy: ["backend", "handoff"],
|
|
415
416
|
backendAliases: CONTEXT_WINDOW_CANONICAL_ALIASES,
|
|
416
417
|
unit: "fraction of the context window (0\u20131; uncapped for >200k contexts)",
|
|
417
418
|
note: "Claude Code reports a true per-session peak. Cursor reports its composer's last known occupancy under the same key \u2014 the closest its store can answer, and not the same measurement."
|
|
418
419
|
},
|
|
419
420
|
contextUsagePercent: {
|
|
421
|
+
family: "context",
|
|
420
422
|
readBy: ["backend", "handoff"],
|
|
421
423
|
backendAliases: CONTEXT_WINDOW_CURSOR_PERCENT_ALIASES,
|
|
422
424
|
unit: "percent (0\u2013100)",
|
|
423
425
|
note: "Cursor's own column name. Superseded by contextWindowPeakPct on the wire; kept because the handoff reads it and imported rows carry it. Unit-explicit on the backend: always divided by 100, never put through the fraction-or-percent heuristic."
|
|
424
426
|
},
|
|
425
|
-
promptCount: { readBy: ["backend", "handoff"], backendAliases: ["promptCount", "prompt_count"] },
|
|
426
|
-
sessionMinutes: { readBy: ["backend"], backendAliases: ["sessionMinutes", "session_minutes"], unit: "minutes" },
|
|
427
|
-
durationBucket: { readBy: ["backend", "handoff"], backendAliases: ["durationBucket", "duration_bucket"] },
|
|
428
|
-
afterHoursPrompts: { readBy: ["backend", "handoff"], backendAliases: ["afterHoursPrompts", "after_hours_prompts"] },
|
|
429
|
-
inputTokens: { readBy: ["backend"], backendAliases: ["inputTokens", "input_tokens"], unit: "tokens" },
|
|
430
|
-
outputTokens: { readBy: ["backend"], backendAliases: ["outputTokens", "output_tokens"], unit: "tokens" },
|
|
431
|
-
cacheReadTokens: { readBy: ["backend"], backendAliases: ["cacheReadTokens", "cache_read_tokens"], unit: "tokens" },
|
|
432
|
-
queuedPrompts: { readBy: ["backend"], backendAliases: ["queuedPrompts", "queued_prompts"] },
|
|
433
|
-
linesChangedBucket: { readBy: ["backend"], backendAliases: ["linesChangedBucket", "lines_changed_bucket"] },
|
|
427
|
+
promptCount: { family: "counts", readBy: ["backend", "handoff"], backendAliases: ["promptCount", "prompt_count"] },
|
|
428
|
+
sessionMinutes: { family: "session", readBy: ["backend"], backendAliases: ["sessionMinutes", "session_minutes"], unit: "minutes" },
|
|
429
|
+
durationBucket: { family: "session", readBy: ["backend", "handoff"], backendAliases: ["durationBucket", "duration_bucket"] },
|
|
430
|
+
afterHoursPrompts: { family: "clock", readBy: ["backend", "handoff"], backendAliases: ["afterHoursPrompts", "after_hours_prompts"] },
|
|
431
|
+
inputTokens: { family: "context", readBy: ["backend"], backendAliases: ["inputTokens", "input_tokens"], unit: "tokens" },
|
|
432
|
+
outputTokens: { family: "context", readBy: ["backend"], backendAliases: ["outputTokens", "output_tokens"], unit: "tokens" },
|
|
433
|
+
cacheReadTokens: { family: "context", readBy: ["backend"], backendAliases: ["cacheReadTokens", "cache_read_tokens"], unit: "tokens" },
|
|
434
|
+
queuedPrompts: { family: "counts", readBy: ["backend"], backendAliases: ["queuedPrompts", "queued_prompts"] },
|
|
435
|
+
linesChangedBucket: { family: "edits", readBy: ["backend"], backendAliases: ["linesChangedBucket", "lines_changed_bucket"] },
|
|
434
436
|
// ── Read by the local handoff only ──────────────────────────────────────
|
|
435
|
-
activeMinutes: { readBy: ["handoff"], unit: "minutes" },
|
|
437
|
+
activeMinutes: { family: "session", readBy: ["handoff"], unit: "minutes" },
|
|
436
438
|
syntheticPromptLines: {
|
|
439
|
+
family: "reading",
|
|
437
440
|
readBy: ["handoff"],
|
|
438
441
|
unit: "lines",
|
|
439
442
|
note: "Main-thread user lines the runtime wrote on the person's behalf (notifications, its own bookkeeping, slash-command wrappers, interrupt markers) and promptCount left out. Claude Code only; the receipt for the handoff's promptBasis. Counted per transcript, so a resumed transcript's copies count again."
|
|
440
443
|
},
|
|
441
444
|
dispatchedPromptLines: {
|
|
445
|
+
family: "reading",
|
|
442
446
|
readBy: ["handoff"],
|
|
443
447
|
unit: "lines",
|
|
444
448
|
note: "Main-thread user lines that read as typed but are the prompt of a chip that launched the session, so promptCount left them out. Counted once per line across the store, as prompts are. Claude Code only; written beside promptBasis: typed_once."
|
|
445
449
|
},
|
|
446
450
|
interruptedRuns: {
|
|
451
|
+
family: "waiting",
|
|
447
452
|
readBy: ["handoff"],
|
|
448
453
|
unit: "runs",
|
|
449
454
|
note: "Agent turns the person cut short with an interrupt while the turn was still going. A count per session, never a rate. Claude Code only; a handoff that counted them says so with interruptedRunsCounted, and absent means not counted, never zero."
|
|
@@ -459,11 +464,13 @@ var require_metricKeys = __commonJS({
|
|
|
459
464
|
* they are.
|
|
460
465
|
*/
|
|
461
466
|
handsOnMinutes: {
|
|
467
|
+
family: "session",
|
|
462
468
|
readBy: ["handoff"],
|
|
463
469
|
unit: "minutes",
|
|
464
470
|
note: "Active time immediately preceding a human prompt \u2014 the only interval a transcript can show a person present for, because the prompt at its end is the evidence."
|
|
465
471
|
},
|
|
466
472
|
agentSupervisingMinutes: {
|
|
473
|
+
family: "session",
|
|
467
474
|
readBy: ["handoff"],
|
|
468
475
|
unit: "minutes",
|
|
469
476
|
note: "The remaining active time: the agent was working and the person was not typing. NOT a claim that anyone watched it \u2014 nothing in a transcript could show that. Never render as attention."
|
|
@@ -473,127 +480,147 @@ var require_metricKeys = __commonJS({
|
|
|
473
480
|
// a complete one, and a reader that ignores them is choosing to, rather than
|
|
474
481
|
// being unable to.
|
|
475
482
|
activeSplitInstants: {
|
|
483
|
+
family: "session",
|
|
476
484
|
readBy: ["diagnostic"],
|
|
477
485
|
note: "Distinct timestamps the split ran over, after collapsing ties. The denominator: two minutes off four instants and off four hundred are not the same measurement."
|
|
478
486
|
},
|
|
479
487
|
activeSplitUndatedLines: {
|
|
488
|
+
family: "session",
|
|
480
489
|
readBy: ["diagnostic"],
|
|
481
490
|
note: "Known lines carrying a timestamp that would not parse. Absent from the timeline, so both halves are short by an unknown amount and only this says so."
|
|
482
491
|
},
|
|
483
492
|
activeSplitUnposturedInstants: {
|
|
493
|
+
family: "posture",
|
|
484
494
|
readBy: ["diagnostic"],
|
|
485
495
|
note: "Instants reached before any permissionMode had been declared. Their supervising time lands in the unknown band, which is a blind spot rather than a posture."
|
|
486
496
|
},
|
|
487
|
-
afterHoursRequests: { readBy: ["handoff"] },
|
|
488
|
-
approximateLintErrorsCount: { readBy: ["handoff"] },
|
|
489
|
-
canceledCount: { readBy: ["handoff"] },
|
|
490
|
-
chatEditCount: { readBy: ["handoff"] },
|
|
497
|
+
afterHoursRequests: { family: "clock", readBy: ["handoff"] },
|
|
498
|
+
approximateLintErrorsCount: { family: "outcome", readBy: ["handoff"] },
|
|
499
|
+
canceledCount: { family: "outcome", readBy: ["handoff"] },
|
|
500
|
+
chatEditCount: { family: "edits", readBy: ["handoff"] },
|
|
491
501
|
compactionCount: {
|
|
502
|
+
family: "context",
|
|
492
503
|
readBy: ["handoff"],
|
|
493
504
|
note: "The backend counts context_compression_* event rows, not this key. Both are emitted; this one is for the handoff."
|
|
494
505
|
},
|
|
495
506
|
contextWindowPeakTokens: {
|
|
507
|
+
family: "context",
|
|
496
508
|
readBy: ["handoff"],
|
|
497
509
|
unit: "tokens",
|
|
498
510
|
note: "The measured quantity, with no assumed denominator. Prefer this to the ratio for any within-person baseline."
|
|
499
511
|
},
|
|
500
512
|
contextWindowTokens: {
|
|
513
|
+
family: "context",
|
|
501
514
|
readBy: ["handoff"],
|
|
502
515
|
unit: "tokens",
|
|
503
516
|
note: "Codex only: the model_context_window the rollout itself recorded \u2014 the real denominator its contextWindowPeakPct was computed against. Claude Code records no window and its ratio assumes 200k; absent here means the store never said."
|
|
504
517
|
},
|
|
505
|
-
date: { readBy: ["handoff"] },
|
|
506
|
-
errorCount: { readBy: ["handoff"] },
|
|
507
|
-
filesChangedCount: { readBy: ["handoff"] },
|
|
508
|
-
humanChangesCount: { readBy: ["handoff"] },
|
|
509
|
-
linesAdded: { readBy: ["handoff"] },
|
|
510
|
-
linesRemoved: { readBy: ["handoff"] },
|
|
511
|
-
primaryModel: {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
518
|
+
date: { family: "clock", readBy: ["handoff"] },
|
|
519
|
+
errorCount: { family: "outcome", readBy: ["handoff"] },
|
|
520
|
+
filesChangedCount: { family: "edits", readBy: ["handoff"] },
|
|
521
|
+
humanChangesCount: { family: "edits", readBy: ["handoff"] },
|
|
522
|
+
linesAdded: { family: "edits", readBy: ["handoff"] },
|
|
523
|
+
linesRemoved: { family: "edits", readBy: ["handoff"] },
|
|
524
|
+
primaryModel: {
|
|
525
|
+
family: "model",
|
|
526
|
+
readBy: ["backend", "handoff"],
|
|
527
|
+
backendAliases: ["primaryModel", "primary_model"],
|
|
528
|
+
note: "Read twice: the desktop's local handoff folds it, and a server-side reader resolves it to group a bucket's sessions by the model that served them. Declared handoff-only until 23 Sep 2026 \u2014 see toolName for why that direction of mistake has no symptom."
|
|
529
|
+
},
|
|
530
|
+
requestCount: { family: "counts", readBy: ["handoff"] },
|
|
531
|
+
sessionStartedAt: { family: "session", readBy: ["handoff"] },
|
|
532
|
+
subagentComposers: { family: "counts", readBy: ["handoff"] },
|
|
515
533
|
subagentToolCallCount: {
|
|
534
|
+
family: "tools",
|
|
516
535
|
readBy: ["handoff"],
|
|
517
536
|
note: "Claude Code only: calls made inside subagent transcripts, kept out of toolCallCount so the main-loop count matches what the wire events carry."
|
|
518
537
|
},
|
|
519
|
-
subagentTranscripts: { readBy: ["handoff"] },
|
|
538
|
+
subagentTranscripts: { family: "counts", readBy: ["handoff"] },
|
|
520
539
|
toolCallCount: {
|
|
540
|
+
family: "tools",
|
|
521
541
|
readBy: ["handoff"],
|
|
522
542
|
note: "The backend counts ai_tool_call_started event rows, not this key \u2014 same split as compactionCount. Deduplicated on the tool-call id; see each extractor for what one call means in its store."
|
|
523
543
|
},
|
|
524
544
|
toolCallsUndated: {
|
|
545
|
+
family: "tools",
|
|
525
546
|
readBy: ["handoff"],
|
|
526
547
|
note: "Cursor only: calls whose every record carries an empty createdAt. Counted in toolCallCount, but no event exists for them \u2014 the wire total is smaller than this session count by exactly this number."
|
|
527
548
|
},
|
|
528
|
-
toolFailureCount: { readBy: ["handoff"] },
|
|
529
|
-
totalEntryCount: { readBy: ["handoff"] },
|
|
549
|
+
toolFailureCount: { family: "outcome", readBy: ["handoff"] },
|
|
550
|
+
totalEntryCount: { family: "counts", readBy: ["handoff"] },
|
|
530
551
|
userModifiedEditCount: {
|
|
552
|
+
family: "edits",
|
|
531
553
|
readBy: ["handoff"],
|
|
532
554
|
note: "Null, never 0 \u2014 Claude Code never sets userModified true, so 0 would assert 'no AI edit was ever corrected by hand'."
|
|
533
555
|
},
|
|
534
556
|
// ── Diagnostic: read by nobody, on purpose ──────────────────────────────
|
|
535
|
-
abandonedPromptCount: { readBy: ["diagnostic"] },
|
|
557
|
+
abandonedPromptCount: { family: "counts", readBy: ["diagnostic"] },
|
|
536
558
|
// Epoch-marker metrics. The marker is local-only and never reaches the wire
|
|
537
559
|
// (see EXTRACTION_EPOCH_KIND), but it travels as a NormalizedHistoricalEvent
|
|
538
560
|
// and so is keyed by the same vocabulary.
|
|
539
|
-
windowOldest: { readBy: ["handoff"], note: "Oldest event the extraction saw \u2014 the marker's left edge." },
|
|
540
|
-
windowNewest: { readBy: ["handoff"], note: "Newest event the extraction saw \u2014 the marker's right edge." },
|
|
541
|
-
projectsWithNoReadableTranscript: { readBy: ["diagnostic"] },
|
|
542
|
-
unparsedComposerHeaders: { readBy: ["diagnostic"] },
|
|
543
|
-
unknownComposerHeaderTypes: { readBy: ["diagnostic"] },
|
|
544
|
-
orphanedBubbles: { readBy: ["diagnostic"] },
|
|
545
|
-
orphanedSubagentBubbles: { readBy: ["diagnostic"] },
|
|
546
|
-
sessionsWithoutTimeline: { readBy: ["diagnostic"] },
|
|
561
|
+
windowOldest: { family: "session", readBy: ["handoff"], note: "Oldest event the extraction saw \u2014 the marker's left edge." },
|
|
562
|
+
windowNewest: { family: "session", readBy: ["handoff"], note: "Newest event the extraction saw \u2014 the marker's right edge." },
|
|
563
|
+
projectsWithNoReadableTranscript: { family: "reading", readBy: ["diagnostic"] },
|
|
564
|
+
unparsedComposerHeaders: { family: "reading", readBy: ["diagnostic"] },
|
|
565
|
+
unknownComposerHeaderTypes: { family: "reading", readBy: ["diagnostic"] },
|
|
566
|
+
orphanedBubbles: { family: "reading", readBy: ["diagnostic"] },
|
|
567
|
+
orphanedSubagentBubbles: { family: "reading", readBy: ["diagnostic"] },
|
|
568
|
+
sessionsWithoutTimeline: { family: "reading", readBy: ["diagnostic"] },
|
|
547
569
|
sessionsWithOnlyInheritedLines: {
|
|
570
|
+
family: "reading",
|
|
548
571
|
readBy: ["diagnostic"],
|
|
549
572
|
note: "Claude Code transcripts holding nothing but a copy of an ancestor's history, so no line's instant is theirs and no session is emitted for them. Excluded by rule, not a read failure: the work is in the transcript that owns it."
|
|
550
573
|
},
|
|
551
|
-
emptyComposers: { readBy: ["diagnostic"] },
|
|
552
|
-
apiErrorCount: { readBy: ["diagnostic"] },
|
|
553
|
-
assistantTurns: { readBy: ["diagnostic"] },
|
|
554
|
-
compactionAutoCount: { readBy: ["diagnostic"] },
|
|
555
|
-
compactionManualCount: { readBy: ["diagnostic"] },
|
|
556
|
-
editDayCount: { readBy: ["diagnostic"] },
|
|
557
|
-
emptyChatSessions: { readBy: ["diagnostic"] },
|
|
558
|
-
gitBranch: { readBy: ["diagnostic"] },
|
|
559
|
-
linesChanged: { readBy: ["diagnostic"] },
|
|
560
|
-
malformedChatSessionLines: { readBy: ["diagnostic"] },
|
|
561
|
-
malformedHistoryEntries: { readBy: ["diagnostic"] },
|
|
562
|
-
mode: { readBy: ["diagnostic"] },
|
|
563
|
-
modelCount: { readBy: ["diagnostic"] },
|
|
564
|
-
modelSwitchCount: { readBy: ["diagnostic"] },
|
|
565
|
-
rapidRepromptCount: { readBy: ["diagnostic"] },
|
|
566
|
-
schemaUnreadable: { readBy: ["diagnostic"] },
|
|
567
|
-
sessionCount: { readBy: ["diagnostic"] },
|
|
568
|
-
sessionsFromBubbleTimeline: { readBy: ["diagnostic"] },
|
|
569
|
-
sessionsFromCheckpointTimeline: { readBy: ["diagnostic"] },
|
|
570
|
-
sessionsFromRecencyTimeline: { readBy: ["diagnostic"] },
|
|
571
|
-
subagentAssistantTurns: { readBy: ["diagnostic"] },
|
|
572
|
-
subagentPrompts: { readBy: ["diagnostic"] },
|
|
573
|
-
subagentTokensTotal: { readBy: ["diagnostic"] },
|
|
574
|
+
emptyComposers: { family: "reading", readBy: ["diagnostic"] },
|
|
575
|
+
apiErrorCount: { family: "outcome", readBy: ["diagnostic"] },
|
|
576
|
+
assistantTurns: { family: "counts", readBy: ["diagnostic"] },
|
|
577
|
+
compactionAutoCount: { family: "context", readBy: ["diagnostic"] },
|
|
578
|
+
compactionManualCount: { family: "context", readBy: ["diagnostic"] },
|
|
579
|
+
editDayCount: { family: "clock", readBy: ["diagnostic"] },
|
|
580
|
+
emptyChatSessions: { family: "reading", readBy: ["diagnostic"] },
|
|
581
|
+
gitBranch: { family: "repo", readBy: ["diagnostic"] },
|
|
582
|
+
linesChanged: { family: "edits", readBy: ["diagnostic"] },
|
|
583
|
+
malformedChatSessionLines: { family: "reading", readBy: ["diagnostic"] },
|
|
584
|
+
malformedHistoryEntries: { family: "reading", readBy: ["diagnostic"] },
|
|
585
|
+
mode: { family: "posture", readBy: ["diagnostic"] },
|
|
586
|
+
modelCount: { family: "model", readBy: ["diagnostic"] },
|
|
587
|
+
modelSwitchCount: { family: "model", readBy: ["diagnostic"] },
|
|
588
|
+
rapidRepromptCount: { family: "counts", readBy: ["diagnostic"] },
|
|
589
|
+
schemaUnreadable: { family: "reading", readBy: ["diagnostic"] },
|
|
590
|
+
sessionCount: { family: "session", readBy: ["diagnostic"] },
|
|
591
|
+
sessionsFromBubbleTimeline: { family: "reading", readBy: ["diagnostic"] },
|
|
592
|
+
sessionsFromCheckpointTimeline: { family: "reading", readBy: ["diagnostic"] },
|
|
593
|
+
sessionsFromRecencyTimeline: { family: "reading", readBy: ["diagnostic"] },
|
|
594
|
+
subagentAssistantTurns: { family: "counts", readBy: ["diagnostic"] },
|
|
595
|
+
subagentPrompts: { family: "counts", readBy: ["diagnostic"] },
|
|
596
|
+
subagentTokensTotal: { family: "context", readBy: ["diagnostic"] },
|
|
574
597
|
toolName: {
|
|
575
|
-
|
|
576
|
-
|
|
598
|
+
family: "tools",
|
|
599
|
+
readBy: ["backend"],
|
|
600
|
+
backendAliases: ["toolName", "tool_name"],
|
|
601
|
+
note: "Set per ai_tool_call_started event by #43's extractors. Declared diagnostic until 23 Sep 2026 on the belief that nothing resolved it server-side; two backend readers do \u2014 one to see a sub-agent dispatch, one composing per-tool metrics. This is the inverse of the mismatch this module was written for: contextUsagePercent was a key nobody read, and a key a reader resolves without being declared drops nothing, so it has no symptom at all. What it costs is that readBy stops being a true census of what the server sees, which is what you consult when deciding what a collector should stop sending. Registered after the fact in the first place: #38 and #43 merged past each other, and the union caught it on the next compile \u2014 metaLines all over again."
|
|
577
602
|
},
|
|
578
|
-
toolResultCount: { readBy: ["diagnostic"] },
|
|
579
|
-
toolResultErrorCount: { readBy: ["diagnostic"] },
|
|
580
|
-
unknownBubbles: { readBy: ["diagnostic"] },
|
|
581
|
-
unknownLines: { readBy: ["diagnostic"] },
|
|
603
|
+
toolResultCount: { family: "tools", readBy: ["diagnostic"] },
|
|
604
|
+
toolResultErrorCount: { family: "outcome", readBy: ["diagnostic"] },
|
|
605
|
+
unknownBubbles: { family: "reading", readBy: ["diagnostic"] },
|
|
606
|
+
unknownLines: { family: "reading", readBy: ["diagnostic"] },
|
|
582
607
|
metaLines: {
|
|
608
|
+
family: "reading",
|
|
583
609
|
readBy: ["diagnostic"],
|
|
584
610
|
note: 'Recognised-but-skipped transcript machinery (file-history-snapshot, queued-command, \u2026). Split out of unknownLines by #43 so that number keeps meaning "a type nobody has looked at". Registered here after the fact: #41 and #43 merged past each other, and the union caught it on the next compile \u2014 which is this module doing its job.'
|
|
585
611
|
},
|
|
586
|
-
unparsedBubbles: { readBy: ["diagnostic"] },
|
|
587
|
-
unparsedChatSessionFiles: { readBy: ["diagnostic"] },
|
|
588
|
-
unparsedHistoryFiles: { readBy: ["diagnostic"] },
|
|
589
|
-
unparsedLines: { readBy: ["diagnostic"] },
|
|
590
|
-
unreadableChatSessionFiles: { readBy: ["diagnostic"] },
|
|
591
|
-
unreadableHistoryFiles: { readBy: ["diagnostic"] },
|
|
612
|
+
unparsedBubbles: { family: "reading", readBy: ["diagnostic"] },
|
|
613
|
+
unparsedChatSessionFiles: { family: "reading", readBy: ["diagnostic"] },
|
|
614
|
+
unparsedHistoryFiles: { family: "reading", readBy: ["diagnostic"] },
|
|
615
|
+
unparsedLines: { family: "reading", readBy: ["diagnostic"] },
|
|
616
|
+
unreadableChatSessionFiles: { family: "reading", readBy: ["diagnostic"] },
|
|
617
|
+
unreadableHistoryFiles: { family: "reading", readBy: ["diagnostic"] },
|
|
592
618
|
unreadableRolloutFiles: {
|
|
619
|
+
family: "reading",
|
|
593
620
|
readBy: ["diagnostic"],
|
|
594
621
|
note: "Codex only: rollout files the extractor meant to read and could not open. Summed into the import's read-failure warning, so a store that is partly unreadable says so rather than reporting a short window as the whole."
|
|
595
622
|
},
|
|
596
|
-
unrecognisedChatSessionFiles: { readBy: ["diagnostic"] }
|
|
623
|
+
unrecognisedChatSessionFiles: { family: "reading", readBy: ["diagnostic"] }
|
|
597
624
|
};
|
|
598
625
|
function backendMetricKeys() {
|
|
599
626
|
return Object.entries(exports.METRIC_KEYS).filter(([, spec]) => spec.readBy.includes("backend")).map(([key, spec]) => [key, spec.backendAliases ?? [key]]);
|
|
@@ -606,7 +633,7 @@ var require_out = __commonJS({
|
|
|
606
633
|
"../packages/tool-contract/out/index.js"(exports) {
|
|
607
634
|
"use strict";
|
|
608
635
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
609
|
-
exports.backendMetricKeys = exports.METRIC_KEYS = 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.TOOL_EVENT_DELIVERED_STATUSES = exports.IDEMPOTENCY_KEY_MAX_LENGTH = exports.EVENT_METADATA_FIELDS = exports.COLLABORATION_EVENT_TYPES = exports.SEMANTIC_WORK_SIGNAL_EVENT_TYPES = exports.ASCENDA_ELAPSED_QUANTITIES = exports.ASCENDA_ACTIVE_TIME_QUANTITIES = exports.ASCENDA_TOOL_TYPES = exports.ASCENDA_TELEMETRY_SOURCES = void 0;
|
|
636
|
+
exports.backendMetricKeys = exports.METRIC_KEYS = 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.TOOL_EVENT_DELIVERED_STATUSES = exports.IDEMPOTENCY_KEY_MAX_LENGTH = exports.EVENT_METADATA_FIELDS = exports.EVENT_METADATA_DISCLOSURE = exports.COLLABORATION_EVENT_TYPES = exports.SEMANTIC_WORK_SIGNAL_EVENT_TYPES = exports.ASCENDA_ELAPSED_QUANTITIES = exports.ASCENDA_ACTIVE_TIME_QUANTITIES = exports.ASCENDA_TOOL_TYPES = exports.ASCENDA_TELEMETRY_SOURCES = void 0;
|
|
610
637
|
exports.combineDisjointHalves = combineDisjointHalves;
|
|
611
638
|
exports.requireComparableQuantities = requireComparableQuantities;
|
|
612
639
|
exports.ASCENDA_TELEMETRY_SOURCES = [
|
|
@@ -674,6 +701,51 @@ var require_out = __commonJS({
|
|
|
674
701
|
"review_given",
|
|
675
702
|
"pull_request_opened"
|
|
676
703
|
];
|
|
704
|
+
exports.EVENT_METADATA_DISCLOSURE = {
|
|
705
|
+
language: "edits",
|
|
706
|
+
fileType: "edits",
|
|
707
|
+
durationBucket: "session",
|
|
708
|
+
tokenPressureBucket: "context",
|
|
709
|
+
linesChangedBucket: "edits",
|
|
710
|
+
commandClass: "counts",
|
|
711
|
+
gitAction: "git",
|
|
712
|
+
milestoneKind: "git",
|
|
713
|
+
branchHash: "repo",
|
|
714
|
+
autonomyMode: "posture",
|
|
715
|
+
modelClass: "model",
|
|
716
|
+
modelId: "model",
|
|
717
|
+
userModified: "edits",
|
|
718
|
+
outcome: "outcome",
|
|
719
|
+
trigger: "outcome",
|
|
720
|
+
promptClass: "counts",
|
|
721
|
+
reason: "outcome",
|
|
722
|
+
afterHours: "clock",
|
|
723
|
+
activity: "counts",
|
|
724
|
+
// One constant word, from the agent itself. The session sentence names it.
|
|
725
|
+
sessionEndReason: "session",
|
|
726
|
+
interruptionKind: "waiting",
|
|
727
|
+
// Free text by type, and written by no hook mapper — the IDE extension's
|
|
728
|
+
// test signal is the only producer. The setup disclosure's third refusal
|
|
729
|
+
// line says as much, and tool-kit's guard test fails if a mapper starts.
|
|
730
|
+
message: "counts",
|
|
731
|
+
host: "session",
|
|
732
|
+
// One constant word from the host's own environment: this machine, or a
|
|
733
|
+
// hosted session. The session sentence names it.
|
|
734
|
+
runtime: "session",
|
|
735
|
+
toolName: "tools",
|
|
736
|
+
simulated: "transport",
|
|
737
|
+
relatedEventType: "transport",
|
|
738
|
+
skillVersion: "transport",
|
|
739
|
+
// A hash computed before it reaches any collector; the task itself is never
|
|
740
|
+
// seen by this code, so there is nothing about the work here to disclose.
|
|
741
|
+
taskFingerprint: "transport",
|
|
742
|
+
importKey: "transport",
|
|
743
|
+
extractionId: "transport",
|
|
744
|
+
importSchema: "transport",
|
|
745
|
+
// The version of the Ascenda collector that sent this event. Names the
|
|
746
|
+
// build, and nothing about the work it observed.
|
|
747
|
+
collectorVersion: "transport"
|
|
748
|
+
};
|
|
677
749
|
exports.EVENT_METADATA_FIELDS = [
|
|
678
750
|
"language",
|
|
679
751
|
"fileType",
|
|
@@ -697,13 +769,17 @@ var require_out = __commonJS({
|
|
|
697
769
|
"message",
|
|
698
770
|
"host",
|
|
699
771
|
"toolName",
|
|
772
|
+
"runtime",
|
|
773
|
+
"sessionEndReason",
|
|
774
|
+
"interruptionKind",
|
|
700
775
|
"simulated",
|
|
701
776
|
"relatedEventType",
|
|
702
777
|
"skillVersion",
|
|
703
778
|
"taskFingerprint",
|
|
704
779
|
"importKey",
|
|
705
780
|
"extractionId",
|
|
706
|
-
"importSchema"
|
|
781
|
+
"importSchema",
|
|
782
|
+
"collectorVersion"
|
|
707
783
|
];
|
|
708
784
|
exports.IDEMPOTENCY_KEY_MAX_LENGTH = 128;
|
|
709
785
|
exports.TOOL_EVENT_DELIVERED_STATUSES = ["accepted", "duplicate"];
|
|
@@ -869,6 +945,21 @@ var require_payload = __commonJS({
|
|
|
869
945
|
}
|
|
870
946
|
});
|
|
871
947
|
|
|
948
|
+
// ../packages/tool-kit/out/collectorVersion.js
|
|
949
|
+
var require_collectorVersion = __commonJS({
|
|
950
|
+
"../packages/tool-kit/out/collectorVersion.js"(exports) {
|
|
951
|
+
"use strict";
|
|
952
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
953
|
+
exports.COLLECTOR_VERSION = exports.UNRELEASED_COLLECTOR_VERSION = void 0;
|
|
954
|
+
exports.describeCollectorVersion = describeCollectorVersion;
|
|
955
|
+
exports.UNRELEASED_COLLECTOR_VERSION = "unreleased";
|
|
956
|
+
exports.COLLECTOR_VERSION = "0.1.28" ? "0.1.28" : exports.UNRELEASED_COLLECTOR_VERSION;
|
|
957
|
+
function describeCollectorVersion(version2 = exports.COLLECTOR_VERSION) {
|
|
958
|
+
return version2 === exports.UNRELEASED_COLLECTOR_VERSION ? `${version2} (built from a checkout, not a release)` : version2;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
});
|
|
962
|
+
|
|
872
963
|
// ../packages/tool-kit/out/eventLog.js
|
|
873
964
|
var require_eventLog = __commonJS({
|
|
874
965
|
"../packages/tool-kit/out/eventLog.js"(exports) {
|
|
@@ -1622,6 +1713,7 @@ var require_eventSender = __commonJS({
|
|
|
1622
1713
|
var tokenStore_1 = require_tokenStore();
|
|
1623
1714
|
var stateStore_1 = require_stateStore();
|
|
1624
1715
|
var payload_1 = require_payload();
|
|
1716
|
+
var collectorVersion_1 = require_collectorVersion();
|
|
1625
1717
|
var AscendaSemanticEventError = class extends Error {
|
|
1626
1718
|
constructor(message) {
|
|
1627
1719
|
super(message);
|
|
@@ -1643,9 +1735,12 @@ var require_eventSender = __commonJS({
|
|
|
1643
1735
|
provenance: tool_contract_1.ASCENDA_PROVENANCE,
|
|
1644
1736
|
privacyMode: "metadata_only",
|
|
1645
1737
|
...mapped,
|
|
1646
|
-
metadata: mapped.metadata
|
|
1738
|
+
metadata: withCollectorVersion(mapped.metadata)
|
|
1647
1739
|
};
|
|
1648
1740
|
}
|
|
1741
|
+
function withCollectorVersion(metadata) {
|
|
1742
|
+
return { ...metadata, collectorVersion: collectorVersion_1.COLLECTOR_VERSION };
|
|
1743
|
+
}
|
|
1649
1744
|
var DEFAULT_TIMEOUT_MS = 5e3;
|
|
1650
1745
|
var RETRY_DELAY_MS = 250;
|
|
1651
1746
|
var AscendaEventSender2 = class {
|
|
@@ -1665,6 +1760,30 @@ var require_eventSender = __commonJS({
|
|
|
1665
1760
|
async send(mapped) {
|
|
1666
1761
|
return this.post(buildEventPayload(this.config, mapped));
|
|
1667
1762
|
}
|
|
1763
|
+
/**
|
|
1764
|
+
* Writes the event to the outbox and returns without touching the network.
|
|
1765
|
+
* The next outbox pass delivers it, from whichever hook of this
|
|
1766
|
+
* installation sends next.
|
|
1767
|
+
*
|
|
1768
|
+
* For a hook whose host is exiting. A process the host may kill at any
|
|
1769
|
+
* moment can't wait on a send, and one killed mid-send dies before
|
|
1770
|
+
* {@link post} gets to queue the payload, so the event goes with it. Here
|
|
1771
|
+
* the payload is on disk before anything can go wrong.
|
|
1772
|
+
*
|
|
1773
|
+
* Returns whether it is. When the write fails the journal says the event
|
|
1774
|
+
* was lost; nothing else could have kept it.
|
|
1775
|
+
*/
|
|
1776
|
+
queue(mapped) {
|
|
1777
|
+
const payload = buildEventPayload(this.config, mapped);
|
|
1778
|
+
const queued = this.enqueue(payload);
|
|
1779
|
+
if (!queued) {
|
|
1780
|
+
this.lastState = (0, stateStore_1.recordSendOutcome)(this.stateFilePath(), this.config.toolInstallationId, "other", {
|
|
1781
|
+
detail: `${payload.eventType}: outbox write failed, event lost`
|
|
1782
|
+
});
|
|
1783
|
+
}
|
|
1784
|
+
this.log(payload, "not_sent", queued ? "queued" : void 0);
|
|
1785
|
+
return queued;
|
|
1786
|
+
}
|
|
1668
1787
|
/**
|
|
1669
1788
|
* Sends one of the six agent-observed types (dark-flow-gap-analysis §2.1).
|
|
1670
1789
|
* Distinct from {@link send} rather than an option on it, because the
|
|
@@ -1705,7 +1824,7 @@ var require_eventSender = __commonJS({
|
|
|
1705
1824
|
consentScope: tool_contract_1.ASCENDA_SEMANTIC_CONSENT_SCOPE,
|
|
1706
1825
|
provenance: tool_contract_1.ASCENDA_SEMANTIC_PROVENANCE,
|
|
1707
1826
|
privacyMode: "metadata_only",
|
|
1708
|
-
metadata: mapped.metadata
|
|
1827
|
+
metadata: withCollectorVersion(mapped.metadata)
|
|
1709
1828
|
};
|
|
1710
1829
|
return this.post(payload);
|
|
1711
1830
|
}
|
|
@@ -1736,7 +1855,7 @@ var require_eventSender = __commonJS({
|
|
|
1736
1855
|
consentScope: tool_contract_1.ASCENDA_COLLABORATION_CONSENT_SCOPE,
|
|
1737
1856
|
provenance: tool_contract_1.ASCENDA_PROVENANCE,
|
|
1738
1857
|
privacyMode: "metadata_only",
|
|
1739
|
-
metadata: mapped.metadata
|
|
1858
|
+
metadata: withCollectorVersion(mapped.metadata)
|
|
1740
1859
|
};
|
|
1741
1860
|
return this.post(payload);
|
|
1742
1861
|
}
|
|
@@ -1961,6 +2080,8 @@ var require_eventSender = __commonJS({
|
|
|
1961
2080
|
}
|
|
1962
2081
|
/** Never throws: a renewal that errors is a failed renewal, not a failed turn. */
|
|
1963
2082
|
async renewEventToken() {
|
|
2083
|
+
if (this.config.renewToken === false)
|
|
2084
|
+
return false;
|
|
1964
2085
|
try {
|
|
1965
2086
|
const renewed = await (0, http_1.renewToolToken)(this.config.apiBaseUrl, this.eventWriteToken, this.signal());
|
|
1966
2087
|
if (!renewed)
|
|
@@ -2173,6 +2294,7 @@ var require_credentials = __commonJS({
|
|
|
2173
2294
|
exports.readMachineCredentials = readMachineCredentials;
|
|
2174
2295
|
exports.writeMachineCredentials = writeMachineCredentials;
|
|
2175
2296
|
exports.writeTopLevelCredentials = writeTopLevelCredentials;
|
|
2297
|
+
exports.isLocalOnlyHostInstall = isLocalOnlyHostInstall;
|
|
2176
2298
|
exports.readHostCredentials = readHostCredentials;
|
|
2177
2299
|
exports.writeHostCredentials = writeHostCredentials;
|
|
2178
2300
|
exports.removeHostCredentials = removeHostCredentials;
|
|
@@ -2209,6 +2331,14 @@ var require_credentials = __commonJS({
|
|
|
2209
2331
|
const existing = readMachineCredentials();
|
|
2210
2332
|
writeMachineCredentials({ ...credentials, ...existing?.tools ? { tools: existing.tools } : {} });
|
|
2211
2333
|
}
|
|
2334
|
+
function isLocalOnlyHostInstall(host, hasToken) {
|
|
2335
|
+
const credentials = readHostCredentials(host);
|
|
2336
|
+
if (!credentials?.localOnly)
|
|
2337
|
+
return false;
|
|
2338
|
+
if (process.env.ASCENDA_EVENT_WRITE_TOKEN)
|
|
2339
|
+
return false;
|
|
2340
|
+
return !(credentials.toolInstallationId && hasToken(credentials.toolInstallationId));
|
|
2341
|
+
}
|
|
2212
2342
|
function readHostCredentials(host) {
|
|
2213
2343
|
const entry = readMachineCredentials()?.tools?.[host];
|
|
2214
2344
|
if (!entry || typeof entry !== "object" || Array.isArray(entry))
|
|
@@ -2777,6 +2907,9 @@ var require_hookAdapter = __commonJS({
|
|
|
2777
2907
|
if (events.length === 0)
|
|
2778
2908
|
return;
|
|
2779
2909
|
const notice = options.onNotice ?? ((message) => console.error(message));
|
|
2910
|
+
const hasToken = (id) => (0, tokenStore_1.readTokenFile)(process.env.ASCENDA_EVENT_WRITE_TOKEN_FILE ?? (0, tokenStore_1.defaultTokenFilePath)(id)) !== void 0;
|
|
2911
|
+
if (options.host && (0, credentials_1.isLocalOnlyHostInstall)(options.host, hasToken))
|
|
2912
|
+
return;
|
|
2780
2913
|
let config2;
|
|
2781
2914
|
try {
|
|
2782
2915
|
config2 = loadCliAgentConfig(options.toolType, options.sessionId, options.cwd, options);
|
|
@@ -2842,6 +2975,51 @@ var require_hookAdapter = __commonJS({
|
|
|
2842
2975
|
}
|
|
2843
2976
|
});
|
|
2844
2977
|
|
|
2978
|
+
// ../packages/tool-kit/out/setupDisclosure.js
|
|
2979
|
+
var require_setupDisclosure = __commonJS({
|
|
2980
|
+
"../packages/tool-kit/out/setupDisclosure.js"(exports) {
|
|
2981
|
+
"use strict";
|
|
2982
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2983
|
+
exports.FREE_TEXT_KEYS = exports.REFUSALS = exports.ALWAYS_SENT = exports.FAMILY_SENTENCES = void 0;
|
|
2984
|
+
exports.renderSetupDisclosure = renderSetupDisclosure;
|
|
2985
|
+
exports.FAMILY_SENTENCES = {
|
|
2986
|
+
session: "when a session starts and ends, the one-word reason for the end if your agent gives one, how long each turn took, and whether it ran on this machine or in a hosted cloud session",
|
|
2987
|
+
counts: "how many prompts you sent, how many replies came back, and what class of command ran in a terminal \u2014 test, lint, build, git and so on",
|
|
2988
|
+
tools: "the name of each tool your agent calls",
|
|
2989
|
+
outcome: "whether a call succeeded, failed, or was interrupted",
|
|
2990
|
+
clock: "your machine's offset from UTC, so an evening is read as an evening",
|
|
2991
|
+
repo: "your project and branch as digests computed on this machine \u2014 never the names themselves",
|
|
2992
|
+
model: "which model served the session, by name and by tier",
|
|
2993
|
+
posture: "the permission posture your agent was working under \u2014 asking each time, accepting edits, and so on",
|
|
2994
|
+
git: "that a commit, push or revert happened, and when a pull request opened or merged",
|
|
2995
|
+
edits: "roughly how much a file changed, as a bucket, and whether you edited it after the agent wrote it",
|
|
2996
|
+
context: "how full the context window got",
|
|
2997
|
+
waiting: "that your agent stopped and waited for you, as one word: permission_request, idle_prompt, or other",
|
|
2998
|
+
reading: "what the reader could not make sense of \u2014 lines it failed to parse, files it could not open, and prompts it judged machine-written rather than typed"
|
|
2999
|
+
};
|
|
3000
|
+
exports.ALWAYS_SENT = ["session", "counts", "tools", "outcome", "repo", "clock"];
|
|
3001
|
+
exports.REFUSALS = [
|
|
3002
|
+
"Never your prompts, your agent's replies, or anything inside a file.",
|
|
3003
|
+
"Never a file path, a command line, or a repository or branch name.",
|
|
3004
|
+
"Content is read here only to choose one of a fixed set of labels, then discarded. No mapper writes it to an event, and a test fails the build if one starts."
|
|
3005
|
+
];
|
|
3006
|
+
exports.FREE_TEXT_KEYS = ["message"];
|
|
3007
|
+
function renderSetupDisclosure({ sends, displayName }) {
|
|
3008
|
+
const declared = /* @__PURE__ */ new Set([...exports.ALWAYS_SENT, ...sends]);
|
|
3009
|
+
const ordered = Object.keys(exports.FAMILY_SENTENCES).filter((family) => declared.has(family));
|
|
3010
|
+
const lines = [
|
|
3011
|
+
`What this sends from ${displayName}, once paired:`,
|
|
3012
|
+
...ordered.map((family) => ` \xB7 ${exports.FAMILY_SENTENCES[family]}`),
|
|
3013
|
+
"",
|
|
3014
|
+
...exports.REFUSALS.map((line) => ` ${line}`),
|
|
3015
|
+
"",
|
|
3016
|
+
" Turn it off by revoking this tool in the Ascenda app."
|
|
3017
|
+
];
|
|
3018
|
+
return lines.join("\n");
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
});
|
|
3022
|
+
|
|
2845
3023
|
// ../packages/tool-kit/out/cliAgentSetup.js
|
|
2846
3024
|
var require_cliAgentSetup = __commonJS({
|
|
2847
3025
|
"../packages/tool-kit/out/cliAgentSetup.js"(exports) {
|
|
@@ -2893,9 +3071,11 @@ var require_cliAgentSetup = __commonJS({
|
|
|
2893
3071
|
var fs = __importStar(__require("fs"));
|
|
2894
3072
|
var os = __importStar(__require("os"));
|
|
2895
3073
|
var path = __importStar(__require("path"));
|
|
3074
|
+
var collectorVersion_1 = require_collectorVersion();
|
|
2896
3075
|
var credentials_1 = require_credentials();
|
|
2897
3076
|
var hookAdapter_1 = require_hookAdapter();
|
|
2898
3077
|
var http_1 = require_http();
|
|
3078
|
+
var setupDisclosure_1 = require_setupDisclosure();
|
|
2899
3079
|
var tokenStore_1 = require_tokenStore();
|
|
2900
3080
|
var MANAGEMENT_COMMANDS = /* @__PURE__ */ new Set(["setup", "install", "status", "uninstall", "-h", "--help"]);
|
|
2901
3081
|
function isCliAgentManagementCommand(argument) {
|
|
@@ -2916,6 +3096,7 @@ Options
|
|
|
2916
3096
|
--local [port] shorthand for the local dev server (default port 4477)
|
|
2917
3097
|
--tool-installation-id <id> reuse an existing pairing instead of creating one
|
|
2918
3098
|
--token <eventWriteToken> reuse an existing token (stored 0600, never printed)
|
|
3099
|
+
--no-pair install without pairing: local features on, nothing sent
|
|
2919
3100
|
--scope project|user where hooks are registered (default project)
|
|
2920
3101
|
--project-dir <path> project root for --scope project (default cwd)
|
|
2921
3102
|
--dry-run print what would change, write nothing
|
|
@@ -2940,14 +3121,35 @@ Options
|
|
|
2940
3121
|
return uninstall(options, spec);
|
|
2941
3122
|
const apiBaseUrl = (options.apiBaseUrl ?? (0, credentials_1.readHostCredentials)(spec.host)?.apiBaseUrl ?? hookAdapter_1.DEFAULT_API_BASE_URL).replace(/\/$/, "");
|
|
2942
3123
|
console.log(`Ascenda setup for ${spec.displayName} \u2014 ${apiBaseUrl}`);
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
3124
|
+
console.log(`
|
|
3125
|
+
${(0, setupDisclosure_1.renderSetupDisclosure)({ sends: spec.sends, displayName: spec.displayName })}
|
|
3126
|
+
`);
|
|
3127
|
+
let identity;
|
|
3128
|
+
let unpairedReason;
|
|
3129
|
+
if (options.skipPairing) {
|
|
3130
|
+
unpairedReason = "asked not to pair (--no-pair)";
|
|
3131
|
+
} else {
|
|
3132
|
+
identity = await resolveIdentity(apiBaseUrl, options, spec);
|
|
3133
|
+
if (identity) {
|
|
3134
|
+
console.log(` pairing ${identity.toolInstallationId}${identity.paired ? " (new)" : " (existing)"}`);
|
|
3135
|
+
} else {
|
|
3136
|
+
unpairedReason = "pairing did not finish \u2014 installing the local half anyway";
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3139
|
+
if (unpairedReason) {
|
|
3140
|
+
console.log(` pairing none: ${unpairedReason}`);
|
|
3141
|
+
console.log(" local features on, nothing is sent");
|
|
3142
|
+
}
|
|
2947
3143
|
const binary = installBinary(spec, options.dryRun);
|
|
2948
3144
|
console.log(` hook binary ${binary}`);
|
|
2949
3145
|
if (!options.dryRun) {
|
|
2950
|
-
|
|
3146
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
3147
|
+
const toolInstallationId = identity?.toolInstallationId ?? options.toolInstallationId ?? (0, credentials_1.readHostCredentials)(spec.host)?.toolInstallationId ?? `${spec.toolType}:${crypto.randomUUID()}`;
|
|
3148
|
+
(0, credentials_1.writeHostCredentials)(spec.host, {
|
|
3149
|
+
apiBaseUrl,
|
|
3150
|
+
toolInstallationId,
|
|
3151
|
+
...identity ? { pairedAt: now } : { localOnly: true, installedAt: now }
|
|
3152
|
+
});
|
|
2951
3153
|
}
|
|
2952
3154
|
console.log(` credentials ${(0, credentials_1.credentialsFilePath)()} (tools.${spec.host})`);
|
|
2953
3155
|
const settingsFile = spec.settings.settingsPath(options.scope, options.projectDir);
|
|
@@ -2961,6 +3163,9 @@ Options
|
|
|
2961
3163
|
}
|
|
2962
3164
|
console.log(`
|
|
2963
3165
|
Done. ${spec.restartHint}`);
|
|
3166
|
+
if (!identity) {
|
|
3167
|
+
console.log(`Pair later: npx ${spec.packageName} setup`);
|
|
3168
|
+
}
|
|
2964
3169
|
console.log(`Check anytime: npx ${spec.packageName} status`);
|
|
2965
3170
|
return 0;
|
|
2966
3171
|
}
|
|
@@ -2969,6 +3174,7 @@ Done. ${spec.restartHint}`);
|
|
|
2969
3174
|
scope: "project",
|
|
2970
3175
|
projectDir: process.cwd(),
|
|
2971
3176
|
dryRun: false,
|
|
3177
|
+
skipPairing: false,
|
|
2972
3178
|
action: "install"
|
|
2973
3179
|
};
|
|
2974
3180
|
for (let i = 0; i < argv.length; i++) {
|
|
@@ -3018,6 +3224,14 @@ Done. ${spec.restartHint}`);
|
|
|
3018
3224
|
case "--dry-run":
|
|
3019
3225
|
options.dryRun = true;
|
|
3020
3226
|
break;
|
|
3227
|
+
case "--no-pair":
|
|
3228
|
+
// `--no-pairing` is the spelling this landed under first. Both appeared
|
|
3229
|
+
// only in an unreleased changelog, so this alias exists to spare anyone
|
|
3230
|
+
// reading that draft, and `--no-pair` — the Claude Code adapter's own
|
|
3231
|
+
// spelling — is the documented one.
|
|
3232
|
+
case "--no-pairing":
|
|
3233
|
+
options.skipPairing = true;
|
|
3234
|
+
break;
|
|
3021
3235
|
case "-h":
|
|
3022
3236
|
case "--help":
|
|
3023
3237
|
options.action = "help";
|
|
@@ -3169,9 +3383,11 @@ ${serialised}`);
|
|
|
3169
3383
|
const settings = readSettings(settingsFile);
|
|
3170
3384
|
const registered = spec.hookEvents.filter((event) => (settings.hooks?.[event] ?? []).some((entry) => isOurs(entry, spec))).length;
|
|
3171
3385
|
const stale = findStaleHookCommands(settings, binary, spec);
|
|
3386
|
+
const localOnly = (0, credentials_1.isLocalOnlyHostInstall)(spec.host, (id) => (0, tokenStore_1.readTokenFile)((0, tokenStore_1.defaultTokenFilePath)(id)) !== void 0);
|
|
3387
|
+
console.log(`version ${(0, collectorVersion_1.describeCollectorVersion)()}`);
|
|
3172
3388
|
console.log(`api base url ${credentials?.apiBaseUrl ?? "\u2014 not configured"}`);
|
|
3173
|
-
console.log(`pairing ${credentials?.toolInstallationId ?? "\u2014 not paired"}`);
|
|
3174
|
-
console.log(`token ${tokenFile && (0, tokenStore_1.readTokenFile)(tokenFile) ? "present" : "\u2014 missing"}`);
|
|
3389
|
+
console.log(`pairing ${credentials?.toolInstallationId ?? "\u2014 not paired"}${localOnly ? " (installed, not paired \u2014 local features active, telemetry inactive)" : ""}`);
|
|
3390
|
+
console.log(`token ${localOnly ? "\u2014 none needed until this install is paired" : tokenFile && (0, tokenStore_1.readTokenFile)(tokenFile) ? "present" : "\u2014 missing"}`);
|
|
3175
3391
|
console.log(`hook binary ${fs.existsSync(binary) ? binary : "\u2014 not installed"}`);
|
|
3176
3392
|
console.log(`hooks ${registered}/${spec.hookEvents.length} registered in ${settingsFile}`);
|
|
3177
3393
|
if (stale.length) {
|
|
@@ -3180,7 +3396,8 @@ ${serialised}`);
|
|
|
3180
3396
|
console.log(` ${command}`);
|
|
3181
3397
|
console.log(` Remove them from ${settingsFile} by hand; setup cannot tell them from a hook you wrote.`);
|
|
3182
3398
|
}
|
|
3183
|
-
const
|
|
3399
|
+
const paired = localOnly || credentials?.toolInstallationId !== void 0;
|
|
3400
|
+
const healthy = paired && registered === spec.hookEvents.length && fs.existsSync(binary) && !stale.length;
|
|
3184
3401
|
return healthy ? 0 : 1;
|
|
3185
3402
|
}
|
|
3186
3403
|
function uninstall(options, spec) {
|
|
@@ -3367,16 +3584,20 @@ var require_liveBus = __commonJS({
|
|
|
3367
3584
|
path.join(home, "Library", "Containers", SAVER_HOST_BUNDLE_ID, "Data", "l.sock")
|
|
3368
3585
|
];
|
|
3369
3586
|
}
|
|
3370
|
-
function
|
|
3587
|
+
function existingSocketCandidates() {
|
|
3371
3588
|
const candidates = liveBusSocketCandidates();
|
|
3372
|
-
|
|
3589
|
+
if (process.env.ASCENDA_LIVE_BUS_SOCKET)
|
|
3590
|
+
return candidates;
|
|
3591
|
+
return candidates.filter((candidate) => {
|
|
3373
3592
|
try {
|
|
3374
|
-
|
|
3375
|
-
return candidate;
|
|
3593
|
+
return fs.statSync(candidate).isSocket();
|
|
3376
3594
|
} catch {
|
|
3595
|
+
return false;
|
|
3377
3596
|
}
|
|
3378
|
-
}
|
|
3379
|
-
|
|
3597
|
+
});
|
|
3598
|
+
}
|
|
3599
|
+
function liveBusSocketPath() {
|
|
3600
|
+
return existingSocketCandidates()[0] ?? liveBusSocketCandidates()[0];
|
|
3380
3601
|
}
|
|
3381
3602
|
function bucketPromptSize(text) {
|
|
3382
3603
|
const length = typeof text === "string" ? text.length : 0;
|
|
@@ -3388,44 +3609,75 @@ var require_liveBus = __commonJS({
|
|
|
3388
3609
|
return "l";
|
|
3389
3610
|
return "xl";
|
|
3390
3611
|
}
|
|
3612
|
+
var NOBODY_LISTENING = /* @__PURE__ */ new Set(["ECONNREFUSED", "ENOENT"]);
|
|
3391
3613
|
function emitLiveSignal(signal) {
|
|
3392
3614
|
return new Promise((resolve) => {
|
|
3615
|
+
const candidates = existingSocketCandidates();
|
|
3616
|
+
if (candidates.length === 0) {
|
|
3617
|
+
resolve();
|
|
3618
|
+
return;
|
|
3619
|
+
}
|
|
3393
3620
|
let settled = false;
|
|
3621
|
+
let socket;
|
|
3622
|
+
const drop = () => {
|
|
3623
|
+
try {
|
|
3624
|
+
socket?.destroy();
|
|
3625
|
+
} catch {
|
|
3626
|
+
}
|
|
3627
|
+
socket = void 0;
|
|
3628
|
+
};
|
|
3394
3629
|
const done = () => {
|
|
3395
3630
|
if (settled)
|
|
3396
3631
|
return;
|
|
3397
3632
|
settled = true;
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
} catch {
|
|
3401
|
-
}
|
|
3633
|
+
clearTimeout(timer);
|
|
3634
|
+
drop();
|
|
3402
3635
|
resolve();
|
|
3403
3636
|
};
|
|
3404
|
-
let socket;
|
|
3405
|
-
try {
|
|
3406
|
-
socket = net.createConnection(liveBusSocketPath());
|
|
3407
|
-
} catch {
|
|
3408
|
-
resolve();
|
|
3409
|
-
return;
|
|
3410
|
-
}
|
|
3411
3637
|
const timer = setTimeout(done, WRITE_TIMEOUT_MS);
|
|
3412
3638
|
if (typeof timer.unref === "function")
|
|
3413
3639
|
timer.unref();
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3640
|
+
const tryFrom = (index) => {
|
|
3641
|
+
if (settled)
|
|
3642
|
+
return;
|
|
3643
|
+
if (index >= candidates.length) {
|
|
3644
|
+
done();
|
|
3645
|
+
return;
|
|
3646
|
+
}
|
|
3647
|
+
let attempt;
|
|
3418
3648
|
try {
|
|
3419
|
-
|
|
3420
|
-
`, () => {
|
|
3421
|
-
clearTimeout(timer);
|
|
3422
|
-
done();
|
|
3423
|
-
});
|
|
3649
|
+
attempt = net.createConnection(candidates[index]);
|
|
3424
3650
|
} catch {
|
|
3425
|
-
|
|
3426
|
-
|
|
3651
|
+
tryFrom(index + 1);
|
|
3652
|
+
return;
|
|
3427
3653
|
}
|
|
3428
|
-
|
|
3654
|
+
socket = attempt;
|
|
3655
|
+
if (typeof attempt.unref === "function")
|
|
3656
|
+
attempt.unref();
|
|
3657
|
+
let connected = false;
|
|
3658
|
+
attempt.on("error", (error2) => {
|
|
3659
|
+
if (settled || socket !== attempt)
|
|
3660
|
+
return;
|
|
3661
|
+
if (!connected && error2.code && NOBODY_LISTENING.has(error2.code)) {
|
|
3662
|
+
drop();
|
|
3663
|
+
tryFrom(index + 1);
|
|
3664
|
+
return;
|
|
3665
|
+
}
|
|
3666
|
+
done();
|
|
3667
|
+
});
|
|
3668
|
+
attempt.on("connect", () => {
|
|
3669
|
+
if (settled || socket !== attempt)
|
|
3670
|
+
return;
|
|
3671
|
+
connected = true;
|
|
3672
|
+
try {
|
|
3673
|
+
attempt.write(`${JSON.stringify(signal)}
|
|
3674
|
+
`, done);
|
|
3675
|
+
} catch {
|
|
3676
|
+
done();
|
|
3677
|
+
}
|
|
3678
|
+
});
|
|
3679
|
+
};
|
|
3680
|
+
tryFrom(0);
|
|
3429
3681
|
});
|
|
3430
3682
|
}
|
|
3431
3683
|
}
|
|
@@ -3436,9 +3688,9 @@ var require_out2 = __commonJS({
|
|
|
3436
3688
|
"../packages/tool-kit/out/index.js"(exports) {
|
|
3437
3689
|
"use strict";
|
|
3438
3690
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3439
|
-
exports.
|
|
3440
|
-
exports.
|
|
3441
|
-
exports.isRetryableStatus = exports.parseIngestResponse = exports.postToolEventsBatch = exports.postToolEvent = exports.renewToolToken = void 0;
|
|
3691
|
+
exports.renderSetupDisclosure = exports.REFUSALS = exports.FREE_TEXT_KEYS = exports.FAMILY_SENTENCES = exports.ALWAYS_SENT = exports.writeHookSettings = exports.runCliAgentSetup = exports.isCliAgentManagementCommand = exports.findStaleHookCommands = exports.cliAgentHookBinPath = exports.resolveContextHashes = exports.resolveCliAgentInstallationId = exports.loadCliAgentConfig = exports.deliverHookEvents = exports.MissingInstallationIdError = exports.DEFAULT_API_BASE_URL = exports.resolveEventLogPath = exports.expandUserPath = exports.appendEventLog = exports.EVENT_LOG_ENV_VAR = exports.buildEventPayload = exports.AscendaSemanticEventError = exports.AscendaEventSender = exports.describeCollectorVersion = exports.UNRELEASED_COLLECTOR_VERSION = exports.COLLECTOR_VERSION = exports.mintIdempotencyKey = exports.looksLikeCorrection = exports.outcomeForHook = exports.inferOutcome = exports.getNestedNumber = exports.getNestedString = exports.getNested = exports.getNumber = exports.getString = exports.localHourAt = exports.utcOffsetMinutesAt = exports.BUSINESS_DAY = exports.isOutsideBusinessHours = exports.isAfterHours = exports.bucketDurationMs = exports.bucketLinesChanged = exports.classifyModelClass = exports.autonomyBand = exports.invitesDebrief = exports.classifyWorkMilestone = exports.isReworkGitAction = exports.classifyGitAction = exports.isVerificationCommand = exports.classifyCommand = void 0;
|
|
3692
|
+
exports.readForgeFullName = exports.parseForgeFullName = exports.forgeProjectHash = exports.workContextRegistryFilePath = exports.readWorkContextRegistry = exports.recordWorkContextAlias = exports.recordWorkContext = exports.readBranchName = exports.normalizeBranchName = exports.deriveBranchHashForCwd = exports.deriveBranchHash = exports.deriveWorkContext = exports.hashWithMachineSalt = exports.readOrCreateMachineSalt = exports.machineSaltFilePath = exports.fixedTimeProvider = exports.systemTimeProvider = exports.enforceOutboxBounds = exports.claimOutbox = exports.readOutboxSummary = exports.appendToOutbox = exports.defaultOutboxFilePath = exports.outboxDrainEnabled = exports.DEFAULT_OUTBOX_DRAIN_BATCH_SIZE = exports.DEFAULT_OUTBOX_MAX_AGE_MS = exports.DEFAULT_OUTBOX_MAX_ENTRIES = exports.OUTBOX_DRAIN_ENV_VAR = exports.recordOutboxDiscard = exports.unresolvedToolInstallationId = exports.unresolvedStateFilePath = exports.markFailureNotified = exports.shouldAnnounceFailure = exports.recordSendOutcome = exports.readCollectorState = exports.defaultStateFilePath = exports.readTokenFile = exports.persistEventWriteToken = exports.listPersistedToolInstallationIds = exports.defaultTokenFilePath = exports.ascendaHome = exports.recordTurnStart = exports.consumeTurnDurationMs = exports.writeTopLevelCredentials = exports.writeMachineCredentials = exports.writeHostCredentials = exports.removeHostCredentials = exports.readMachineCredentials = exports.readHostCredentials = exports.isLocalOnlyHostInstall = exports.credentialsFilePath = void 0;
|
|
3693
|
+
exports.isRetryableStatus = exports.parseIngestResponse = exports.postToolEventsBatch = exports.postToolEvent = exports.renewToolToken = exports.getPairingStatus = exports.createPairingSession = exports.AscendaApiError = exports.liveBusSocketCandidates = exports.liveBusSocketPath = exports.bucketPromptSize = exports.emitLiveSignal = exports.recordForgeProjectAlias = exports.forgeFullNameFromConfig = void 0;
|
|
3442
3694
|
var commandClassifier_1 = require_commandClassifier();
|
|
3443
3695
|
Object.defineProperty(exports, "classifyCommand", { enumerable: true, get: function() {
|
|
3444
3696
|
return commandClassifier_1.classifyCommand;
|
|
@@ -3519,6 +3771,16 @@ var require_out2 = __commonJS({
|
|
|
3519
3771
|
Object.defineProperty(exports, "mintIdempotencyKey", { enumerable: true, get: function() {
|
|
3520
3772
|
return payload_1.mintIdempotencyKey;
|
|
3521
3773
|
} });
|
|
3774
|
+
var collectorVersion_1 = require_collectorVersion();
|
|
3775
|
+
Object.defineProperty(exports, "COLLECTOR_VERSION", { enumerable: true, get: function() {
|
|
3776
|
+
return collectorVersion_1.COLLECTOR_VERSION;
|
|
3777
|
+
} });
|
|
3778
|
+
Object.defineProperty(exports, "UNRELEASED_COLLECTOR_VERSION", { enumerable: true, get: function() {
|
|
3779
|
+
return collectorVersion_1.UNRELEASED_COLLECTOR_VERSION;
|
|
3780
|
+
} });
|
|
3781
|
+
Object.defineProperty(exports, "describeCollectorVersion", { enumerable: true, get: function() {
|
|
3782
|
+
return collectorVersion_1.describeCollectorVersion;
|
|
3783
|
+
} });
|
|
3522
3784
|
var eventSender_1 = require_eventSender();
|
|
3523
3785
|
Object.defineProperty(exports, "AscendaEventSender", { enumerable: true, get: function() {
|
|
3524
3786
|
return eventSender_1.AscendaEventSender;
|
|
@@ -3577,10 +3839,29 @@ var require_out2 = __commonJS({
|
|
|
3577
3839
|
Object.defineProperty(exports, "writeHookSettings", { enumerable: true, get: function() {
|
|
3578
3840
|
return cliAgentSetup_1.writeHookSettings;
|
|
3579
3841
|
} });
|
|
3842
|
+
var setupDisclosure_1 = require_setupDisclosure();
|
|
3843
|
+
Object.defineProperty(exports, "ALWAYS_SENT", { enumerable: true, get: function() {
|
|
3844
|
+
return setupDisclosure_1.ALWAYS_SENT;
|
|
3845
|
+
} });
|
|
3846
|
+
Object.defineProperty(exports, "FAMILY_SENTENCES", { enumerable: true, get: function() {
|
|
3847
|
+
return setupDisclosure_1.FAMILY_SENTENCES;
|
|
3848
|
+
} });
|
|
3849
|
+
Object.defineProperty(exports, "FREE_TEXT_KEYS", { enumerable: true, get: function() {
|
|
3850
|
+
return setupDisclosure_1.FREE_TEXT_KEYS;
|
|
3851
|
+
} });
|
|
3852
|
+
Object.defineProperty(exports, "REFUSALS", { enumerable: true, get: function() {
|
|
3853
|
+
return setupDisclosure_1.REFUSALS;
|
|
3854
|
+
} });
|
|
3855
|
+
Object.defineProperty(exports, "renderSetupDisclosure", { enumerable: true, get: function() {
|
|
3856
|
+
return setupDisclosure_1.renderSetupDisclosure;
|
|
3857
|
+
} });
|
|
3580
3858
|
var credentials_1 = require_credentials();
|
|
3581
3859
|
Object.defineProperty(exports, "credentialsFilePath", { enumerable: true, get: function() {
|
|
3582
3860
|
return credentials_1.credentialsFilePath;
|
|
3583
3861
|
} });
|
|
3862
|
+
Object.defineProperty(exports, "isLocalOnlyHostInstall", { enumerable: true, get: function() {
|
|
3863
|
+
return credentials_1.isLocalOnlyHostInstall;
|
|
3864
|
+
} });
|
|
3584
3865
|
Object.defineProperty(exports, "readHostCredentials", { enumerable: true, get: function() {
|
|
3585
3866
|
return credentials_1.readHostCredentials;
|
|
3586
3867
|
} });
|
|
@@ -24951,7 +25232,7 @@ var inputShape = {
|
|
|
24951
25232
|
evidenceFlags: external_exports.record(evidenceKeySchema, external_exports.boolean()).optional().describe('Named booleans, e.g. { "originalGoalRetained": false }. No free text.')
|
|
24952
25233
|
};
|
|
24953
25234
|
function buildServer(config2) {
|
|
24954
|
-
const server = new McpServer({ name: "ascenda-agent-mcp", version:
|
|
25235
|
+
const server = new McpServer({ name: "ascenda-agent-mcp", version: import_tool_kit2.COLLECTOR_VERSION });
|
|
24955
25236
|
const sender = new import_tool_kit2.AscendaEventSender({
|
|
24956
25237
|
apiBaseUrl: config2.apiBaseUrl,
|
|
24957
25238
|
toolInstallationId: config2.toolInstallationId,
|
package/dist/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
import { AscendaEventSender, bucketDurationMs } from "@ascenda-one/tool-kit";
|
|
2
|
+
import { AscendaEventSender, COLLECTOR_VERSION, bucketDurationMs } from "@ascenda-one/tool-kit";
|
|
3
3
|
import { SEMANTIC_WORK_SIGNAL_EVENT_TYPES } from "@ascenda-one/tool-contract";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
/**
|
|
@@ -70,7 +70,7 @@ const inputShape = {
|
|
|
70
70
|
.describe('Named booleans, e.g. { "originalGoalRetained": false }. No free text.')
|
|
71
71
|
};
|
|
72
72
|
export function buildServer(config) {
|
|
73
|
-
const server = new McpServer({ name: "ascenda-agent-mcp", version:
|
|
73
|
+
const server = new McpServer({ name: "ascenda-agent-mcp", version: COLLECTOR_VERSION });
|
|
74
74
|
const sender = new AscendaEventSender({
|
|
75
75
|
apiBaseUrl: config.apiBaseUrl,
|
|
76
76
|
toolInstallationId: config.toolInstallationId,
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,EAAmD,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC/H,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;GAIG;AACH,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC;IACrC,cAAc;IACd,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,gBAAgB;IAChB,qBAAqB;IACrB,oBAAoB;IACpB,cAAc;IACd,SAAS;IACT,SAAS;IACT,aAAa;IACb,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,SAAS;IACT,MAAM;IACN,UAAU;IACV,WAAW;IACX,kBAAkB;CACnB,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AAEtD,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAC5B,gCAAoE,CACrE,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,oBAAoB,EAAE,0CAA0C,CAAC,CAAC;AAE7G,MAAM,UAAU,GAAG;IACjB,SAAS,EAAE,eAAe,CAAC,QAAQ,CACjC,wEAAwE;QACtE,qEAAqE;QACrE,wCAAwC,CAC3C;IACD,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,KAAK,CAAC,kCAAkC,EAAE,sCAAsC,CAAC;SACjF,QAAQ,CACP,uEAAuE;QACrE,qEAAqE;QACrE,qEAAqE;QACrE,mDAAmD,CACtD;IACH,eAAe,EAAE,CAAC;SACf,MAAM,EAAE;SACR,KAAK,CAAC,oBAAoB,EAAE,6CAA6C,CAAC;SAC1E,QAAQ,EAAE;SACV,QAAQ,CAAC,oGAAoG,CAAC;IACjH,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,GAAG,CAAC,IAAI,CAAC;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,8FAA8F,CAAC;IAC3G,cAAc,EAAE,CAAC;SACd,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC;SAC3C,QAAQ,EAAE;SACV,QAAQ,CAAC,2FAA2F,CAAC;IACxG,aAAa,EAAE,CAAC;SACb,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;SACtC,QAAQ,EAAE;SACV,QAAQ,CAAC,uEAAuE,CAAC;CACrF,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,MAAwB;IAClD,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAC;IACxF,MAAM,MAAM,GAAG,IAAI,kBAAkB,CAAC;QACpC,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;QAC7C,MAAM,EAAE,YAAY;QACpB,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IAEH,MAAM,CAAC,YAAY,CACjB,0BAA0B,EAC1B;QACE,KAAK,EAAE,sCAAsC;QAC7C,WAAW,EACT,4EAA4E;YAC5E,+EAA+E;YAC/E,+EAA+E;YAC/E,gFAAgF;YAChF,2EAA2E;YAC3E,6EAA6E;YAC7E,8EAA8E;YAC9E,qBAAqB;QACvB,WAAW,EAAE,UAAU;KACxB,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,KAAK,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;YACxG,IAAI,sBAAsB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACpC,OAAO,WAAW,CAAC,IAAI,GAAG,4EAA4E,CAAC,CAAC;YAC1G,CAAC;QACH,CAAC;QAED,MAAM,cAAc,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACtG,MAAM,QAAQ,GAAoD;YAChE,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1E,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7C,GAAG,CAAC,IAAI,CAAC,cAAc,IAAI,EAAE,CAAC;YAC9B,GAAG,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC;SAC9B,CAAC;QAEF,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC;gBAC7C,SAAS,EAAE,IAAI,CAAC,SAAsC;gBACtD,QAAQ;aACT,CAAC,CAAC;YACH,IAAI,MAAM,KAAK,UAAU,EAAE,CAAC;gBAC1B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;YAC3D,CAAC;YACD,IAAI,MAAM,KAAK,iBAAiB,EAAE,CAAC;gBACjC,OAAO,WAAW,CAChB,wEAAwE;oBACtE,mEAAmE,CACtE,CAAC;YACJ,CAAC;YACD,IAAI,MAAM,KAAK,aAAa,EAAE,CAAC;gBAC7B,OAAO,WAAW,CAAC,wFAAwF,CAAC,CAAC;YAC/G,CAAC;YACD,OAAO,WAAW,CAAC,0BAA0B,MAAM,GAAG,CAAC,CAAC;QAC1D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7E,CAAC;IACH,CAAC,CACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,WAAW,CAAC,OAAe;IAClC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACvE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"publishConfig": { "access": "public" },
|
|
3
3
|
"name": "@ascenda-one/agent-mcp",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.28",
|
|
5
5
|
"description": "MCP server exposing ascenda_emit_work_signal — the one submission interface for agent-observed (semantic) work-friction signals.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "tsc -p ./ && npm run bundle",
|
|
18
18
|
"watch": "tsc -w -p ./",
|
|
19
|
-
"bundle": "esbuild src/cli.ts --bundle --platform=node --format=esm --banner:js=\"import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);\" --outfile=dist/cli.js",
|
|
19
|
+
"bundle": "node ../scripts/esbuild-collector.mjs src/cli.ts --bundle --platform=node --format=esm --banner:js=\"import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);\" --outfile=dist/cli.js",
|
|
20
20
|
"test": "npm run build && node --test tests/*.test.mjs"
|
|
21
21
|
},
|
|
22
22
|
"license": "Apache-2.0",
|