@akasecurity/ai-tc-claude-code 0.8.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.
@@ -0,0 +1,23 @@
1
+ ---
2
+ description: Show token usage and estimated cost per model from your local AKA store
3
+ ---
4
+
5
+ # AKA tokens
6
+
7
+ Run the read script and show the user its output **exactly as printed**. The
8
+ script already prints its content inside a Markdown code fence — reproduce that
9
+ verbatim and do **not** add another code fence, strip the fence, or reformat it.
10
+ The fence is required: it is space-aligned monospace (a per-model usage table)
11
+ that Markdown would otherwise collapse. Do not reformat or summarize the table;
12
+ you may add at most one short sentence of context after it.
13
+
14
+ ```bash
15
+ node "${CLAUDE_PLUGIN_ROOT}/scripts/query.js" tokens
16
+ ```
17
+
18
+ This reads the local store at `~/.aka/data/aka.db` (token counts reconciled from
19
+ your Claude Code transcripts, grouped by provider/model, with estimated USD cost).
20
+ It is read-only. Token counts are exact; cost is **derived** at read time — a `—`
21
+ means unknown pricing (a local or non-Anthropic model), so a `≥` total is a lower
22
+ bound, not an understatement. If the store is empty, the script says so — relay
23
+ that as-is; nothing is wrong.
@@ -0,0 +1,61 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "hooks": [
6
+ {
7
+ "type": "command",
8
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-start.js\" \"${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json\"",
9
+ "timeout": 10
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "UserPromptSubmit": [
15
+ {
16
+ "hooks": [
17
+ {
18
+ "type": "command",
19
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/user-prompt-submit.js\"",
20
+ "timeout": 10
21
+ }
22
+ ]
23
+ }
24
+ ],
25
+ "PreToolUse": [
26
+ {
27
+ "matcher": "Bash|Edit|Write|WebFetch",
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/pre-tool-use.js\"",
32
+ "timeout": 10
33
+ }
34
+ ]
35
+ }
36
+ ],
37
+ "PostToolUse": [
38
+ {
39
+ "matcher": "Bash|Read|WebFetch",
40
+ "hooks": [
41
+ {
42
+ "type": "command",
43
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-use.js\"",
44
+ "timeout": 10
45
+ }
46
+ ]
47
+ }
48
+ ],
49
+ "Stop": [
50
+ {
51
+ "hooks": [
52
+ {
53
+ "type": "command",
54
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/stop.js\"",
55
+ "timeout": 10
56
+ }
57
+ ]
58
+ }
59
+ ]
60
+ }
61
+ }
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@akasecurity/ai-tc-claude-code",
3
+ "version": "0.8.1",
4
+ "description": "AI Traffic Control — inspect and govern AI prompts in Claude Code",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/akasecurity/ai-tc.git",
10
+ "directory": "plugins/claude-code"
11
+ },
12
+ "homepage": "https://github.com/akasecurity/ai-tc/tree/main/plugins/claude-code",
13
+ "files": [
14
+ ".claude-plugin",
15
+ "hooks",
16
+ "commands",
17
+ "scripts"
18
+ ],
19
+ "publishConfig": {
20
+ "registry": "https://registry.npmjs.org",
21
+ "access": "public"
22
+ },
23
+ "devDependencies": {
24
+ "@types/node": "^26.1.1",
25
+ "eslint": "^9.0.0",
26
+ "tsup": "^8.0.0",
27
+ "typescript": "^5.8.0",
28
+ "vitest": "^4.1.10",
29
+ "@akasecurity/eslint-config": "0.8.0",
30
+ "@akasecurity/persistence": "0.8.0",
31
+ "@akasecurity/plugin-runtime": "0.8.0",
32
+ "@akasecurity/plugin-sdk": "0.8.0",
33
+ "@akasecurity/scanner": "0.8.0",
34
+ "@akasecurity/schema": "0.8.0"
35
+ },
36
+ "scripts": {
37
+ "build": "tsup",
38
+ "dev": "tsup --watch",
39
+ "lint": "eslint src",
40
+ "test": "vitest run",
41
+ "typecheck": "tsc --noEmit"
42
+ }
43
+ }