sonecheck 0.0.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/LICENSE +21 -0
- package/README.md +108 -0
- package/index.d.ts +33 -0
- package/index.js +68 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 aifuun
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# SoneCheck
|
|
2
|
+
|
|
3
|
+
**The sub-second System-1 AI code risk inspector for VS Code and Git hooks.**
|
|
4
|
+
|
|
5
|
+
SoneCheck reads your staged diff, splits it into hunks, scores each hunk with a
|
|
6
|
+
System-1 decision model, and surfaces only the one to three changes that actually
|
|
7
|
+
deserve your eyes before you commit.
|
|
8
|
+
|
|
9
|
+
> **Project documentation is written in Chinese**: see [`docs/`](docs/) for the
|
|
10
|
+
> full product requirements, technical spec, system design, contracts, UI design,
|
|
11
|
+
> roadmap and observability plan.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Status: `0.0.1` is a name reservation
|
|
16
|
+
|
|
17
|
+
**This release contains no functional implementation.** It exists to reserve the
|
|
18
|
+
`sonecheck` package name ahead of the first working version.
|
|
19
|
+
|
|
20
|
+
Installing it will not give you a working tool. Every exported API throws a
|
|
21
|
+
descriptive `SONECHECK_NOT_IMPLEMENTED` error rather than failing silently:
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
const { inspectStaged } = require('sonecheck');
|
|
25
|
+
|
|
26
|
+
inspectStaged();
|
|
27
|
+
// Error: sonecheck@0.0.1 does not implement "inspectStaged" yet. ...
|
|
28
|
+
// code: 'SONECHECK_NOT_IMPLEMENTED'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The first functional release will be **`0.1.0`**. This placeholder exists only so
|
|
32
|
+
that the name is not taken by an unrelated project in the meantime.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Why this exists
|
|
37
|
+
|
|
38
|
+
AI coding tools made code *generation* far faster than code *review*. A single
|
|
39
|
+
commit can now span dozens of hunks across many files, and nobody reads all of
|
|
40
|
+
them. Review queues back up and low-quality changes get waved through.
|
|
41
|
+
|
|
42
|
+
Existing generative-AI reviewers make this worse in three ways: they are slow
|
|
43
|
+
(5–15s per review, so people skip them), they are expensive (billed per generated
|
|
44
|
+
token), and they hallucinate (they rewrite code and invent explanations).
|
|
45
|
+
|
|
46
|
+
SoneCheck removes the *generation* step entirely. A System-1 decision model
|
|
47
|
+
outputs structured choices and scores instead of prose, so scoring returns in a
|
|
48
|
+
fraction of a second, costs next to nothing, and cannot hallucinate code.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## What is planned
|
|
53
|
+
|
|
54
|
+
| Milestone | Scope |
|
|
55
|
+
|-----------|-------|
|
|
56
|
+
| M1 — local MVP | Read staged diff → split hunks → score → show top risks → jump to the line |
|
|
57
|
+
| M2 — distributable | `.vsix` package and a documented install path |
|
|
58
|
+
| M3 — trustworthy | Better context assembly, tunable thresholds, false-positive feedback |
|
|
59
|
+
| M4 — team-ready | Hosted option, shared team rules, audit trail |
|
|
60
|
+
|
|
61
|
+
Design principles the implementation must hold to:
|
|
62
|
+
|
|
63
|
+
- **Never block a commit.** If the decision service is unreachable, the check is
|
|
64
|
+
skipped and the developer is told once. Failures always resolve to "let it pass".
|
|
65
|
+
- **Never upload a whole file.** Only diff hunks plus bounded local context
|
|
66
|
+
(≤ 2KB per hunk) leave the machine.
|
|
67
|
+
- **Never touch your workspace.** The check is strictly read-only.
|
|
68
|
+
- **Never nag.** All-clear runs silently, with no popup.
|
|
69
|
+
|
|
70
|
+
These are recorded as testable invariants in
|
|
71
|
+
[`docs/03_CONTRACTS_AND_API.md`](docs/03_CONTRACTS_AND_API.md).
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Privacy boundary
|
|
76
|
+
|
|
77
|
+
SoneCheck is designed so that sensitive source never leaves the machine wholesale:
|
|
78
|
+
|
|
79
|
+
- Only the hunks you have staged, plus a bounded slice of surrounding context,
|
|
80
|
+
are sent for scoring.
|
|
81
|
+
- Your API key is stored in the OS-level secret store, never in a plain file, and
|
|
82
|
+
never written to logs.
|
|
83
|
+
- The extension never modifies, stages, formats or deletes your files.
|
|
84
|
+
|
|
85
|
+
The full payload boundary is specified in
|
|
86
|
+
[`docs/03_CONTRACTS_AND_API.md`](docs/03_CONTRACTS_AND_API.md) §1.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Not affiliated
|
|
91
|
+
|
|
92
|
+
SoneCheck is an independent, unofficial project. It is not affiliated with,
|
|
93
|
+
endorsed by, or sponsored by Jev, TypeSafe AI, or any other AI model vendor.
|
|
94
|
+
"Jev" and "TypeSafe AI" are the property of their respective owners, referenced
|
|
95
|
+
here only to describe a technical dependency.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Contributing
|
|
100
|
+
|
|
101
|
+
The project is at the design stage. Issues and discussions are welcome via
|
|
102
|
+
[GitHub Issues](https://github.com/aifuun/sonecheck/issues).
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
[MIT](LICENSE)
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for sonecheck 0.0.1 — name-reservation release.
|
|
3
|
+
*
|
|
4
|
+
* No functional implementation is available in this version.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/** Error code attached to every "not implemented yet" error. */
|
|
8
|
+
export declare const NOT_IMPLEMENTED: 'SONECHECK_NOT_IMPLEMENTED';
|
|
9
|
+
|
|
10
|
+
/** Version of the placeholder release. */
|
|
11
|
+
export declare const RESERVED_VERSION: '0.0.1';
|
|
12
|
+
|
|
13
|
+
/** The first release expected to contain a working implementation. */
|
|
14
|
+
export declare const FIRST_FUNCTIONAL_VERSION: '0.1.0';
|
|
15
|
+
|
|
16
|
+
/** Error thrown by every placeholder entry point in 0.0.1. */
|
|
17
|
+
export interface SoneCheckNotImplementedError extends Error {
|
|
18
|
+
code: typeof NOT_IMPLEMENTED;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Inspect an arbitrary set of changes for risk.
|
|
23
|
+
*
|
|
24
|
+
* @throws {SoneCheckNotImplementedError} Always, until 0.1.0.
|
|
25
|
+
*/
|
|
26
|
+
export declare function inspect(): never;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Inspect the staged diff of the current repository.
|
|
30
|
+
*
|
|
31
|
+
* @throws {SoneCheckNotImplementedError} Always, until 0.1.0.
|
|
32
|
+
*/
|
|
33
|
+
export declare function inspectStaged(): never;
|
package/index.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* sonecheck 0.0.1 — name-reservation release.
|
|
5
|
+
*
|
|
6
|
+
* This release contains no functional implementation. It exists to reserve the
|
|
7
|
+
* public package name `sonecheck` before the first working version ships.
|
|
8
|
+
*
|
|
9
|
+
* Every exported entry point throws a descriptive error instead of failing
|
|
10
|
+
* silently, so that anyone who installs this version learns immediately where
|
|
11
|
+
* the real implementation lives.
|
|
12
|
+
*
|
|
13
|
+
* Roadmap and design documents: https://github.com/aifuun/sonecheck
|
|
14
|
+
*
|
|
15
|
+
* @see README.md
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/** Error code attached to every "not implemented yet" error. */
|
|
19
|
+
const NOT_IMPLEMENTED = 'SONECHECK_NOT_IMPLEMENTED';
|
|
20
|
+
|
|
21
|
+
/** Version of the placeholder release. */
|
|
22
|
+
const RESERVED_VERSION = '0.0.1';
|
|
23
|
+
|
|
24
|
+
/** The first release expected to contain a working implementation. */
|
|
25
|
+
const FIRST_FUNCTIONAL_VERSION = '0.1.0';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Build the error thrown by every placeholder entry point.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} apiName Name of the API that was called.
|
|
31
|
+
* @returns {Error & { code: string }} A descriptive, non-silent error.
|
|
32
|
+
*/
|
|
33
|
+
function createNotImplementedError(apiName) {
|
|
34
|
+
const error = new Error(
|
|
35
|
+
`sonecheck@${RESERVED_VERSION} does not implement "${apiName}" yet. ` +
|
|
36
|
+
`This version only reserves the package name. ` +
|
|
37
|
+
`The first functional release is ${FIRST_FUNCTIONAL_VERSION}. ` +
|
|
38
|
+
`Status: https://github.com/aifuun/sonecheck`
|
|
39
|
+
);
|
|
40
|
+
error.code = NOT_IMPLEMENTED;
|
|
41
|
+
return error;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Inspect an arbitrary set of changes for risk. Not implemented in 0.0.1.
|
|
46
|
+
*
|
|
47
|
+
* @returns {never} Always throws.
|
|
48
|
+
*/
|
|
49
|
+
function inspect() {
|
|
50
|
+
throw createNotImplementedError('inspect');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Inspect the staged diff of the current repository. Not implemented in 0.0.1.
|
|
55
|
+
*
|
|
56
|
+
* @returns {never} Always throws.
|
|
57
|
+
*/
|
|
58
|
+
function inspectStaged() {
|
|
59
|
+
throw createNotImplementedError('inspectStaged');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
module.exports = {
|
|
63
|
+
NOT_IMPLEMENTED,
|
|
64
|
+
RESERVED_VERSION,
|
|
65
|
+
FIRST_FUNCTIONAL_VERSION,
|
|
66
|
+
inspect,
|
|
67
|
+
inspectStaged,
|
|
68
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sonecheck",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "100ms System-1 AI code risk inspector for VS Code and Git hooks. Name-reservation release; the first functional release is 0.1.0.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vscode",
|
|
7
|
+
"vscode-extension",
|
|
8
|
+
"git-diff",
|
|
9
|
+
"code-review",
|
|
10
|
+
"static-analysis",
|
|
11
|
+
"risk-analysis",
|
|
12
|
+
"developer-tools",
|
|
13
|
+
"system-1"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"author": "aifuun",
|
|
17
|
+
"homepage": "https://github.com/aifuun/sonecheck#readme",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/aifuun/sonecheck.git"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/aifuun/sonecheck/issues"
|
|
24
|
+
},
|
|
25
|
+
"main": "./index.js",
|
|
26
|
+
"types": "./index.d.ts",
|
|
27
|
+
"files": [
|
|
28
|
+
"index.js",
|
|
29
|
+
"index.d.ts"
|
|
30
|
+
],
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=22"
|
|
33
|
+
},
|
|
34
|
+
"sideEffects": false,
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public",
|
|
37
|
+
"registry": "https://registry.npmjs.org/"
|
|
38
|
+
}
|
|
39
|
+
}
|