@askance/cli 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.
@@ -0,0 +1,18 @@
1
+ {
2
+ "cursor.hooks": {
3
+ "preToolUse": {
4
+ "command": "node",
5
+ "args": ["node_modules/@askance/cli/dist/hook-handler/index.js"],
6
+ "matchTools": [".*"],
7
+ "excludeTools": ["mcp__askance__.*"]
8
+ }
9
+ },
10
+ "cursor.mcp": {
11
+ "servers": {
12
+ "askance": {
13
+ "command": "node",
14
+ "args": ["node_modules/@askance/cli/dist/mcp-server/index.js"]
15
+ }
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,34 @@
1
+ version: 1
2
+
3
+ api_url: https://api.askance.app
4
+ project_id: ""
5
+
6
+ keep_alive:
7
+ enabled: true
8
+ duration: 3600
9
+ poll_interval: 30
10
+ rules:
11
+ - name: "Allow read-only tools"
12
+ match: { tool: "^(Read|Glob|Grep|WebSearch|WebFetch)$" }
13
+ action: allow
14
+ risk: low
15
+ - name: "Allow safe writes"
16
+ match: { tool: "^(Write|Edit|NotebookEdit)$" }
17
+ action: allow
18
+ risk: low
19
+ - name: "Allow safe bash commands"
20
+ match: { tool: "^Bash$", command: "^(npm test|npm run |npx tsc|git status|git log|git diff|ls |cat |echo |pwd)" }
21
+ action: allow
22
+ risk: low
23
+ - name: "Gate other bash commands"
24
+ match: { tool: "^Bash$" }
25
+ action: gate
26
+ risk: medium
27
+ - name: "Deny destructive commands"
28
+ match: { tool: "^Bash$", command: "(rm -rf|drop table|format |shutdown|reboot|git push --force)" }
29
+ action: deny
30
+ risk: high
31
+ - name: "Default - gate everything"
32
+ match: { tool: ".*" }
33
+ action: gate
34
+ risk: low
@@ -0,0 +1,18 @@
1
+ version: 1
2
+
3
+ api_url: https://api.askance.app
4
+ project_id: ""
5
+
6
+ keep_alive:
7
+ enabled: true
8
+ duration: 3600
9
+ poll_interval: 30
10
+ rules:
11
+ - name: "Allow all tools"
12
+ match: { tool: ".*" }
13
+ action: allow
14
+ risk: low
15
+ - name: "Deny destructive commands"
16
+ match: { tool: "^Bash$", command: "(rm -rf /|drop database|format c:|shutdown|reboot|git push --force.*main)" }
17
+ action: deny
18
+ risk: high
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@askance/cli",
3
+ "version": "0.1.0",
4
+ "description": "Askance CLI — Tool call interception & approval management for AI coding agents",
5
+ "license": "MIT",
6
+ "homepage": "https://askance.app",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Advancer-Limited/askance.git",
10
+ "directory": "packages/cli"
11
+ },
12
+ "keywords": [
13
+ "askance",
14
+ "ai",
15
+ "coding-agent",
16
+ "tool-call",
17
+ "approval",
18
+ "claude",
19
+ "cursor",
20
+ "copilot",
21
+ "mcp",
22
+ "safety"
23
+ ],
24
+ "engines": {
25
+ "node": ">=18.0.0"
26
+ },
27
+ "bin": {
28
+ "askance": "dist/cli/index.js"
29
+ },
30
+ "files": [
31
+ "dist/**/*.js",
32
+ "dist/templates/**",
33
+ "!dist/daemon/**",
34
+ "!dist/dashboard/**",
35
+ "LICENSE",
36
+ "README.md"
37
+ ],
38
+ "scripts": {
39
+ "build": "tsc && node -e \"const fs=require('fs');const path=require('path');function cpDir(s,d){fs.mkdirSync(d,{recursive:true});for(const f of fs.readdirSync(s)){const sp=path.join(s,f),dp=path.join(d,f);fs.statSync(sp).isDirectory()?cpDir(sp,dp):fs.copyFileSync(sp,dp)}}cpDir('src/templates','dist/templates')\""
40
+ },
41
+ "dependencies": {
42
+ "@modelcontextprotocol/sdk": "^1.26.0",
43
+ "uuid": "^11.1.0",
44
+ "yaml": "^2.6.1"
45
+ },
46
+ "devDependencies": {
47
+ "@types/uuid": "^10.0.0",
48
+ "tsx": "^4.19.2",
49
+ "typescript": "^5.7.3"
50
+ }
51
+ }