@ascenda-one/agent-mcp 0.1.36 → 0.1.37
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 +115 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1147,7 +1147,7 @@ var require_collectorVersion = __commonJS({
|
|
|
1147
1147
|
exports.COLLECTOR_VERSION = exports.UNRELEASED_COLLECTOR_VERSION = void 0;
|
|
1148
1148
|
exports.describeCollectorVersion = describeCollectorVersion;
|
|
1149
1149
|
exports.UNRELEASED_COLLECTOR_VERSION = "unreleased";
|
|
1150
|
-
exports.COLLECTOR_VERSION = "0.1.
|
|
1150
|
+
exports.COLLECTOR_VERSION = "0.1.37" ? "0.1.37" : exports.UNRELEASED_COLLECTOR_VERSION;
|
|
1151
1151
|
function describeCollectorVersion(version2 = exports.COLLECTOR_VERSION) {
|
|
1152
1152
|
return version2 === exports.UNRELEASED_COLLECTOR_VERSION ? `${version2} (built from a checkout, not a release)` : version2;
|
|
1153
1153
|
}
|
|
@@ -6413,6 +6413,100 @@ var require_turnState = __commonJS({
|
|
|
6413
6413
|
}
|
|
6414
6414
|
});
|
|
6415
6415
|
|
|
6416
|
+
// ../packages/tool-kit/out/pluginBundle.js
|
|
6417
|
+
var require_pluginBundle = __commonJS({
|
|
6418
|
+
"../packages/tool-kit/out/pluginBundle.js"(exports) {
|
|
6419
|
+
"use strict";
|
|
6420
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
6421
|
+
if (k2 === void 0) k2 = k;
|
|
6422
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6423
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6424
|
+
desc = { enumerable: true, get: function() {
|
|
6425
|
+
return m[k];
|
|
6426
|
+
} };
|
|
6427
|
+
}
|
|
6428
|
+
Object.defineProperty(o, k2, desc);
|
|
6429
|
+
} : function(o, m, k, k2) {
|
|
6430
|
+
if (k2 === void 0) k2 = k;
|
|
6431
|
+
o[k2] = m[k];
|
|
6432
|
+
});
|
|
6433
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
6434
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
6435
|
+
} : function(o, v) {
|
|
6436
|
+
o["default"] = v;
|
|
6437
|
+
});
|
|
6438
|
+
var __importStar = exports && exports.__importStar || /* @__PURE__ */ function() {
|
|
6439
|
+
var ownKeys = function(o) {
|
|
6440
|
+
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
6441
|
+
var ar = [];
|
|
6442
|
+
for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
|
|
6443
|
+
return ar;
|
|
6444
|
+
};
|
|
6445
|
+
return ownKeys(o);
|
|
6446
|
+
};
|
|
6447
|
+
return function(mod) {
|
|
6448
|
+
if (mod && mod.__esModule) return mod;
|
|
6449
|
+
var result = {};
|
|
6450
|
+
if (mod != null) {
|
|
6451
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
6452
|
+
}
|
|
6453
|
+
__setModuleDefault(result, mod);
|
|
6454
|
+
return result;
|
|
6455
|
+
};
|
|
6456
|
+
}();
|
|
6457
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6458
|
+
exports.pluginBundlePaths = pluginBundlePaths2;
|
|
6459
|
+
exports.installPluginBundle = installPluginBundle2;
|
|
6460
|
+
exports.describePluginBundleOutcome = describePluginBundleOutcome2;
|
|
6461
|
+
var fs = __importStar(__require("fs"));
|
|
6462
|
+
var path = __importStar(__require("path"));
|
|
6463
|
+
var collectorVersion_1 = require_collectorVersion();
|
|
6464
|
+
var hookRunner_1 = require_hookRunner();
|
|
6465
|
+
var tokenStore_1 = require_tokenStore();
|
|
6466
|
+
function pluginBundlePaths2(name) {
|
|
6467
|
+
const base = path.join((0, tokenStore_1.ascendaHome)(), "plugin", name);
|
|
6468
|
+
return { bundle: `${base}.mjs`, version: `${base}.version`, checked: `${base}.checked` };
|
|
6469
|
+
}
|
|
6470
|
+
function installPluginBundle2(options) {
|
|
6471
|
+
const paths = pluginBundlePaths2(options.name);
|
|
6472
|
+
const source = path.resolve(options.source ?? process.argv[1]);
|
|
6473
|
+
const incoming = options.version ?? collectorVersion_1.COLLECTOR_VERSION;
|
|
6474
|
+
const installed = readVersion(paths.version);
|
|
6475
|
+
const present = fs.existsSync(paths.bundle);
|
|
6476
|
+
if (source === path.resolve(paths.bundle))
|
|
6477
|
+
return { kind: "current", version: installed ?? incoming };
|
|
6478
|
+
if (present && installed && (0, hookRunner_1.isDowngrade)(installed, incoming))
|
|
6479
|
+
return { kind: "kept-newer", installed, incoming };
|
|
6480
|
+
const contents = fs.readFileSync(source);
|
|
6481
|
+
if (present && installed === incoming && contents.equals(fs.readFileSync(paths.bundle))) {
|
|
6482
|
+
return { kind: "current", version: incoming };
|
|
6483
|
+
}
|
|
6484
|
+
fs.mkdirSync(path.dirname(paths.bundle), { recursive: true });
|
|
6485
|
+
(0, hookRunner_1.writeAtomically)(paths.bundle, contents, 420);
|
|
6486
|
+
(0, hookRunner_1.writeAtomically)(paths.version, `${incoming}
|
|
6487
|
+
`, 420);
|
|
6488
|
+
return present && installed ? { kind: "installed", version: incoming, replaced: installed } : { kind: "installed", version: incoming };
|
|
6489
|
+
}
|
|
6490
|
+
function describePluginBundleOutcome2(outcome, bundle) {
|
|
6491
|
+
switch (outcome.kind) {
|
|
6492
|
+
case "installed":
|
|
6493
|
+
return outcome.replaced && outcome.replaced !== outcome.version ? `Updated the plugin's bundle from ${outcome.replaced} to ${outcome.version}: ${bundle}` : `Installed the plugin's bundle (${outcome.version}): ${bundle}`;
|
|
6494
|
+
case "current":
|
|
6495
|
+
return `The plugin's bundle is already ${outcome.version}: ${bundle}`;
|
|
6496
|
+
case "kept-newer":
|
|
6497
|
+
return `Kept the plugin's bundle at ${outcome.installed}. This copy is the older ${outcome.incoming}.`;
|
|
6498
|
+
}
|
|
6499
|
+
}
|
|
6500
|
+
function readVersion(file) {
|
|
6501
|
+
try {
|
|
6502
|
+
return fs.readFileSync(file, "utf8").trim() || void 0;
|
|
6503
|
+
} catch {
|
|
6504
|
+
return void 0;
|
|
6505
|
+
}
|
|
6506
|
+
}
|
|
6507
|
+
}
|
|
6508
|
+
});
|
|
6509
|
+
|
|
6416
6510
|
// ../packages/tool-kit/out/agentProcess.js
|
|
6417
6511
|
var require_agentProcess = __commonJS({
|
|
6418
6512
|
"../packages/tool-kit/out/agentProcess.js"(exports) {
|
|
@@ -6560,8 +6654,8 @@ var require_out3 = __commonJS({
|
|
|
6560
6654
|
exports.resolveEventLog = exports.parseEventLogFlag = exports.expandUserPath = exports.describeEventLog = exports.defaultEventLogPath = exports.appendEventLog = exports.EVENT_LOG_OFF = exports.EVENT_LOG_ENV_VAR = exports.toAgentEvent = exports.buildEventPayload = exports.buildEventBody = exports.TOKEN_RENEW_LEAD_MS = exports.AscendaSemanticEventError = exports.AscendaEventSender = exports.startBackgroundFlush = exports.runOutboxFlush = exports.hookDeliveryInline = exports.flushLockPath = exports.OUTBOX_FLUSH_COMMAND = exports.HOOK_DELIVERY_ENV_VAR = exports.FLUSH_LOCK_FRESH_MS = 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.shellCommandFacts = exports.invitesDebrief = exports.classifyMcpWorkMilestone = exports.classifyWorkMilestone = exports.isReworkGitAction = exports.classifyGitAction = exports.isVerificationCommand = exports.classifyCommand = void 0;
|
|
6561
6655
|
exports.unresolvedStateFilePath = exports.markFailureNotified = exports.shouldAnnounceFailure = exports.recordSendOutcome = exports.readCollectorState = exports.defaultStateFilePath = exports.tokenExpiryFilePath = exports.readTokenFile = exports.readTokenExpiry = exports.persistEventWriteToken = exports.listPersistedToolInstallationIds = exports.defaultTokenFilePath = exports.ascendaHome = exports.EVENT_TOKEN_TTL_MS = exports.recordTurnStart = exports.readTurnPromptId = exports.consumeTurnDurationMs = exports.writeTopLevelCredentials = exports.writeMachineCredentials = exports.writeRepoKeysSetting = exports.writeEventLogSetting = exports.writeHostCredentials = exports.removeHostCredentials = exports.readMachineCredentials = exports.readHostCredentials = exports.isLocalOnlyHostInstall = exports.credentialsFilePath = exports.renderSetupDisclosure = exports.REFUSALS = exports.FREE_TEXT_KEYS = exports.FAMILY_SENTENCES = exports.ALWAYS_SENT = exports.writeHookSettings = exports.trustProblemLines = exports.runCliAgentSetup = exports.registeredHookSets = exports.ourHookPositions = exports.isCliAgentManagementCommand = exports.findStaleHookCommands = exports.cliAgentHookBinPath = exports.resolveContextHashes = exports.resolveCliAgentInstallationId = exports.withPromptId = exports.withForgeKeys = exports.loadCliAgentConfig = exports.flushHookOutbox = exports.deliverHookEvents = exports.MissingInstallationIdError = exports.DEFAULT_API_BASE_URL = exports.resolveEventLogPath = void 0;
|
|
6562
6656
|
exports.saverSupportDir = exports.saverStatusDir = exports.saverReplayPath = exports.saverContainerDir = exports.readSaverStatuses = exports.probeSocket = exports.heldForSaver = exports.holdForSaver = exports.LIVE_BUS_BACKGROUND_TRUST_MS = exports.liveBusSocketCandidates = exports.liveBusSocketPath = exports.bucketPromptSize = exports.deliverLine = exports.emitLiveSignal = exports.repoKeysEnabled = exports.deriveForgeKeysForCwd = exports.REPO_KEYS_ENV_VAR = exports.recordForgeProjectAlias = exports.forgeFullNameFromConfig = exports.readForgeFullName = exports.parseForgeFullName = exports.forgeBranchKey = exports.forgeRepoKey = 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 = void 0;
|
|
6563
|
-
exports.
|
|
6564
|
-
exports.runStudyJoin = exports.studyNoticeStatus = exports.runStudyObjection = exports.renderStudyNotices = exports.NOTICED_PURPOSES = exports.renderInitiatives = exports.initiativesStatusLines = exports.INITIATIVE_COPY = void 0;
|
|
6657
|
+
exports.readStudyNotices = exports.readInitiatives = exports.isRetryableStatus = exports.parseIngestResponse = exports.postToolEventsBatch = exports.postToolEvent = exports.renewToolToken = exports.getStudyJoinStatus = exports.getPairingStatus = exports.createPairingSession = exports.AscendaApiError = exports.scriptMarkerIn = exports.psLookup = exports.psArgsLookup = exports.livePidFields = exports.findAgentProcess = exports.findAgentPid = exports.AGENT_PROCESS = exports.readViaPlugin = exports.readHookSet = exports.isHookSet = exports.hookSetOfCommand = exports.hookSetChanges = exports.hookSetArgument = exports.describeHookSetChanges = exports.UNVERSIONED_HOOK_SET = exports.HOOK_SET_FLAG = exports.liveSignalDoctorLines = exports.doctorRow = exports.DOCTOR_VALUE_COLUMN = exports.pluginBundlePaths = exports.installPluginBundle = exports.describePluginBundleOutcome = exports.replaceSettingsFile = exports.writeAtomically = exports.tidyHomePath = exports.stampLastHook = exports.resolveHookNode = exports.removeHookRunner = exports.readLastHook = exports.lastHookPath = exports.isDowngrade = exports.installHookRunner = exports.hookRunnerPaths = exports.hookRunnerCommand = exports.hookLauncherScript = exports.describeAge = exports.terminalStyle = exports.colourEnabled = exports.SAVER_REPLAY_WINDOW_MS = void 0;
|
|
6658
|
+
exports.runStudyJoin = exports.studyNoticeStatus = exports.runStudyObjection = exports.renderStudyNotices = exports.NOTICED_PURPOSES = exports.renderInitiatives = exports.initiativesStatusLines = exports.INITIATIVE_COPY = exports.startStudyJoin = exports.setStudyObjection = exports.markStudyNoticeShown = void 0;
|
|
6565
6659
|
var commandClassifier_1 = require_commandClassifier();
|
|
6566
6660
|
Object.defineProperty(exports, "classifyCommand", { enumerable: true, get: function() {
|
|
6567
6661
|
return commandClassifier_1.classifyCommand;
|
|
@@ -7096,6 +7190,16 @@ var require_out3 = __commonJS({
|
|
|
7096
7190
|
Object.defineProperty(exports, "replaceSettingsFile", { enumerable: true, get: function() {
|
|
7097
7191
|
return settingsFile_1.replaceSettingsFile;
|
|
7098
7192
|
} });
|
|
7193
|
+
var pluginBundle_1 = require_pluginBundle();
|
|
7194
|
+
Object.defineProperty(exports, "describePluginBundleOutcome", { enumerable: true, get: function() {
|
|
7195
|
+
return pluginBundle_1.describePluginBundleOutcome;
|
|
7196
|
+
} });
|
|
7197
|
+
Object.defineProperty(exports, "installPluginBundle", { enumerable: true, get: function() {
|
|
7198
|
+
return pluginBundle_1.installPluginBundle;
|
|
7199
|
+
} });
|
|
7200
|
+
Object.defineProperty(exports, "pluginBundlePaths", { enumerable: true, get: function() {
|
|
7201
|
+
return pluginBundle_1.pluginBundlePaths;
|
|
7202
|
+
} });
|
|
7099
7203
|
var liveSignalDoctor_1 = require_liveSignalDoctor();
|
|
7100
7204
|
Object.defineProperty(exports, "DOCTOR_VALUE_COLUMN", { enumerable: true, get: function() {
|
|
7101
7205
|
return liveSignalDoctor_1.DOCTOR_VALUE_COLUMN;
|
|
@@ -20228,6 +20332,9 @@ var StdioServerTransport = class {
|
|
|
20228
20332
|
}
|
|
20229
20333
|
};
|
|
20230
20334
|
|
|
20335
|
+
// src/cli.ts
|
|
20336
|
+
var import_tool_kit3 = __toESM(require_out3(), 1);
|
|
20337
|
+
|
|
20231
20338
|
// src/config.ts
|
|
20232
20339
|
var import_tool_kit = __toESM(require_out3(), 1);
|
|
20233
20340
|
import { randomUUID } from "node:crypto";
|
|
@@ -28461,6 +28568,11 @@ function errorResult(message) {
|
|
|
28461
28568
|
|
|
28462
28569
|
// src/cli.ts
|
|
28463
28570
|
async function main() {
|
|
28571
|
+
if (process.argv[2] === "plugin-sync") {
|
|
28572
|
+
const outcome = (0, import_tool_kit3.installPluginBundle)({ name: "agent-mcp" });
|
|
28573
|
+
console.log((0, import_tool_kit3.describePluginBundleOutcome)(outcome, (0, import_tool_kit3.pluginBundlePaths)("agent-mcp").bundle));
|
|
28574
|
+
return;
|
|
28575
|
+
}
|
|
28464
28576
|
const config2 = loadConfigFromEnv();
|
|
28465
28577
|
const server = buildServer(config2);
|
|
28466
28578
|
const transport = new StdioServerTransport();
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,wEAAwE;IAC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EAA0E;IAC1E,wBAAwB;IACxB,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,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.37",
|
|
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",
|