mente-agent 0.11.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.
@@ -0,0 +1,59 @@
1
+ 'use strict';
2
+
3
+ function getExpectedPublishTag(version) {
4
+ if (!version || typeof version !== 'string') {
5
+ throw new Error('package version is required');
6
+ }
7
+ return `npm-v${version}`;
8
+ }
9
+
10
+ function validatePublishContext({
11
+ eventName,
12
+ refType,
13
+ refName,
14
+ packageName,
15
+ packageVersion,
16
+ expectedVersion,
17
+ } = {}) {
18
+ if (!packageName) {
19
+ throw new Error('package name is required');
20
+ }
21
+ if (!packageVersion) {
22
+ throw new Error('package version is required');
23
+ }
24
+
25
+ const expectedTag = getExpectedPublishTag(packageVersion);
26
+ if (expectedVersion && expectedVersion !== packageVersion) {
27
+ throw new Error(
28
+ `expected version ${expectedVersion} does not match package.json version ${packageVersion}`,
29
+ );
30
+ }
31
+
32
+ if (eventName === 'push' && refType === 'tag') {
33
+ if (refName !== expectedTag) {
34
+ throw new Error(
35
+ `release tag ${refName} does not match package.json version ${packageVersion}; expected ${expectedTag}`,
36
+ );
37
+ }
38
+ return {
39
+ mode: 'publish',
40
+ shouldPublish: true,
41
+ packageName,
42
+ packageVersion,
43
+ expectedTag,
44
+ };
45
+ }
46
+
47
+ return {
48
+ mode: 'preflight',
49
+ shouldPublish: false,
50
+ packageName,
51
+ packageVersion,
52
+ expectedTag,
53
+ };
54
+ }
55
+
56
+ module.exports = {
57
+ getExpectedPublishTag,
58
+ validatePublishContext,
59
+ };
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "mente-agent",
3
+ "version": "0.11.0",
4
+ "description": "Thin npm bootstrapper for Mente Agent. Installs and launches the full Mente runtime with a single global command.",
5
+ "scripts": {
6
+ "postinstall": "echo '✅ mente-agent bootstrapper installed. Run: mente'",
7
+ "test:npm-installer": "node --test tests/npm-installer/*.test.mjs",
8
+ "release:check:npm": "node scripts/validate-npm-publish.cjs --event workflow_dispatch"
9
+ },
10
+ "bin": {
11
+ "mente": "npm/installer/bin/mente.cjs",
12
+ "mente-agent": "npm/installer/bin/mente.cjs"
13
+ },
14
+ "files": [
15
+ "npm/installer/bin",
16
+ "npm/installer/lib",
17
+ "scripts/install.sh",
18
+ "scripts/install.ps1",
19
+ "scripts/install.cmd",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/chemany/Mente.git"
26
+ },
27
+ "license": "MIT",
28
+ "bugs": {
29
+ "url": "https://github.com/chemany/Mente/issues"
30
+ },
31
+ "homepage": "https://github.com/chemany/Mente#readme",
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "dependencies": {
36
+ "@askjo/camofox-browser": "^1.5.2",
37
+ "agent-browser": "^0.26.0"
38
+ },
39
+ "overrides": {
40
+ "lodash": "4.18.1"
41
+ },
42
+ "engines": {
43
+ "node": ">=20.0.0"
44
+ }
45
+ }
@@ -0,0 +1,28 @@
1
+ @echo off
2
+ REM ============================================================================
3
+ REM Mente Agent Installer for Windows (CMD wrapper)
4
+ REM ============================================================================
5
+ REM This batch file launches the PowerShell installer for users running CMD.
6
+ REM
7
+ REM Usage:
8
+ REM curl -fsSL https://raw.githubusercontent.com/chemany/Mente/main/scripts/install.cmd -o install.cmd && install.cmd && del install.cmd
9
+ REM
10
+ REM Or if you're already in PowerShell, use the direct command instead:
11
+ REM irm https://raw.githubusercontent.com/chemany/Mente/main/scripts/install.ps1 | iex
12
+ REM ============================================================================
13
+
14
+ echo.
15
+ echo Mente Agent Installer
16
+ echo Launching PowerShell installer...
17
+ echo.
18
+
19
+ powershell -ExecutionPolicy ByPass -NoProfile -Command "irm https://raw.githubusercontent.com/chemany/Mente/main/scripts/install.ps1 | iex"
20
+
21
+ if %ERRORLEVEL% NEQ 0 (
22
+ echo.
23
+ echo Installation failed. Please try running PowerShell directly:
24
+ echo powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/chemany/Mente/main/scripts/install.ps1 | iex"
25
+ echo.
26
+ pause
27
+ exit /b 1
28
+ )