gibi-bot 1.0.0 → 1.1.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.
- package/.context.json +47 -3
- package/.github/workflows/npm-publish.yml +33 -0
- package/.github/workflows/release.yml +45 -0
- package/.husky/commit-msg +1 -0
- package/.husky/pre-commit +2 -0
- package/.prettierignore +3 -0
- package/.prettierrc +7 -0
- package/CHANGELOG.md +45 -0
- package/DISTRIBUTION.md +9 -1
- package/GEMINI.md +28 -9
- package/README.md +55 -28
- package/commitlint.config.js +3 -0
- package/conductor/code_styleguides/general.md +6 -1
- package/conductor/code_styleguides/ts.md +42 -35
- package/conductor/product-guidelines.md +16 -12
- package/conductor/product.md +12 -7
- package/conductor/setup_state.json +1 -1
- package/conductor/tech-stack.md +4 -1
- package/conductor/tracks/slack_bot_20260107/metadata.json +1 -1
- package/conductor/tracks/slack_bot_20260107/plan.md +6 -1
- package/conductor/tracks/slack_bot_20260107/spec.md +9 -6
- package/conductor/tracks.md +2 -1
- package/conductor/workflow.md +74 -53
- package/dist/agents.js +7 -10
- package/dist/agents.test.js +17 -12
- package/dist/app.js +212 -135
- package/dist/config.js +5 -5
- package/dist/context.js +4 -3
- package/dist/context.test.js +2 -4
- package/eslint.config.mjs +17 -0
- package/jest.config.js +4 -3
- package/nodemon.json +5 -9
- package/package.json +34 -4
- package/release.config.js +22 -0
- package/src/agents.test.ts +62 -57
- package/src/agents.ts +94 -82
- package/src/app.d.ts +1 -1
- package/src/app.ts +298 -178
- package/src/config.ts +48 -48
- package/src/context.test.ts +54 -56
- package/src/context.ts +123 -114
- package/test_gemini.js +13 -9
- package/test_gemini_approval.js +13 -9
- package/test_gemini_write.js +19 -9
- package/tests/context.test.ts +145 -0
- package/tsconfig.json +1 -1
- package/src/app.js +0 -55
- package/src/app.js.map +0 -1
package/.context.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"C0A7J7EU39S": {
|
|
3
3
|
"id": "C0A7J7EU39S",
|
|
4
4
|
"createdAt": "2026-01-08T00:29:43.084Z",
|
|
5
|
-
"lastActiveAt": "2026-01-
|
|
5
|
+
"lastActiveAt": "2026-01-08T10:15:52.884Z",
|
|
6
6
|
"data": {
|
|
7
7
|
"messages": [
|
|
8
8
|
{
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"role": "assistant",
|
|
22
22
|
"content": "In my previous response, I summarized the project's file structure, highlighting key configuration files in the root, application logic in the `src/` directory, and planning documentation within `conductor/`."
|
|
23
23
|
}
|
|
24
|
-
]
|
|
24
|
+
],
|
|
25
|
+
"cwd": "/Users/skrug/PycharmProjects/Gibi"
|
|
25
26
|
},
|
|
26
27
|
"messages": [
|
|
27
28
|
{
|
|
@@ -181,5 +182,48 @@
|
|
|
181
182
|
"content": "I will list all the files in the current directory.\nI will list all the files in the project recursively.\nThe files in the project are listed below:\n\n- `.context.json`\n- `src/app.ts`\n- `src/agents.test.ts`\n- `package.json`\n- `src/context.test.ts`\n- `jest.config.js`\n- `package-lock.json`\n- `diagnose.ts`\n- `README.md`\n- `src/context.ts`\n- `test_gemini_approval.js`\n- `test_gemini_write.js`\n- `test_gemini.js`\n- `src/agents.ts`\n- `src/config.ts`\n- `.gitignore`\n- `.DS_Store`\n- `assets/gibi_avatar.png`\n- `src/prompts.ts`\n- `nodemon.json`\n- `conductor/tracks.md`\n- `conductor/tracks/slack_bot_20260107/plan.md`\n- `.env.example`\n- `conductor/code_styleguides/ts.md`\n- `tsconfig.json`\n- `src/app.d.ts`\n- `src/app.d.ts.map`\n- `src/app.js`\n- `src/app.js.map`\n- `conductor/tracks/slack_bot_20260107/spec.md`\n- `conductor/tracks/slack_bot_20260107/metadata.json`\n- `conductor/tech-stack.md`\n- `GEMINI.md`\n- `conductor/setup_state.json`\n- `conductor/workflow.md`\n- `conductor/code_styleguides/general.md`\n- `conductor/product-guidelines.md`\n- `conductor/product.md`\n- `LICENSE`"
|
|
182
183
|
}
|
|
183
184
|
]
|
|
185
|
+
},
|
|
186
|
+
"1767867160.780669": {
|
|
187
|
+
"id": "1767867160.780669",
|
|
188
|
+
"createdAt": "2026-01-08T10:12:41.771Z",
|
|
189
|
+
"lastActiveAt": "2026-01-08T10:15:57.128Z",
|
|
190
|
+
"data": {
|
|
191
|
+
"messages": [
|
|
192
|
+
{
|
|
193
|
+
"role": "user",
|
|
194
|
+
"content": "show me all files"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"role": "assistant",
|
|
198
|
+
"content": "I will list all files in the current directory.\nI will recursively list all files in the project to ensure you see everything.\nI have listed all the files in the project for you."
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"role": "user",
|
|
202
|
+
"content": "cd"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"role": "assistant",
|
|
206
|
+
"content": "I will show you the current working directory.\nThe current working directory is `/Users/skrug/PycharmProjects/Gibi`."
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"messages": [
|
|
211
|
+
{
|
|
212
|
+
"role": "user",
|
|
213
|
+
"content": "show me all files"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"role": "assistant",
|
|
217
|
+
"content": "I will list all files in the current directory.\nI will recursively list all files in the project to ensure you see everything.\nI have listed all the files in the project for you."
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"role": "user",
|
|
221
|
+
"content": "cd"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"role": "assistant",
|
|
225
|
+
"content": "I will show you the current working directory.\nThe current working directory is `/Users/skrug/PycharmProjects/Gibi`."
|
|
226
|
+
}
|
|
227
|
+
]
|
|
184
228
|
}
|
|
185
|
-
}
|
|
229
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Node.js Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [created]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: 20
|
|
18
|
+
- run: npm ci
|
|
19
|
+
- run: npm test
|
|
20
|
+
|
|
21
|
+
publish-npm:
|
|
22
|
+
needs: build
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: 20
|
|
29
|
+
registry-url: https://registry.npmjs.org/
|
|
30
|
+
- run: npm ci
|
|
31
|
+
- run: npm publish
|
|
32
|
+
env:
|
|
33
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write # to be able to publish a GitHub release
|
|
10
|
+
issues: write # to be able to comment on released issues
|
|
11
|
+
pull-requests: write # to be able to comment on released pull requests
|
|
12
|
+
id-token: write # to enable use of OIDC for npm provenance
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
release:
|
|
16
|
+
name: Release
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout
|
|
20
|
+
uses: actions/checkout@v3
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
|
|
24
|
+
- name: Setup Node.js
|
|
25
|
+
uses: actions/setup-node@v3
|
|
26
|
+
with:
|
|
27
|
+
node-version: 'lts/*'
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: npm ci
|
|
31
|
+
|
|
32
|
+
- name: Lint
|
|
33
|
+
run: npm run lint
|
|
34
|
+
|
|
35
|
+
- name: Build
|
|
36
|
+
run: npm run build
|
|
37
|
+
|
|
38
|
+
- name: Test
|
|
39
|
+
run: npm test
|
|
40
|
+
|
|
41
|
+
- name: Release
|
|
42
|
+
env:
|
|
43
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
44
|
+
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # Using OIDC Trusted Publishing
|
|
45
|
+
run: npx semantic-release
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npx --no -- commitlint --edit ${1}
|
package/.prettierignore
ADDED
package/.prettierrc
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
## [1.1.1](https://github.com/fa-krug/Gibi/compare/v1.1.0...v1.1.1) (2026-01-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* resolve syntax error in release config ([95a73eb](https://github.com/fa-krug/Gibi/commit/95a73eb609bc461596e90f92e357cc22395c09ba))
|
|
7
|
+
|
|
8
|
+
# [1.1.0](https://github.com/fa-krug/Gibi/compare/v1.0.0...v1.1.0) (2026-01-08)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **build:** resolve type errors and integrate husky ([69210dc](https://github.com/fa-krug/Gibi/commit/69210dc14fb0047c5911e3208a1ddff4060f2e76))
|
|
14
|
+
* **config:** Handle keytar access errors gracefully and commit pending source files ([6ef3470](https://github.com/fa-krug/Gibi/commit/6ef3470188d5baf5e562c1f824c6eeef5bf79378))
|
|
15
|
+
* **config:** Restore accidental deletion of code in loadConfig ([c82b6b6](https://github.com/fa-krug/Gibi/commit/c82b6b60e1464a9b239b007d146d4ea61136ed98))
|
|
16
|
+
* resolve linting errors and warnings by adding types ([f25ca0d](https://github.com/fa-krug/Gibi/commit/f25ca0dd2e76ee66745ac2629508afbae530da5c))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* always run gemini with --approval-mode yolo and update docs/tracks ([9464820](https://github.com/fa-krug/Gibi/commit/94648205248f59e0fea683033609027c1ef3854d))
|
|
22
|
+
* **bot:** Implement basic ping-pong bot ([8cefef6](https://github.com/fa-krug/Gibi/commit/8cefef6e530e4e146ccd588004aadec4e42dfb13))
|
|
23
|
+
* **config:** Add environment variable configuration ([52ef449](https://github.com/fa-krug/Gibi/commit/52ef4498e570c2c2cba25168f44b394f702efa44))
|
|
24
|
+
* **config:** Implement Slack token loading ([603a54f](https://github.com/fa-krug/Gibi/commit/603a54f557a7adc2e519931604c98f2b56336b9a))
|
|
25
|
+
* improve Slack UX with Block Kit, Home Tab, and Modals ([1cbc5ab](https://github.com/fa-krug/Gibi/commit/1cbc5abb877b9dd89e1c2c5da24199f0a15d70f6))
|
|
26
|
+
|
|
27
|
+
# 1.0.0 (2026-01-08)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **build:** resolve type errors and integrate husky ([69210dc](https://github.com/fa-krug/Gibi/commit/69210dc14fb0047c5911e3208a1ddff4060f2e76))
|
|
33
|
+
* **config:** Handle keytar access errors gracefully and commit pending source files ([6ef3470](https://github.com/fa-krug/Gibi/commit/6ef3470188d5baf5e562c1f824c6eeef5bf79378))
|
|
34
|
+
* **config:** Restore accidental deletion of code in loadConfig ([c82b6b6](https://github.com/fa-krug/Gibi/commit/c82b6b60e1464a9b239b007d146d4ea61136ed98))
|
|
35
|
+
* resolve linting errors and warnings by adding types ([f25ca0d](https://github.com/fa-krug/Gibi/commit/f25ca0dd2e76ee66745ac2629508afbae530da5c))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
|
|
40
|
+
* always run gemini with --approval-mode yolo and update docs/tracks ([9464820](https://github.com/fa-krug/Gibi/commit/94648205248f59e0fea683033609027c1ef3854d))
|
|
41
|
+
* **bot:** Implement basic ping-pong bot ([8cefef6](https://github.com/fa-krug/Gibi/commit/8cefef6e530e4e146ccd588004aadec4e42dfb13))
|
|
42
|
+
* **config:** Add environment variable configuration ([52ef449](https://github.com/fa-krug/Gibi/commit/52ef4498e570c2c2cba25168f44b394f702efa44))
|
|
43
|
+
* **config:** Implement Slack token loading ([603a54f](https://github.com/fa-krug/Gibi/commit/603a54f557a7adc2e519931604c98f2b56336b9a))
|
|
44
|
+
* improve Slack UX with Block Kit, Home Tab, and Modals ([1cbc5ab](https://github.com/fa-krug/Gibi/commit/1cbc5abb877b9dd89e1c2c5da24199f0a15d70f6))
|
|
45
|
+
* **init:** Set up basic project structure ([60a1358](https://github.com/fa-krug/Gibi/commit/60a1358ba9c765e2617a03d31f8d3f258c9067eb))
|
package/DISTRIBUTION.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
This document outlines how to distribute **Gibi** as a command-line tool and how users can execute it.
|
|
4
4
|
|
|
5
5
|
## 1. Building for Distribution
|
|
6
|
+
|
|
6
7
|
Before distributing, the TypeScript source code must be compiled into JavaScript.
|
|
7
8
|
|
|
8
9
|
```bash
|
|
@@ -12,6 +13,7 @@ npm run build
|
|
|
12
13
|
This command runs `tsc` and outputs the compiled code to the `dist/` directory.
|
|
13
14
|
|
|
14
15
|
## 2. Local Installation (For Testing/Personal Use)
|
|
16
|
+
|
|
15
17
|
You can install the package globally on your machine directly from the source. This is excellent for testing the CLI experience without publishing.
|
|
16
18
|
|
|
17
19
|
```bash
|
|
@@ -22,6 +24,7 @@ npm install -g .
|
|
|
22
24
|
Once installed, the `gibi` command will be available globally in your terminal.
|
|
23
25
|
|
|
24
26
|
## 3. Usage as a CLI Tool
|
|
27
|
+
|
|
25
28
|
Once installed, you can start the bot from anywhere:
|
|
26
29
|
|
|
27
30
|
```bash
|
|
@@ -29,13 +32,16 @@ gibi
|
|
|
29
32
|
```
|
|
30
33
|
|
|
31
34
|
### Environment Setup
|
|
35
|
+
|
|
32
36
|
Gibi requires specific environment variables (`SLACK_BOT_TOKEN`, `SLACK_APP_TOKEN`, etc.).
|
|
33
37
|
On the first run, `gibi` will check for these. If not found in the system keychain, it will verify if a `.env` file exists in the current directory or prompt you to enter them securely.
|
|
34
38
|
|
|
35
39
|
### Context
|
|
40
|
+
|
|
36
41
|
When running `gibi` from a specific directory, that directory becomes the initial "Current Working Directory" (CWD) for the bot's file operations (like `/cd` or reading files).
|
|
37
42
|
|
|
38
43
|
## 4. Publishing to NPM (Optional)
|
|
44
|
+
|
|
39
45
|
To share Gibi with others via the NPM registry:
|
|
40
46
|
|
|
41
47
|
1. **Login to NPM**:
|
|
@@ -43,10 +49,12 @@ To share Gibi with others via the NPM registry:
|
|
|
43
49
|
npm login
|
|
44
50
|
```
|
|
45
51
|
2. **Publish**:
|
|
52
|
+
|
|
46
53
|
```bash
|
|
47
54
|
npm publish --access public
|
|
48
55
|
```
|
|
49
|
-
|
|
56
|
+
|
|
57
|
+
_(Note: Ensure `package.json` has a unique version number before publishing)_
|
|
50
58
|
|
|
51
59
|
3. **User Installation**:
|
|
52
60
|
Users can then install it via:
|
package/GEMINI.md
CHANGED
|
@@ -1,20 +1,39 @@
|
|
|
1
1
|
# Gibi Project Context
|
|
2
2
|
|
|
3
3
|
## Project Overview
|
|
4
|
+
|
|
4
5
|
**Gibi** is a software project currently in its setup phase.
|
|
5
6
|
It is being built as a **TypeScript** application using the **Slack Bolt** framework.
|
|
6
7
|
|
|
7
8
|
## Architecture & Technology Stack
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
|
|
10
|
+
- **Language:** TypeScript
|
|
11
|
+
- **Runtime:** Node.js
|
|
12
|
+
- **Framework:** @slack/bolt
|
|
13
|
+
- **Status:** Initial Setup
|
|
12
14
|
|
|
13
15
|
## Building and Running
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
- `npm install` - Install dependencies.
|
|
18
|
+
- `npm start` - Run the application (to be configured).
|
|
19
|
+
- `npm test` - Run tests.
|
|
17
20
|
|
|
18
21
|
## Development Conventions
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
|
|
23
|
+
- **Version Control:** Git.
|
|
24
|
+
- **Style:** TypeScript standard (ESLint + Prettier).
|
|
25
|
+
|
|
26
|
+
## Git Hooks & Commit Convention
|
|
27
|
+
|
|
28
|
+
This project uses **Husky** to enforce code quality and commit message standards.
|
|
29
|
+
|
|
30
|
+
- **Pre-commit:**
|
|
31
|
+
- Linting (`eslint`) and Formatting (`prettier`) are automatically applied to staged files via `lint-staged`.
|
|
32
|
+
- Tests (`npm test`) are run before the commit is finalized.
|
|
33
|
+
- **Commit Message:**
|
|
34
|
+
- Enforced by `commitlint` using the [Conventional Commits](https://www.conventionalcommits.org/) specification.
|
|
35
|
+
- Format: `type(scope): description`
|
|
36
|
+
- Examples:
|
|
37
|
+
- `feat(auth): add login endpoint`
|
|
38
|
+
- `fix(core): resolve null pointer exception`
|
|
39
|
+
- `chore: update dependencies`
|
package/README.md
CHANGED
|
@@ -5,15 +5,17 @@ Gibi is a Slack bot built with TypeScript and the Slack Bolt framework.
|
|
|
5
5
|
## Setup & Configuration
|
|
6
6
|
|
|
7
7
|
### Prerequisites
|
|
8
|
+
|
|
8
9
|
- Node.js (v18+ recommended)
|
|
9
10
|
- A Slack Workspace
|
|
10
11
|
- **Agent CLIs** (Optional but recommended):
|
|
11
|
-
- `gemini` (Google Gemini) -
|
|
12
|
+
- `gemini` (Google Gemini) - _Default_
|
|
12
13
|
- `claude` (Anthropic Claude)
|
|
13
14
|
- `cursor` (Cursor AI)
|
|
14
|
-
|
|
15
|
+
_Ensure these CLIs are installed and available in your system's PATH._
|
|
15
16
|
|
|
16
17
|
### 1. Create Slack App & Obtain Tokens (2026 Guide)
|
|
18
|
+
|
|
17
19
|
The easiest way to configure the bot is using a **Slack App Manifest**.
|
|
18
20
|
|
|
19
21
|
1. Navigate to [Slack Apps](https://api.slack.com/apps).
|
|
@@ -26,7 +28,7 @@ The easiest way to configure the bot is using a **Slack App Manifest**.
|
|
|
26
28
|
display_information:
|
|
27
29
|
name: Gibi
|
|
28
30
|
description: A helpful Slack bot
|
|
29
|
-
background_color:
|
|
31
|
+
background_color: '#2c2d30'
|
|
30
32
|
features:
|
|
31
33
|
bot_user:
|
|
32
34
|
display_name: Gibi
|
|
@@ -43,23 +45,23 @@ oauth_config:
|
|
|
43
45
|
slash_commands:
|
|
44
46
|
- command: /cd
|
|
45
47
|
description: Change working directory
|
|
46
|
-
usage_hint:
|
|
48
|
+
usage_hint: '[path]'
|
|
47
49
|
should_escape: false
|
|
48
50
|
- command: /plan
|
|
49
51
|
description: Enter Plan Mode to generate implementation plans
|
|
50
|
-
usage_hint:
|
|
52
|
+
usage_hint: '[goal]'
|
|
51
53
|
should_escape: false
|
|
52
54
|
- command: /model
|
|
53
55
|
description: Switch the AI model for the current context
|
|
54
|
-
usage_hint:
|
|
56
|
+
usage_hint: '[model_name]'
|
|
55
57
|
should_escape: false
|
|
56
58
|
- command: /help
|
|
57
59
|
description: Show available commands
|
|
58
|
-
usage_hint:
|
|
60
|
+
usage_hint: ''
|
|
59
61
|
should_escape: false
|
|
60
62
|
- command: /agent
|
|
61
63
|
description: Switch the backing agent
|
|
62
|
-
usage_hint:
|
|
64
|
+
usage_hint: '[agent_name]'
|
|
63
65
|
should_escape: false
|
|
64
66
|
settings:
|
|
65
67
|
event_subscriptions:
|
|
@@ -75,19 +77,20 @@ settings:
|
|
|
75
77
|
|
|
76
78
|
6. Click **Next** and then **Create**.
|
|
77
79
|
7. **Obtain Bot Token**:
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
80
|
+
- Go to **OAuth & Permissions**.
|
|
81
|
+
- Click **Install to Workspace**.
|
|
82
|
+
- Copy the `xoxb-...` token. This is your `SLACK_BOT_TOKEN`.
|
|
81
83
|
8. **Obtain Signing Secret**:
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
+
- Go to **Basic Information** > **App Credentials**.
|
|
85
|
+
- Copy the **Signing Secret**. This is your `SLACK_SIGNING_SECRET`.
|
|
84
86
|
9. **Obtain App Token**:
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
87
|
+
- Go to **Basic Information** > **App-Level Tokens**.
|
|
88
|
+
- Click **Generate Token and Scopes**.
|
|
89
|
+
- Name it (e.g., `socket-mode`), add the `connections:write` scope, and generate.
|
|
90
|
+
- Copy the `xapp-...` token. This is your `SLACK_APP_TOKEN`.
|
|
89
91
|
|
|
90
92
|
### 2. Run the Application
|
|
93
|
+
|
|
91
94
|
1. Install dependencies:
|
|
92
95
|
```bash
|
|
93
96
|
npm install
|
|
@@ -99,6 +102,7 @@ settings:
|
|
|
99
102
|
3. On the first run, the app will prompt you to enter the tokens you obtained above. It will securely save them to your system keychain so you don't need to enter them again.
|
|
100
103
|
|
|
101
104
|
### 2a. Run as CLI (Global Install)
|
|
105
|
+
|
|
102
106
|
Alternatively, you can install Gibi globally and run it from any directory:
|
|
103
107
|
|
|
104
108
|
```bash
|
|
@@ -107,86 +111,109 @@ gibi
|
|
|
107
111
|
```
|
|
108
112
|
|
|
109
113
|
## Development
|
|
114
|
+
|
|
110
115
|
- `npm start`: Runs the bot in development mode.
|
|
111
116
|
- `npm run dev`: Runs the bot with auto-reload (using nodemon).
|
|
112
117
|
- `npm run build`: Compiles TypeScript to JavaScript.
|
|
118
|
+
- `npm run lint`: Check for linting errors.
|
|
119
|
+
- `npm run lint:fix`: Auto-fix linting errors.
|
|
120
|
+
- `npm run format`: Auto-format code with Prettier.
|
|
121
|
+
- `npm run format:check`: Check if code is formatted.
|
|
113
122
|
|
|
114
123
|
## Features
|
|
115
124
|
|
|
116
125
|
### 🏠 App Home Dashboard
|
|
126
|
+
|
|
117
127
|
Gibi now features a dedicated **Home tab** in Slack.
|
|
128
|
+
|
|
118
129
|
- **System Status**: View available models and agents.
|
|
119
130
|
- **Recent Activity**: See your most recent conversation contexts and their current state (Model, Agent, CWD) at a glance.
|
|
120
131
|
|
|
121
132
|
### 📂 Interactive Navigation
|
|
133
|
+
|
|
122
134
|
The `/cd` command and `cd [path]` messages now provide an interactive directory browser.
|
|
135
|
+
|
|
123
136
|
- **Buttons**: Navigate into folders by clicking buttons instead of typing paths.
|
|
124
137
|
- **Quick Up**: Use the "Up one level" button for fast traversal.
|
|
125
138
|
|
|
126
139
|
### 🛠️ Visual Configuration
|
|
140
|
+
|
|
127
141
|
Switching models and agents is now easier and less error-prone.
|
|
142
|
+
|
|
128
143
|
- **Modals**: Use `/model` or `/agent` without arguments to open a popup window with selection dropdowns.
|
|
129
144
|
|
|
130
145
|
### 🤖 Rich Agent Responses
|
|
146
|
+
|
|
131
147
|
Conversation with Gibi is more structured and informative.
|
|
148
|
+
|
|
132
149
|
- **Context Footers**: Every response shows which Agent and Model were used, along with the current working directory.
|
|
133
150
|
- **Feedback**: Use the 👍/👎 buttons on responses to provide quick feedback.
|
|
134
151
|
|
|
135
152
|
### Context Awareness & Threading
|
|
153
|
+
|
|
136
154
|
Gibi now uses a **Thread-First** approach to keep your channels clean and organized.
|
|
137
155
|
|
|
138
156
|
- **Start a Task**: Mention the bot in a channel to start a new context (e.g., `@Gibi let's debug this`). Gibi will reply **in a thread**.
|
|
139
|
-
- **Chat in Thread**: Once a thread is started, you can reply directly in that thread
|
|
157
|
+
- **Chat in Thread**: Once a thread is started, you can reply directly in that thread _without_ mentioning `@Gibi` again. The bot will automatically listen and respond within that specific context.
|
|
140
158
|
- **Noise Reduction**: Gibi ignores general channel messages. It only responds to:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
159
|
+
- Direct Mentions (`@Gibi`)
|
|
160
|
+
- Direct Messages (DMs)
|
|
161
|
+
- Messages within threads it is already participating in.
|
|
144
162
|
- **Isolation**: Each thread is a completely isolated context with its own memory, working directory (`CWD`), and configuration.
|
|
145
163
|
|
|
146
164
|
### Persistence
|
|
165
|
+
|
|
147
166
|
Contexts are saved to `.context.json` locally. If you restart the bot, it picks up right where it left off.
|
|
148
167
|
|
|
149
168
|
### `/cd` Command
|
|
150
|
-
|
|
169
|
+
|
|
170
|
+
Change the bot's working directory _contextually_ for the current channel.
|
|
171
|
+
|
|
151
172
|
- **Usage**: `/cd [path]`
|
|
152
173
|
- **Examples**:
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
174
|
+
- `/cd src`: Move into the `src` folder.
|
|
175
|
+
- `/cd ..`: Move up one level.
|
|
176
|
+
- `/cd`: Show the current directory listing.
|
|
156
177
|
- **Note**: The directory change is persisted per channel/thread. It does not affect the global process or other channels.
|
|
157
178
|
|
|
158
179
|
### `/plan` Command
|
|
180
|
+
|
|
159
181
|
Enter "Plan Mode" where the bot acts as a technical architect to help you plan features.
|
|
182
|
+
|
|
160
183
|
- **Usage**: `/plan [goal]`
|
|
161
184
|
- **Example**: `/plan Build a new login system`
|
|
162
185
|
- **Behavior**: The bot will generate a detailed markdown plan/checklist and ask clarifying questions.
|
|
163
186
|
|
|
164
187
|
### `/model` Command
|
|
188
|
+
|
|
165
189
|
Switch the Gemini model used for the current conversation.
|
|
190
|
+
|
|
166
191
|
- **Usage**: `/model [model_name]`
|
|
167
192
|
- **Example**: `/model gemini-1.5-pro`
|
|
168
193
|
- **Note**: Persisted per channel/thread.
|
|
169
194
|
|
|
170
195
|
### `/agent` Command
|
|
196
|
+
|
|
171
197
|
Switch the backing AI agent used for the conversation.
|
|
198
|
+
|
|
172
199
|
- **Usage**: `/agent [agent_name]`
|
|
173
200
|
- **Supported Agents**: `gemini`, `claude`, `cursor`
|
|
174
201
|
- **Example**: `/agent claude`
|
|
175
202
|
- **Note**: Persisted per channel/thread. Requires the respective CLI to be installed.
|
|
176
203
|
|
|
177
204
|
### `/help` Command
|
|
178
|
-
Show a list of all available commands and their usage.
|
|
179
|
-
- **Usage**: `/help`
|
|
180
205
|
|
|
206
|
+
Show a list of all available commands and their usage.
|
|
181
207
|
|
|
208
|
+
- **Usage**: `/help`
|
|
182
209
|
|
|
183
210
|
## Troubleshooting
|
|
184
211
|
|
|
185
212
|
### Events Not Firing?
|
|
213
|
+
|
|
186
214
|
If features like the invite greeting aren't working:
|
|
187
215
|
|
|
188
216
|
1. **Check Event Subscriptions**: Ensure the relevant events (e.g., `member_joined_channel`) are added in the Slack App settings.
|
|
189
217
|
2. **Reinstall App**: After changing permissions or events, you **MUST** reinstall the app to the workspace.
|
|
190
218
|
- Go to **Install App** in the sidebar.
|
|
191
219
|
- Click **Reinstall to Workspace**.
|
|
192
|
-
|
|
@@ -3,21 +3,26 @@
|
|
|
3
3
|
This document outlines general coding principles that apply across all languages and frameworks used in this project.
|
|
4
4
|
|
|
5
5
|
## Readability
|
|
6
|
+
|
|
6
7
|
- Code should be easy to read and understand by humans.
|
|
7
8
|
- Avoid overly clever or obscure constructs.
|
|
8
9
|
|
|
9
10
|
## Consistency
|
|
11
|
+
|
|
10
12
|
- Follow existing patterns in the codebase.
|
|
11
13
|
- Maintain consistent formatting, naming, and structure.
|
|
12
14
|
|
|
13
15
|
## Simplicity
|
|
16
|
+
|
|
14
17
|
- Prefer simple solutions over complex ones.
|
|
15
18
|
- Break down complex problems into smaller, manageable parts.
|
|
16
19
|
|
|
17
20
|
## Maintainability
|
|
21
|
+
|
|
18
22
|
- Write code that is easy to modify and extend.
|
|
19
23
|
- Minimize dependencies and coupling.
|
|
20
24
|
|
|
21
25
|
## Documentation
|
|
22
|
-
|
|
26
|
+
|
|
27
|
+
- Document _why_ something is done, not just _what_.
|
|
23
28
|
- Keep documentation up-to-date with code changes.
|