@akasecurity/ai-tc-copilot 0.0.0-stage → 0.9.20-bootstrap.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/README.md CHANGED
@@ -1,3 +1,89 @@
1
- # Temporary Holding Version
1
+ # @akasecurity/ai-tc-copilot — the `aka` plugin for GitHub Copilot
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![npm](https://img.shields.io/npm/v/@akasecurity/ai-tc-copilot?style=flat-square&labelColor=232F3E&color=00E0B8)](https://www.npmjs.com/package/@akasecurity/ai-tc-copilot)
4
+ [![Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-232F3E?style=flat-square)](https://github.com/akasecurity/ai-tc/blob/main/LICENSE)
5
+
6
+ **AKA Security — We secure agent harnesses at the source.**
7
+
8
+ The GitHub Copilot plugin for **[AI Traffic Control](https://github.com/akasecurity/ai-tc)** (`ai-tc`). It hooks into a Copilot session and records its session start, prompts, tool calls and tool results to a local SQLite store at `~/.aka/data/aka.db`, scanning each one against your rule packs. On the Copilot CLI it can also block a shell command before it runs.
9
+
10
+ Detection runs entirely on your machine. Standalone by default — no account and no backend, and nothing is sent anywhere to be scanned.[^egress]
11
+
12
+ [^egress]: Live detection and enforcement run locally, on every install and whatever else is configured. This plugin has no setup calibration and no judge step, so it sends nothing to a model API, and it runs no package-manager lookups of its own. One narrow path can send anything off the machine, and it is opt-in: attaching this machine to an AKA deployment your organization runs (`aka attach`). Attached, the plugin forwards the activity that deployment is entitled to see, through `@akasecurity/remote`, the one package permitted to open a socket, and enforces the policy it sets, which can raise enforcement beyond your own settings but never lower it. Each captured event is sent as the local store holds it, so a value a detection flags under monitor or warn reaches that deployment unmasked. On a machine attached as a personal device, a Copilot session forwards activity only from the repositories enrolled with `aka enroll`; Copilot sign-ins are not recognised as work subscriptions, and everything else stays on the machine. Attached either way, the machine still sends more than activity, and no repository limits it. Whenever a session starts anywhere on this machine, in a repository or not (a browser chat included), the machine pulls the deployment's policy (at most every 15 minutes) and its sighting key (when none is stored, the stored one is a day old, or an older version it holds has stopped being accepted) and sends it a device report (at most hourly): a device identifier, host name, versions, detection packs, policy counts, finding counts and dates for everything recorded on the machine, and, when the machine is attached as a personal device, the fact that it is one. Where a scan is available (the coding-agent plugins, not a browser chat), the same session start also checks it for device commands. On a personal device, the background sync also asks the deployment which account its key belongs to, and asks again at later syncs until the device has an answer; syncs that overlap can each send one. A capture that could not be delivered at the time is kept and sent later in the background, and the separate `aka sync-history` grant sends what was recorded before the attachment. What has been sent cannot be recalled. Nothing is forwarded until both an endpoint and an access key are on disk; `aka status` says what a machine is attached to and `aka detach` ends it. [SECURITY.md](https://github.com/akasecurity/ai-tc/blob/main/SECURITY.md#data-in-transit) has the full picture.
13
+
14
+ The local store keeps your prompts and tool calls verbatim apart from the spans a rule masks, and file permissions — not encryption — are all that protect it. See [Data at rest](https://github.com/akasecurity/ai-tc/blob/main/SECURITY.md#data-at-rest) for which files it spans and what holds on Windows.
15
+
16
+ ## Supported surfaces
17
+
18
+ | Surface | Status |
19
+ | ------------------ | ----------------------------------------------------------------------------------------- |
20
+ | Copilot CLI | Supported. Windows is unconfirmed. |
21
+ | VS Code agent mode | Beta. Capture was observed; enforcement is unverified. |
22
+ | Cloud coding agent | Not covered by a plugin install. It reads only a repository's own `.github/hooks/*.json`. |
23
+
24
+ ## Install
25
+
26
+ The plugin is installed from an unpacked copy of its npm package. There is no marketplace entry for it yet. The [setup skill](https://github.com/akasecurity/ai-tc/blob/main/plugins/copilot/skills/setup/SKILL.md) is the authority on these steps, and `aka plugins install copilot` prints them.
27
+
28
+ ### Copilot CLI
29
+
30
+ ```sh
31
+ mkdir -p aka-copilot && cd aka-copilot
32
+ tar -xzf "$(npm pack @akasecurity/ai-tc-copilot --silent)"
33
+ copilot plugin install ./package
34
+ copilot plugin list
35
+ aka init
36
+ ```
37
+
38
+ `copilot plugin list` shows `aka-copilot` once the install has landed. To remove it, run `copilot plugin uninstall aka-copilot`. The Copilot CLI warns that installing from a local path is deprecated in favour of marketplace installs.
39
+
40
+ Keep the `aka-copilot` folder; the first line is safe to run again and reuses it. To update, from inside that same folder:
41
+
42
+ ```sh
43
+ rm -rf package
44
+ tar -xzf "$(npm pack @akasecurity/ai-tc-copilot --silent)"
45
+ copilot plugin update aka-copilot
46
+ ```
47
+
48
+ `copilot plugin update` re-copies the `package` folder into the installed plugin. It does not fetch a newer version itself; the newer version is the one `npm pack` just unpacked there.
49
+
50
+ ### VS Code agent mode (beta)
51
+
52
+ If you have already installed into the Copilot CLI, reuse that `aka-copilot` folder and skip this step, so VS Code loads the same folder the update steps refresh. Otherwise pack and unpack the package the same way:
53
+
54
+ ```sh
55
+ mkdir -p aka-copilot && cd aka-copilot
56
+ tar -xzf "$(npm pack @akasecurity/ai-tc-copilot --silent)"
57
+ ```
58
+
59
+ Then point VS Code at the unpacked folder in your user settings:
60
+
61
+ ```json
62
+ {
63
+ "chat.plugins.enabled": true,
64
+ "chat.useHooks": true,
65
+ "chat.pluginLocations": { "<absolute path to the unpacked package folder>": true }
66
+ }
67
+ ```
68
+
69
+ `npm pack` unpacks into a folder named `package`; use its absolute path.
70
+
71
+ ## Known limitations
72
+
73
+ The setup skill's [Known limitations](https://github.com/akasecurity/ai-tc/blob/main/plugins/copilot/skills/setup/SKILL.md#known-limitations) section is the authority on what AKA can do on each surface. In brief:
74
+
75
+ - **Only a tool call can be stopped.** Prompts and tool results are captured, scanned and recorded, so a secret in either shows up as a finding, but neither is ever blocked or rewritten.
76
+ - **AKA's notices are not shown to you.** On the Copilot CLI in `-p` mode they appeared only in the debug log; in VS Code, only in the "GitHub Copilot Chat Hooks" output channel.
77
+ - **No setup wizard and no history backfill yet.** Use the `aka` CLI directly (`aka init`, `aka detections`, `aka scan`), and nothing reads the sessions that happened before the plugin was installed.
78
+
79
+ ## Where your data lives
80
+
81
+ Everything is under `~/.aka`: settings in `~/.aka/settings`, the store at `~/.aka/data/aka.db`. Run `aka dashboard` to browse findings in the local web dashboard.
82
+
83
+ ## Docs
84
+
85
+ Full documentation and the built-in detection catalog live at **[akasecurity.github.io/ai-tc-docs](https://akasecurity.github.io/ai-tc-docs/)**.
86
+
87
+ ## License
88
+
89
+ [Apache-2.0](https://github.com/akasecurity/ai-tc/blob/main/LICENSE)
package/hooks.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "hooks": {
3
+ "sessionStart": [
4
+ {
5
+ "hooks": [
6
+ {
7
+ "type": "command",
8
+ "command": "node \"${PLUGIN_ROOT}/scripts/session-start.js\" sessionStart \"${PLUGIN_ROOT}/plugin.json\"",
9
+ "timeoutSec": 30
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "userPromptSubmitted": [
15
+ {
16
+ "hooks": [
17
+ {
18
+ "type": "command",
19
+ "command": "node \"${PLUGIN_ROOT}/scripts/user-prompt-submit.js\" userPromptSubmitted \"${PLUGIN_ROOT}/plugin.json\"",
20
+ "timeoutSec": 30
21
+ }
22
+ ]
23
+ }
24
+ ],
25
+ "preToolUse": [
26
+ {
27
+ "hooks": [
28
+ {
29
+ "type": "command",
30
+ "command": "node \"${PLUGIN_ROOT}/scripts/pre-tool-use.js\" preToolUse \"${PLUGIN_ROOT}/plugin.json\"",
31
+ "timeoutSec": 30
32
+ }
33
+ ]
34
+ }
35
+ ],
36
+ "postToolUse": [
37
+ {
38
+ "hooks": [
39
+ {
40
+ "type": "command",
41
+ "command": "node \"${PLUGIN_ROOT}/scripts/post-tool-use.js\" postToolUse \"${PLUGIN_ROOT}/plugin.json\"",
42
+ "timeoutSec": 30
43
+ }
44
+ ]
45
+ }
46
+ ]
47
+ }
48
+ }
package/package.json CHANGED
@@ -1,6 +1,46 @@
1
1
  {
2
2
  "name": "@akasecurity/ai-tc-copilot",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.9.20-bootstrap.0",
4
+ "description": "AI Traffic Control — inspect and govern AI prompts in GitHub Copilot",
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/copilot"
11
+ },
12
+ "homepage": "https://github.com/akasecurity/ai-tc/tree/main/plugins/copilot",
13
+ "files": [
14
+ "plugin.json",
15
+ "hooks.json",
16
+ "skills",
17
+ "scripts"
18
+ ],
19
+ "publishConfig": {
20
+ "registry": "https://registry.npmjs.org",
21
+ "access": "public"
22
+ },
23
+ "scripts": {
24
+ "build": "tsup",
25
+ "dev": "tsup --watch",
26
+ "lint": "eslint src test *.config.*",
27
+ "test": "vitest run",
28
+ "typecheck": "tsc --noEmit",
29
+ "prepack": "tsup"
30
+ },
31
+ "devDependencies": {
32
+ "@akasecurity/eslint-config": "workspace:*",
33
+ "@akasecurity/persistence": "workspace:*",
34
+ "@akasecurity/plugin-runtime": "workspace:*",
35
+ "@akasecurity/plugin-sdk": "workspace:*",
36
+ "@akasecurity/scanner": "workspace:*",
37
+ "@akasecurity/schema": "workspace:*",
38
+ "@akasecurity/setup-wizard": "workspace:*",
39
+ "@types/node": "^25.9.9",
40
+ "@vitest/coverage-v8": "^4.1.11",
41
+ "eslint": "^9.39.5",
42
+ "tsup": "^9.0.0",
43
+ "typescript": "^5.8.0",
44
+ "vitest": "^4.1.11"
45
+ }
46
+ }
package/plugin.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "aka-copilot",
3
+ "version": "0.9.20-bootstrap.0",
4
+ "description": "AI Traffic Control — inspect and govern AI prompts in GitHub Copilot. Detection runs locally; events are recorded to a local SQLite store on your machine.",
5
+ "hooks": "./hooks.json",
6
+ "skills": "./skills",
7
+ "interface": {
8
+ "displayName": "AKA Security",
9
+ "shortDescription": "Local secret detection for GitHub Copilot.",
10
+ "developerName": "AKA Security",
11
+ "websiteUrl": "https://github.com/akasecurity/ai-tc"
12
+ }
13
+ }