sajimora 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -142,7 +142,7 @@ sajimora verify --fail-on-violation
142
142
  Predicts what will break *before* modifying code:
143
143
 
144
144
  ```bash
145
- sajimora what-if --target UserDto --field email --action REMOVE_FIELD
145
+ sajimora what-if --type UserDto --field email --mutation REMOVE_FIELD
146
146
  ```
147
147
 
148
148
  ### 4. `sajimora doctor` — Repository Diagnostics
package/bin/runner.cjs CHANGED
File without changes
File without changes
package/bin/sajimora.cjs CHANGED
File without changes
package/package.json CHANGED
@@ -1,18 +1,14 @@
1
1
  {
2
2
  "name": "sajimora",
3
- "version": "0.1.0",
4
- "description": "Deterministic cross-language API contract verification and AST guard for Java Spring Boot and TypeScript/Angular/React",
3
+ "version": "0.1.1",
4
+ "description": "Deterministic cross-language API contract verification and autonomous AST impact engine for Java Spring Boot and TypeScript/Angular/React",
5
5
  "private": false,
6
6
  "license": "SEE LICENSE IN LICENSE",
7
- "author": "Sajimora Team <dev@sajimora.com>",
8
7
  "repository": {
9
8
  "type": "git",
10
- "url": "git+https://github.com/sajimoraofficial/sajimora.git"
9
+ "url": "https://github.com/sajimoraofficial/sajimora.git"
11
10
  },
12
11
  "homepage": "https://sajimora.com",
13
- "bugs": {
14
- "url": "https://github.com/sajimoraofficial/sajimora/issues"
15
- },
16
12
  "keywords": [
17
13
  "mcp",
18
14
  "mcp-server",
@@ -32,17 +28,88 @@
32
28
  "files": [
33
29
  "bin/",
34
30
  "packaging/",
35
- "scripts/",
36
31
  "LICENSE",
37
32
  "THIRD-PARTY-NOTICES.md",
38
33
  "README.md",
39
34
  "smithery.yaml"
40
35
  ],
36
+ "workspaces": [
37
+ "packages/*"
38
+ ],
41
39
  "bin": {
42
- "sajimora": "bin/sajimora.cjs",
43
- "sajimora-mcp": "bin/sajimora-mcp.cjs"
40
+ "sajimora": "./bin/sajimora.cjs",
41
+ "sajimora-mcp": "./bin/sajimora-mcp.cjs"
44
42
  },
45
43
  "scripts": {
46
- "test": "node bin/sajimora.cjs --version"
44
+ "mcp:scoped": "node scripts/sajimora/mcpServer.cjs",
45
+ "test:mcp:scoped": "node scripts/sajimora/mcpServer.test.cjs",
46
+ "build": "tsc --noEmit --project tsconfig.json && esbuild scripts/sajimora/analyze.ts --bundle --platform=node --target=node20 --format=cjs --outfile=dist/analyze.cjs --external:tree-sitter --external:tree-sitter-java --external:@mapbox/node-pre-gyp --external:node-gyp-build",
47
+ "test": "npm run test:core && npm run test:production && npm run test:analysis && npm run test:phase3 && npm run test:phase4 && npm run test:change-intelligence && npm run test:impact && npm run test:cross-language",
48
+ "test:core": "node scripts/test-runtime/run-tsx.cjs packages/core/tests/sajimora/VerdictAuthority.test.ts packages/core/tests/sajimora/AuthorityGateGoldens.test.ts packages/core/tests/sajimora/CompletenessAlgebra.test.ts",
49
+ "test:production": "node scripts/test-runtime/run-tsx.cjs packages/core/tests/sajimora/ProductionVerificationCore.test.ts packages/analysis/tests/sajimora/TypeScriptGenericHardening.test.ts packages/analysis/tests/sajimora/TypeScriptProductionVerification.test.ts packages/analysis/tests/sajimora/TypeScriptProductionAdversarial.test.ts packages/analysis/tests/sajimora/TypeScriptPhase0Certification.test.ts packages/analysis/tests/sajimora/TypeScriptPhase1ASealedResolution.test.ts packages/analysis/tests/sajimora/TypeScriptPhase1BScopeIsolation.test.ts packages/analysis/tests/sajimora/TypeScriptPhase2ACallCompatibility.test.ts packages/analysis/tests/sajimora/TypeScriptPhase2BFiniteTypeReduction.test.ts packages/analysis/tests/sajimora/TypeScriptPhase3NonCallSpecializers.test.ts packages/analysis/tests/sajimora/TypeScriptPhase4OverloadCorrespondence.test.ts packages/analysis/tests/sajimora/TypeScriptPhase5MonorepoResolution.test.ts packages/analysis/tests/sajimora/TypeScriptPhase6RestrictedReactTsx.test.ts packages/analysis/tests/sajimora/TypeScriptPhase7RestrictedOperationalBehavior.test.ts packages/analysis/tests/sajimora/TypeScriptPhase8IntegratedPilotQualification.test.ts",
50
+ "test:ts-phase0": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/TypeScriptPhase0Certification.test.ts",
51
+ "test:ts-phase1a": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/TypeScriptPhase1ASealedResolution.test.ts",
52
+ "test:ts-phase1b": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/TypeScriptPhase1BScopeIsolation.test.ts",
53
+ "test:ts-phase2a": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/TypeScriptPhase2ACallCompatibility.test.ts",
54
+ "test:ts-phase2b": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/TypeScriptPhase2BFiniteTypeReduction.test.ts",
55
+ "test:ts-phase3": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/TypeScriptPhase3NonCallSpecializers.test.ts",
56
+ "test:ts-phase4": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/TypeScriptPhase4OverloadCorrespondence.test.ts",
57
+ "test:ts-phase5": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/TypeScriptPhase5MonorepoResolution.test.ts",
58
+ "test:ts-phase6": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/TypeScriptPhase6RestrictedReactTsx.test.ts",
59
+ "test:ts-phase7": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/TypeScriptPhase7RestrictedOperationalBehavior.test.ts",
60
+ "test:ts-phase8": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/TypeScriptPhase8IntegratedPilotQualification.test.ts",
61
+ "test:analysis": "npm run test:p0 && npm run test:adversarial && npm run test:multiproject && npm run test:blockers && npm run test:forced-limit",
62
+ "test:p0": "tsx packages/analysis/tests/sajimora/P0AuditSuite.test.ts",
63
+ "test:phase0": "node scripts/test-runtime/run-tsx.cjs packages/core/tests/sajimora/VerdictAuthority.test.ts packages/core/tests/sajimora/AuthorityGateGoldens.test.ts packages/analysis/tests/sajimora/P0AuditSuite.test.ts scripts/sajimora/cliArtifact.test.ts scripts/campaign/legacyRetirement.test.ts scripts/sajimora/phase0Readiness.test.ts",
64
+ "test:phase1": "node scripts/test-runtime/run-tsx.cjs scripts/sajimora/phase1.test.ts",
65
+ "test:phase2": "node scripts/test-runtime/run-tsx.cjs scripts/sajimora/phase2.test.ts scripts/sajimora/phase2-matrix.test.ts",
66
+ "test:phase3-storage": "node scripts/test-runtime/run-tsx.cjs scripts/sajimora/phase3-storage.test.ts",
67
+ "test:phase4-ingestion": "node scripts/test-runtime/run-tsx.cjs scripts/sajimora/phase4-ingestion.test.ts",
68
+ "test:phase5-warm-query": "node scripts/test-runtime/run-tsx.cjs scripts/sajimora/phase5-warm-query.test.ts",
69
+ "test:phase5-certified-contracts": "node scripts/test-runtime/run-tsx.cjs packages/core/tests/sajimora/certified/CanonicalEncoding.test.ts",
70
+ "benchmark:warm-query": "node scripts/test-runtime/run-tsx.cjs scripts/campaign/benchmark_warm_indexed_query.ts",
71
+ "test:advisory-impact": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/AdvisoryTypeScriptImpactAnalyzer.test.ts",
72
+ "test:advisory-resolution": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/AdvisoryResolutionEngine.test.ts",
73
+ "test:advisory-calibration-100": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/AdvisoryCalibration100.test.ts",
74
+ "test:advisory": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/AdvisoryTypeScriptImpactAnalyzer.test.ts packages/analysis/tests/sajimora/AdvisoryResolutionEngine.test.ts packages/analysis/tests/sajimora/AdvisoryCalibration100.test.ts",
75
+ "test:two-panel": "node scripts/test-runtime/run-tsx.cjs scripts/sajimora/twoPanelReport.test.ts",
76
+ "test:cli:advisory": "node scripts/test-runtime/run-tsx.cjs scripts/sajimora/advisoryCli.test.ts",
77
+ "campaign:10k": "node --max-old-space-size=4096 scripts/test-runtime/run-tsx-command.cjs scripts/campaign/run_10k_campaign.ts",
78
+ "test:phase3": "node scripts/test-runtime/run-tsx.cjs scripts/sajimora/phase3.test.ts scripts/sajimora/phase3-matrix.test.ts scripts/sajimora/phase3-git-matrix.test.ts",
79
+ "test:phase3:zod": "node scripts/test-runtime/run-tsx.cjs scripts/sajimora/zod-phase3-real.test.ts",
80
+ "test:phase4": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/Phase4TestMatrix.test.ts scripts/sajimora/phase4.test.ts packages/analysis/tests/sajimora/Phase4HostileAuditGaps13.test.ts packages/analysis/tests/sajimora/Phase4HostileAuditGaps14.test.ts packages/analysis/tests/sajimora/Phase4HostileAuditRegressions.test.ts scripts/campaign/ProgramReuseGate.test.ts",
81
+ "test:adversarial": "tsx packages/analysis/tests/sajimora/AdversarialMatrix.test.ts",
82
+ "test:multiproject": "tsx packages/analysis/tests/sajimora/MultiProjectWorkspace.test.ts",
83
+ "test:blockers": "tsx packages/analysis/tests/sajimora/ReleaseBlocker1Positive.test.ts && tsx packages/analysis/tests/sajimora/ReleaseBlocker1Negative.test.ts",
84
+ "test:forced-limit": "tsx packages/analysis/tests/sajimora/V1ForcedLimit.test.ts",
85
+ "test:change-intelligence": "npm run test --prefix packages/change-intelligence",
86
+ "sajimora:analyze": "node scripts/test-runtime/run-tsx-command.cjs scripts/sajimora/analyze.ts",
87
+ "sajimora:analyze:cross": "node scripts/test-runtime/run-tsx-command.cjs scripts/sajimora/analyzeCrossLanguage.ts",
88
+ "test:cross-language": "node scripts/test-runtime/run-cross-language.cjs",
89
+ "test:eval-classifier": "node scripts/test-runtime/run-tsx.cjs eval/liferay-unseen/verdictClassification.test.ts",
90
+ "sajimora:analyze:java": "node scripts/test-runtime/run-tsx-command.cjs scripts/sajimora/analyzeJava.ts",
91
+ "campaign:real": "node --max-old-space-size=8192 scripts/test-runtime/run-tsx-command.cjs scripts/campaign/run_real_campaign.ts",
92
+ "campaign:real:ci": "node --max-old-space-size=8192 scripts/test-runtime/run-tsx-command.cjs scripts/campaign/run_real_campaign.ts --ci",
93
+ "campaign:verify": "node scripts/test-runtime/run-tsx.cjs scripts/campaign/verify_campaign_quality.ts",
94
+ "campaign:ts-caseb": "node --max-old-space-size=4096 scripts/test-runtime/run-tsx-command.cjs scripts/campaign/run_typescript_caseb_coverage_campaign.ts",
95
+ "profile:phase4-memory": "node scripts/test-runtime/run-tsx-command.cjs scripts/campaign/phase4_memory_profile.ts",
96
+ "campaign:cold": "node scripts/test-runtime/run-tsx-command.cjs scripts/campaign/runner_cold_start.ts",
97
+ "test:impact": "npm run test --prefix packages/impact-analysis",
98
+ "campaign:scale:java": "node --max-old-space-size=4096 scripts/test-runtime/run-tsx-command.cjs packages/analysis/tests/sajimora/JavaCampaignJ10B.test.ts",
99
+ "test:java": "node scripts/test-runtime/run-tsx.cjs packages/analysis/tests/sajimora/JavaBuildFallback.test.ts packages/analysis/tests/sajimora/JavaPhase1BExtensions.test.ts packages/analysis/tests/sajimora/JavaGuardedAdditiveProofs.test.ts packages/analysis/tests/sajimora/JavaFrameworkScanner.test.ts packages/analysis/tests/sajimora/JavaPhase1AAliasFixtures.test.ts packages/analysis/tests/sajimora/JavaWildBaselineJ12.test.ts packages/analysis/tests/sajimora/JavaRealGitCommitQueries.test.ts packages/analysis/tests/sajimora/JavaF1CompilerJ11.test.ts packages/analysis/tests/sajimora/JavaAdversarialJ10C.test.ts packages/analysis/tests/sajimora/JavaPilotJ10A.test.ts packages/analysis/tests/sajimora/JavaCliIntegrationJ9.test.ts packages/analysis/tests/sajimora/JavaQualificationJ8_5.test.ts packages/analysis/tests/sajimora/JavaMultiModuleJ8.test.ts packages/analysis/tests/sajimora/JavaCertificationJ7.test.ts packages/analysis/tests/sajimora/JavaBenchmarkJ6.test.ts packages/analysis/tests/sajimora/JavaAdversarialJ6.test.ts packages/analysis/tests/sajimora/AdvisoryJavaImpactAnalyzer.test.ts packages/analysis/tests/sajimora/JavaCallSiteExtractionJ5.test.ts packages/impact-analysis/tests/java_extractor_j1.test.ts packages/impact-analysis/tests/java_type_ir_j2.test.ts"
100
+ },
101
+ "dependencies": {
102
+ "@modelcontextprotocol/sdk": "^1.32.1",
103
+ "@types/react": "^19.3.0",
104
+ "tree-sitter": "0.21.1",
105
+ "tree-sitter-java": "0.23.5",
106
+ "zod": "^3.23.8"
107
+ },
108
+ "devDependencies": {
109
+ "@types/node": "^20.0.0",
110
+ "esbuild": "0.21.5",
111
+ "ts-morph": "^28.0.0",
112
+ "tsx": "^4.19.0",
113
+ "typescript": "5.9.3"
47
114
  }
48
115
  }
package/smithery.yaml CHANGED
@@ -13,7 +13,7 @@ startCommand:
13
13
  description: "Enable trusted local mode for rapid local development (skips signature enforcement)"
14
14
  commandFunction: |-
15
15
  (config) => {
16
- const args = ['-y', 'sajimora', 'sajimora-mcp'];
16
+ const args = ['-y', '--package', 'sajimora', 'sajimora-mcp'];
17
17
  if (config && config.allowedRoot) {
18
18
  args.push('--allowed-root', config.allowedRoot);
19
19
  } else {
@@ -1,72 +0,0 @@
1
- # Sajimora Windows Native Installer (Zero npm, Zero Node.js)
2
- # Usage: irm https://raw.githubusercontent.com/sajimora/sajimora/main/scripts/install.ps1 | iex
3
-
4
- $ErrorActionPreference = 'Stop'
5
-
6
- Write-Host "=== Installing Sajimora Native API Gatekeeper ===" -ForegroundColor Cyan
7
-
8
- $repo = "sajimoraofficial/sajimora"
9
- $tag = "v0.10.0"
10
-
11
- try {
12
- $release = Invoke-RestMethod -Uri "https://api.github.com/repos/$repo/releases/latest" -UseBasicParsing -TimeoutSec 3 -ErrorAction SilentlyContinue
13
- if ($release.tag_name) {
14
- $tag = $release.tag_name
15
- }
16
- } catch {
17
- # Fallback to default version tag if GitHub API rate-limited
18
- }
19
-
20
- $installDir = Join-Path $env:LOCALAPPDATA "Programs\Sajimora\bin"
21
- if (-not (Test-Path $installDir)) {
22
- New-Item -ItemType Directory -Force -Path $installDir | Out-Null
23
- }
24
-
25
- $zipName = "sajimora-$tag-x86_64-pc-windows-msvc.zip"
26
- $zipUrl = "https://github.com/$repo/releases/download/$tag/$zipName"
27
- $tempZip = Join-Path $env:TEMP $zipName
28
-
29
- Write-Host "[*] Downloading Sajimora $tag for Windows x64..." -ForegroundColor Gray
30
- try {
31
- Invoke-WebRequest -Uri $zipUrl -OutFile $tempZip -UseBasicParsing -TimeoutSec 15
32
- Expand-Archive -Path $tempZip -DestinationPath $installDir -Force
33
- Remove-Item $tempZip -Force
34
- } catch {
35
- throw "Failed to download $zipUrl. Please check your internet connection or download manually from https://github.com/$repo/releases"
36
- }
37
-
38
- $userPath = [System.Environment]::GetEnvironmentVariable("Path", "User")
39
- if (-not $userPath) {
40
- $userPath = ""
41
- }
42
-
43
- $pathEntries = $userPath.Split(';')
44
- $alreadyInPath = $false
45
- foreach ($entry in $pathEntries) {
46
- if ($entry.Trim().ToLower() -eq $installDir.ToLower()) {
47
- $alreadyInPath = $true
48
- break
49
- }
50
- }
51
-
52
- if (-not $alreadyInPath) {
53
- Write-Host "[*] Adding Sajimora to User PATH..." -ForegroundColor Gray
54
- if ($userPath.Length -gt 0) {
55
- $newPath = "$userPath;$installDir"
56
- } else {
57
- $newPath = $installDir
58
- }
59
- [System.Environment]::SetEnvironmentVariable("Path", $newPath, "User")
60
- $env:Path = "$env:Path;$installDir"
61
- }
62
-
63
- Write-Host ""
64
- Write-Host "[OK] Sajimora installed successfully!" -ForegroundColor Green
65
- Write-Host " Location: $installDir\sajimora.exe"
66
- Write-Host " Version: $tag"
67
- Write-Host ""
68
- Write-Host "Quickstart:" -ForegroundColor Yellow
69
- Write-Host " 1. Open a new terminal"
70
- Write-Host " 2. cd to your repository"
71
- Write-Host " 3. Run: sajimora init --apply"
72
- Write-Host ""
@@ -1,59 +0,0 @@
1
- #!/usr/bin/env sh
2
- set -e
3
-
4
- # Sajimora Native Installer
5
- # Supports macOS (Apple Silicon & Intel) and Linux (x86_64)
6
-
7
- REPO="sajimoraofficial/sajimora"
8
- LATEST_TAG=$(curl -s "https://api.github.com/repos/${REPO}/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
9
-
10
- if [ -z "$LATEST_TAG" ]; then
11
- LATEST_TAG="v0.10.0"
12
- fi
13
-
14
- OS="$(uname -s)"
15
- ARCH="$(uname -m)"
16
-
17
- case "$OS" in
18
- Darwin)
19
- case "$ARCH" in
20
- arm64) TARGET="aarch64-apple-darwin" ;;
21
- x86_64) TARGET="x86_64-apple-darwin" ;;
22
- *) echo "Unsupported architecture: $ARCH"; exit 1 ;;
23
- esac
24
- ;;
25
- Linux)
26
- case "$ARCH" in
27
- x86_64) TARGET="x86_64-unknown-linux-gnu" ;;
28
- *) echo "Unsupported architecture: $ARCH"; exit 1 ;;
29
- esac
30
- ;;
31
- *)
32
- echo "Unsupported operating system: $OS"
33
- echo "For Windows, download sajimora-windows-x86_64.zip from GitHub Releases."
34
- exit 1
35
- ;;
36
- esac
37
-
38
- ASSET="sajimora-${LATEST_TAG}-${TARGET}.tar.gz"
39
- URL="https://github.com/${REPO}/releases/download/${LATEST_TAG}/${ASSET}"
40
- INSTALL_DIR="/usr/local/bin"
41
-
42
- echo "⚡ Downloading Sajimora ${LATEST_TAG} for ${TARGET}..."
43
- TMP_DIR=$(mktemp -d)
44
- curl -sL "$URL" -o "${TMP_DIR}/${ASSET}"
45
- tar -xzf "${TMP_DIR}/${ASSET}" -C "$TMP_DIR"
46
-
47
- if [ -w "$INSTALL_DIR" ]; then
48
- mv "${TMP_DIR}/sajimora" "$INSTALL_DIR/sajimora"
49
- [ -f "${TMP_DIR}/sajimora-mcp" ] && mv "${TMP_DIR}/sajimora-mcp" "$INSTALL_DIR/sajimora-mcp"
50
- else
51
- echo "Elevated permissions required to install to $INSTALL_DIR:"
52
- sudo mv "${TMP_DIR}/sajimora" "$INSTALL_DIR/sajimora"
53
- [ -f "${TMP_DIR}/sajimora-mcp" ] && sudo mv "${TMP_DIR}/sajimora-mcp" "$INSTALL_DIR/sajimora-mcp"
54
- fi
55
-
56
- rm -rf "$TMP_DIR"
57
- chmod +x "$INSTALL_DIR/sajimora"
58
- echo "✅ Successfully installed Sajimora to $INSTALL_DIR/sajimora"
59
- echo " Run 'sajimora --help' to get started."