{
	"type": "module",
	"name": "relace-compact-pi",
	"version": "0.2.0",
	"description": "Relace Compact routing for OMP and pi-agent",
	"homepage": "https://omp.sh",
	"author": "Antigravity",
	"license": "MIT",
	"keywords": [
		"pi-package"
	],
	"publishConfig": {
		"access": "public"
	},
	"repository": {
		"type": "git",
		"url": "git+https://github.com/thejorgg/relace-compact-pi.git"
	},
	"scripts": {
		"check": "biome check . && bun run check:types",
		"check:types": "tsc -p tsconfig.json --noEmit",
		"lint": "biome lint .",
		"fmt": "biome format --write ."
	},
	"devDependencies": {
		"@biomejs/biome": "^2",
		"@earendil-works/pi-agent-core": "^0.80.6",
		"@earendil-works/pi-ai": "^0.80.6",
		"@earendil-works/pi-coding-agent": "^0.80.6",
		"@types/bun": "^1.3.14",
		"typescript": "^5.4.5"
	},
	"peerDependencies": {
		"@earendil-works/pi-coding-agent": "^0.74.0 || ^0.75.0 || ^0.78.0 || ^0.79.0 || ^0.80.0 || ^0.84.0",
		"@earendil-works/pi-agent-core": "^0.74.0 || ^0.75.0 || ^0.78.0 || ^0.79.0 || ^0.80.0 || ^0.84.0",
		"@earendil-works/pi-ai": "^0.74.0 || ^0.75.0 || ^0.78.0 || ^0.79.0 || ^0.80.0 || ^0.84.0"
	},
	"engines": {
		"node": ">=22.19.0",
		"bun": ">=1.3.14"
	},
	"omp": {
		"extensions": [
			"./src/extension.ts"
		],
		"settings": {
			"relace.enabled": {
				"type": "boolean",
				"default": true,
				"description": "Route supported OMP compactions through Relace."
			},
			"relace.apiKey": {
				"type": "string",
				"default": "",
				"secret": true,
				"env": "RELACE_API_KEY",
				"description": "Relace API key."
			},
			"relace.endpoint": {
				"type": "string",
				"default": "https://models.relace.ai/v1/code/compact",
				"description": "Relace Compact API endpoint."
			},
			"relace.targetPercent": {
				"type": "number",
				"default": 33,
				"min": 1,
				"max": 100,
				"description": "Target percentage of the active model context after compaction."
			},
			"relace.idleTimeoutSeconds": {
				"type": "number",
				"default": 600,
				"min": 0,
				"description": "Global idle compaction delay in seconds; zero disables idle compaction."
			},
			"relace.idleMode": {
				"type": "enum",
				"values": [
					"beforeNextTurn",
					"backgroundAuto"
				],
				"default": "beforeNextTurn",
				"description": "When idle compaction runs: beforeNextTurn defers it until your next message is submitted; backgroundAuto compacts in the background as soon as the idle timer fires."
			},
			"relace.idleModelOverrides": {
				"type": "string",
				"default": "{}",
				"description": "JSON object mapping model globs to idle seconds, for example {\"openai/gpt*\":1800}."
			}
		}
	},
	"pi": {
		"video": "https://raw.githubusercontent.com/thejorgg/relace-compact-pi/main/assets/demo.mp4",
		"extensions": [
			"./src/extension.ts"
		],
		"settings": {
			"relace.enabled": {
				"type": "boolean",
				"default": true,
				"description": "Route every pi compaction through Relace."
			},
			"relace.apiKey": {
				"type": "string",
				"default": "",
				"secret": true,
				"env": "RELACE_API_KEY",
				"description": "Relace API key."
			},
			"relace.endpoint": {
				"type": "string",
				"default": "https://models.relace.ai/v1/code/compact",
				"description": "Relace Compact API endpoint."
			},
			"relace.targetPercent": {
				"type": "number",
				"default": 33,
				"min": 1,
				"max": 100,
				"description": "Target percentage of the active model context after compaction."
			},
			"relace.idleTimeoutSeconds": {
				"type": "number",
				"default": 600,
				"min": 0,
				"description": "Global idle compaction delay in seconds; zero disables idle compaction."
			},
			"relace.idleMode": {
				"type": "enum",
				"values": [
					"beforeNextTurn",
					"backgroundAuto"
				],
				"default": "beforeNextTurn",
				"description": "When idle compaction runs: beforeNextTurn defers it until your next message is submitted; backgroundAuto compacts in the background as soon as the idle timer fires."
			},
			"relace.idleModelOverrides": {
				"type": "string",
				"default": "{}",
				"description": "JSON object mapping model globs to idle seconds, for example {\"openai/gpt*\":1800}."
			},
			"relace.pi.thresholdType": {
				"type": "enum",
				"values": [
					"percentage",
					"tokens"
				],
				"default": "percentage",
				"description": "Interpret the pi auto-compaction threshold as context percentage or token count."
			},
			"relace.pi.threshold": {
				"type": "number",
				"default": 66,
				"min": 1,
				"description": "Pi auto-compaction threshold value."
			}
		}
	},
	"files": [
		"src",
		"README.md",
		"LICENSE"
	],
	"peerDependenciesMeta": {
		"@earendil-works/pi-coding-agent": {
			"optional": true
		},
		"@earendil-works/pi-agent-core": {
			"optional": true
		},
		"@earendil-works/pi-ai": {
			"optional": true
		}
	}
}
