@attalabs/vinaya 0.1.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.
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@attalabs/vinaya",
3
+ "version": "0.1.0",
4
+ "description": "Vinaya — Agentic Engineering Harness. Deterministic checks every AI coding agent must satisfy before merge.",
5
+ "type": "module",
6
+ "license": "AGPL-3.0-only",
7
+ "author": "Daniel Estevez",
8
+ "bin": {
9
+ "vinaya": "./dist/index.js"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "templates",
14
+ "README.md"
15
+ ],
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/daniboomerang/attalabs.git",
22
+ "directory": "apps/vinaya/cli"
23
+ },
24
+ "homepage": "https://vinaya.attalabs.dev",
25
+ "keywords": [
26
+ "cli",
27
+ "ai-agents",
28
+ "agentic-engineering",
29
+ "governance",
30
+ "checks",
31
+ "git-hooks",
32
+ "code-review"
33
+ ],
34
+ "engines": {
35
+ "node": ">=20"
36
+ },
37
+ "scripts": {
38
+ "build": "bun scripts/build.ts",
39
+ "prepack": "bun scripts/build.ts",
40
+ "test": "bun test",
41
+ "typecheck": "tsc --noEmit",
42
+ "lint": "biome check src tests scripts"
43
+ },
44
+ "dependencies": {
45
+ "gray-matter": "^4.0.3",
46
+ "zod": "3.25.76"
47
+ },
48
+ "devDependencies": {
49
+ "@atta/aeg-core": "workspace:*",
50
+ "@atta/typescript-config": "workspace:*",
51
+ "@atta/vinaya-sources": "workspace:*",
52
+ "@types/bun": "latest",
53
+ "typescript": "^5.5.0"
54
+ }
55
+ }
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * {{CHECK_NAME}} — a custom vinaya check, scaffolded by `vinaya new check`.
4
+ *
5
+ * Contract: emit one JSON line on stderr per finding via `emitCheckError`,
6
+ * then exit 0 (pass) or 1 (findings). The RUNNER enforces the timeout —
7
+ * never sleep past it inside this file. This file is standalone (no import
8
+ * from the vinaya CLI's own source tree) because it lives in YOUR repo, not
9
+ * inside `@atta/vinaya-cli`.
10
+ */
11
+
12
+ type CheckError = {
13
+ schema: 1
14
+ check: string
15
+ severity: 'error' | 'warning'
16
+ message: string
17
+ agent_recovery_prompt: string
18
+ file?: string
19
+ line?: number
20
+ }
21
+
22
+ function emitCheckError(error: CheckError): void {
23
+ process.stderr.write(`${JSON.stringify(error)}\n`)
24
+ }
25
+
26
+ function main(): void {
27
+ // Replace this with your real check logic — read whatever input this
28
+ // check needs, then call `emitCheckError` once per finding.
29
+ emitCheckError({
30
+ schema: 1,
31
+ check: '{{CHECK_NAME}}',
32
+ severity: 'error',
33
+ message: 'Example finding from the scaffolded template — replace with a real check.',
34
+ agent_recovery_prompt: 'Edit this file to implement your check logic, then remove this example finding.'
35
+ })
36
+ process.exit(1)
37
+ }
38
+
39
+ main()