predicate-skill 1.2.0 → 2.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.
Files changed (37) hide show
  1. package/.claude-plugin/plugin.json +6 -5
  2. package/README.md +88 -17
  3. package/cli.bundle.mjs +29269 -234
  4. package/dashboard/index.html +180 -0
  5. package/hooks/codex-cli/README.md +30 -0
  6. package/hooks/codex-cli/config.toml.template +10 -0
  7. package/hooks/codex-cli/pre-compact.sh +4 -0
  8. package/hooks/codex-cli/session-start.sh +7 -0
  9. package/hooks/codex-cli/stop.sh +4 -0
  10. package/hooks/cursor/README.md +46 -0
  11. package/hooks/cursor/mcp.json.template +12 -0
  12. package/hooks/cursor/pre-compact.sh +7 -0
  13. package/hooks/cursor/session-start.sh +7 -0
  14. package/hooks/cursor/stop.sh +5 -0
  15. package/hooks/gemini-cli/README.md +38 -0
  16. package/hooks/gemini-cli/pre-compact.sh +5 -0
  17. package/hooks/gemini-cli/session-start.sh +6 -0
  18. package/hooks/gemini-cli/settings.json.template +17 -0
  19. package/hooks/gemini-cli/stop.sh +20 -0
  20. package/hooks/hooks.json +25 -7
  21. package/hooks/opencode/README.md +40 -0
  22. package/hooks/opencode/opencode.json.template +18 -0
  23. package/hooks/opencode/pre-compact.sh +5 -0
  24. package/hooks/opencode/session-start.sh +6 -0
  25. package/hooks/opencode/stop.sh +20 -0
  26. package/hooks/post-tool-use.sh +10 -0
  27. package/hooks/pre-tool-use.sh +11 -0
  28. package/hooks/session-start.sh +7 -19
  29. package/hooks/stop.sh +20 -0
  30. package/hooks/vscode-copilot/README.md +43 -0
  31. package/hooks/vscode-copilot/pre-compact.sh +4 -0
  32. package/hooks/vscode-copilot/session-start.sh +7 -0
  33. package/hooks/vscode-copilot/settings.json.template +12 -0
  34. package/hooks/vscode-copilot/stop.sh +5 -0
  35. package/package.json +2 -1
  36. package/server.bundle.mjs +28422 -18694
  37. package/skills/predicate/SKILL.md +193 -1
@@ -0,0 +1,43 @@
1
+ # VS Code Copilot adapter
2
+
3
+ ## Install MCP server
4
+
5
+ Merge `settings.json.template` into your VS Code `settings.json`
6
+ (User or Workspace), replacing `__PLUGIN_DIR__` with the absolute path
7
+ to this package. Restart VS Code. The 8 `kg_*` tools will be available
8
+ to Copilot Chat.
9
+
10
+ ## Hooks
11
+
12
+ VS Code Copilot does not expose SessionStart, PreCompact, or Stop
13
+ lifecycle events as of writing. The three scripts in this directory
14
+ are provided so you can:
15
+
16
+ 1. Run `session-start.sh` manually before opening Copilot Chat and
17
+ paste the output into a prompt as initial context.
18
+
19
+ 2. Wire `pre-compact.sh` and `stop.sh` to cron for periodic KG
20
+ maintenance — see `../cursor/README.md` for cron examples.
21
+
22
+ 3. Use them in VS Code tasks (`.vscode/tasks.json`):
23
+
24
+ ```json
25
+ {
26
+ "version": "2.0.0",
27
+ "tasks": [
28
+ {
29
+ "label": "predicate: session start",
30
+ "type": "shell",
31
+ "command": "bash ${workspaceFolder}/packages/predicate-skill/hooks/vscode-copilot/session-start.sh"
32
+ },
33
+ {
34
+ "label": "predicate: maintain",
35
+ "type": "shell",
36
+ "command": "bash ${workspaceFolder}/packages/predicate-skill/hooks/vscode-copilot/pre-compact.sh"
37
+ }
38
+ ]
39
+ }
40
+ ```
41
+
42
+ If VS Code adds lifecycle hooks for Copilot Chat in the future, this
43
+ adapter is ready to wire them — script logic is unchanged.
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env bash
2
+ # VS Code Copilot pre-compact adapter. Run via cron or a VS Code task.
3
+ set -euo pipefail
4
+ predicate maintain
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ # VS Code Copilot session-start adapter. VS Code has no native SessionStart
3
+ # hook today — run this manually before invoking Copilot Chat, or wire it
4
+ # to a VS Code task in tasks.json.
5
+ set -euo pipefail
6
+ predicate sessionstart 2>/dev/null || \
7
+ echo "Predicate: Fuseki not reachable; run \`predicate up\` first."
@@ -0,0 +1,12 @@
1
+ {
2
+ "github.copilot.chat.mcp.servers": {
3
+ "predicate": {
4
+ "command": "node",
5
+ "args": ["__PLUGIN_DIR__/server.bundle.mjs"],
6
+ "env": {
7
+ "FUSEKI_URL": "http://localhost:3030",
8
+ "PREDICATE_DATASET": "predicate"
9
+ }
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ # VS Code Copilot stop adapter. Run manually after a long chat session
3
+ # or wire to a VS Code task that runs on workspace close.
4
+ set -euo pipefail
5
+ predicate maintain
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "predicate-skill",
3
- "version": "1.2.0",
3
+ "version": "2.0.1",
4
4
  "description": "Local reasoning knowledge graph (RDF/OWL) for AI agents — Claude Code plugin + MCP server + predicate CLI.",
5
5
  "author": {
6
6
  "name": "Nordic Agents Research",
@@ -30,6 +30,7 @@
30
30
  "commands",
31
31
  "hooks",
32
32
  "compose",
33
+ "dashboard",
33
34
  "LICENSE",
34
35
  "README.md"
35
36
  ],