Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions extensions/token-pacman/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Token Pac-Man

A GitHub Copilot canvas that visualizes live session AI-credit usage as a Pac-Man board. Pac-Man eats pellets as credits are consumed, ghosts chase him, fruit milestones appear, and the game ends when the configured session credit limit is exceeded.

## Files

- `extension.mjs` - canvas declaration, loopback server, live usage/quota syncing, and agent actions.
- `assets/preview.png` - gallery preview image required by the Awesome Copilot canvas catalog.
- `assets/token-pacman.jpg` - source screenshot included for the gallery.
- `copilot-extension.json` - Copilot extension name/version metadata for gist installs.
- `canvas.json` - Awesome Copilot gallery metadata.
- `package.json` - extension metadata used by the generated website catalog.

## Install

Ask Copilot to install the committed extension URL:

```text
Install this extension: https://github.com/github/awesome-copilot/tree/main/extensions/token-pacman
```

The shared gist version is also available at:

```text
https://gist.github.com/jamesmontemagno/75d701d25f49c94ba332529fb8ec1346
```

## Agent actions

- `sync_usage` - refresh the canvas from the active session's accumulated AI-credit usage and plan entitlement.
- `set_limit { limit }` - set the AI-credit limit that triggers game over and resync the pellet board.
- `reset_run` - clear the visible fruit streak and start a fresh chase without changing the live session credit total.
Binary file added extensions/token-pacman/assets/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions extensions/token-pacman/canvas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"id": "token-pacman",
"name": "Token Pac-Man",
"description": "Visualizes live session AI-credit usage as a Pac-Man board with pellets, ghosts, fruit milestones, and game-over limits.",
"version": "1.0.0",
"author": {
"name": "James Montemagno",
"url": "https://github.com/jamesmontemagno"
},
"keywords": [
"ai-credits",
"copilot-canvas",
"interactive-canvas",
"pac-man",
"quota-tracking",
"session-usage"
],
"screenshots": {
"icon": {
"path": "assets/preview.png",
"type": "image/png"
},
"gallery": {
"path": "assets/preview.png",
"type": "image/png"
}
}
}
4 changes: 4 additions & 0 deletions extensions/token-pacman/copilot-extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "token-pacman",
"version": 1
}
396 changes: 396 additions & 0 deletions extensions/token-pacman/extension.mjs

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions extensions/token-pacman/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "token-pacman",
"version": "1.0.0",
"type": "module",
"main": "extension.mjs",
"dependencies": {
"@github/copilot-sdk": "latest"
},
"description": "Visualizes live session AI-credit usage as a Pac-Man board with pellets, ghosts, fruit milestones, and game-over limits.",
"keywords": [
"ai-credits",
"copilot-canvas",
"interactive-canvas",
"pac-man",
"quota-tracking",
"session-usage"
]
}
Loading