Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from TrafficGuard:main #11

Open
wants to merge 81 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
b280a44
Project outline doc generation. SWE-bench runner. Initial Slack chatb…
danielcampagnolitg Sep 2, 2024
9361119
Add files for a new autonomous agent
danielcampagnolitg Sep 3, 2024
004fade
Add Cerebras support. Add initial Slackbot code. Add agent execution …
danielcampagnolitg Sep 6, 2024
8063282
Update docker env format. Add aider script
danielcampagnolitg Sep 6, 2024
32519b3
Update docker env format
danielcampagnolitg Sep 6, 2024
c0399e5
On the new agent page only show LLMs which are configured
danielcampagnolitg Sep 8, 2024
60326bf
Add initial chat component
danielcampagnolitg Sep 8, 2024
37a651d
Update IAP middleware to allow healthcheck
danielcampagnolitg Sep 10, 2024
06ab6ba
Update Fireworks to have Llama 3.1 70b and 405b
danielcampagnolitg Sep 10, 2024
9929aa1
chat compile fix. Refactor to firestore and slack module
danielcampagnolitg Sep 10, 2024
9495079
frontend compile fix
danielcampagnolitg Sep 10, 2024
dbf5328
disable broken tests
danielcampagnolitg Sep 10, 2024
5d915dc
Fix IAP
danielcampagnolitg Sep 10, 2024
102d6c1
Rename to Sophia (#26)
danielcampagnolitg Sep 11, 2024
2afa534
sophia rename. Initial chat service
danielcampagnolitg Sep 11, 2024
af46dbf
Initial chat (#27)
danielcampagnolitg Sep 18, 2024
abba3c2
Merge branch 'main' of https://github.com/TrafficGuard/sophia
danielcampagnolitg Sep 18, 2024
c955b88
Update analyzeCompileError to better include files with compile errors
danielcampagnolitg Sep 19, 2024
2598664
Reload llm cache on profile save to update configured llms
danielcampagnolitg Sep 19, 2024
bcca026
Update generateText2 to generateTextFromMessages
danielcampagnolitg Sep 23, 2024
da1291b
runtime error fix
danielcampagnolitg Sep 23, 2024
059756e
Update chat route to return the generated message
danielcampagnolitg Sep 23, 2024
7cd1d27
Disable ts imports
campers Sep 24, 2024
98a13ad
Code query UI (#28)
danielcampagnolitg Sep 26, 2024
8ce7011
Update perplexity model
campers Sep 28, 2024
9737fa9
Fix codeEditor llmHistoryFile name change
danielcampagnolitg Sep 27, 2024
9bbbfc7
various updates
danielcampagnolitg Sep 30, 2024
ac8764b
[Typo] : Being -> Begin (#21)
GautierT Oct 4, 2024
d99be7f
Add retry on autonomous agent plan generation
campers Oct 5, 2024
5295d40
Sumarizer agent (#29)
danielcampagnolitg Oct 5, 2024
5c1f964
Rename pythonAgent to codegenAgent. UI fixes. Doc updates
danielcampagnolitg Oct 7, 2024
aad1877
Remove url rewriting in fastify
danielcampagnolitg Oct 8, 2024
6b54b5b
Add WIP of new file select agent. Implement vercel ai for deepseek, o…
danielcampagnolitg Oct 21, 2024
f1c8125
Update UI
danielcampagnolitg Oct 23, 2024
97e9a21
Disable streaming for openai non-streaming generation so o1 works
campers Oct 23, 2024
60ff628
CI fix
danielcampagnolitg Oct 23, 2024
a910e8e
Update to new Claude Sonnet 3.5 version
danielcampagnolitg Oct 23, 2024
2391e63
Update frontend CI test
danielcampagnolitg Oct 23, 2024
18359df
Update chat. Add cerebras. Align message with ai package (#33)
danielcampagnolitg Oct 27, 2024
5150b84
Llms refactor (#34)
danielcampagnolitg Oct 27, 2024
330a7d8
Update logo and favicons
danielcampagnolitg Oct 28, 2024
ae05256
Add 32x32 favicon
danielcampagnolitg Oct 28, 2024
81f3cd8
Release prep (#35)
danielcampagnolitg Nov 20, 2024
f699ccd
Updates for initial release (#36)
danielcampagnolitg Dec 3, 2024
6c83d5f
Update package.json version
danielcampagnolitg Dec 3, 2024
edde4fc
Refactor to reduce coupling between modules. Add agent parent/child p…
danielcampagnolitg Dec 4, 2024
4c30818
v0.3.0 (#39)
danielcampagnolitg Dec 5, 2024
5c7422b
feat: Update default routes to redirect to chat component
danielcampagnolitg Dec 5, 2024
6f818eb
Donwload tiktokenizer model in prod Dockerfile
danielcampagnolitg Dec 6, 2024
f3683f7
lint
danielcampagnolitg Dec 6, 2024
1c2b9f0
(feat) Add agentId and agentParentId to structured logs
danielcampagnolitg Dec 6, 2024
9fd0b25
Add link to Cloud Logging on agent details page and make it through a…
danielcampagnolitg Dec 6, 2024
4f33fd9
Update agentContextLocalStorage.ts
danielcampagnolitg Dec 6, 2024
9026faa
Fix tiktokenizer initialization in Dockerfile
danielcampagnolitg Dec 9, 2024
48a34a8
Fix tiktokenizer initialization in Dockerfile
danielcampagnolitg Dec 9, 2024
25bdada
Ensure dir exists before cloning a repo to it
danielcampagnolitg Dec 9, 2024
a33d39d
Add mask to ExecCmdOptions (not yet implemented)
danielcampagnolitg Dec 9, 2024
6848b70
0.4.0 (#40)
danielcampagnolitg Dec 19, 2024
c5c5d46
Update version to 0.4.0
danielcampagnolitg Dec 19, 2024
40bf386
v0.5.0 (#42)
danielcampagnolitg Jan 6, 2025
c0a4622
Add example prompts docs page
danielcampagnolitg Jan 6, 2025
3c4c0ae
Update GitLab webhook logging
danielcampagnolitg Jan 6, 2025
d598ce8
Fix Cerebras llama 3.3 model id
danielcampagnolitg Jan 7, 2025
5a481a1
Update llm route to handle invalid llm id's
danielcampagnolitg Jan 7, 2025
5a52fe8
V0.6.0 (#44)
danielcampagnolitg Jan 15, 2025
74a79b7
Rename .dockerignore to .dockerignore (#45)
shaneholloman Jan 16, 2025
4bc939d
Fix multiple python imports in codegen agent
danielcampagnolitg Jan 16, 2025
8ebab5a
Unproxy function call arguments set on agent state in codegen agent
danielcampagnolitg Jan 16, 2025
165579c
Add Perplexity LLM implementation which can be used in chat or agents…
danielcampagnolitg Jan 20, 2025
805d6b3
Add LiveFiles. Add defaultLLMs. Update GitLab.cloneProject. In SWE ag…
danielcampagnolitg Jan 20, 2025
e224377
Compile fix
danielcampagnolitg Jan 20, 2025
c35ab2f
Revert hardcoded file selection in code.ts
danielcampagnolitg Jan 20, 2025
4d541cf
Add temp, topK, topP etc settings for chat
campers Jan 20, 2025
c0ce6c9
Update ai package and providers
campers Jan 22, 2025
8be282a
Update DeepSeek and Cerebras to use @ai-sdk packages. Add DeepSeek R1
campers Jan 22, 2025
26a570d
Comment out AI generated UI test with compile error
campers Jan 22, 2025
b2434e7
Disable failing AI generated test
campers Jan 22, 2025
1064e0c
Merge pull request #46 from TrafficGuard/ai-4-1
campers Jan 22, 2025
d6223be
V0.6.0 release (#47)
danielcampagnolitg Feb 3, 2025
ace85e6
Add Perplexity reasoning pro. Add Groq Llama 70b R1 distill
danielcampagnolitg Feb 4, 2025
c184739
V0.7.0 (#48)
danielcampagnolitg Feb 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .dockerignore → .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ node_modules
dist
bin
.venv
.nous/
.typedai/
frontend

5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ jobs:
working-directory: ./frontend
run: npm ci

- name: Install Chrome
uses: browser-actions/setup-chrome@latest

- name: Run tests (frontend)
working-directory: ./frontend
run: npm run test:ci
env:
CHROME_BIN: /usr/bin/google-chrome-stable
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ temp/
.ignore
.cache
.venv/
.nous/
.typedai/
src/cli/*-in
src/cli/*-out
tg/
Expand Down
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
npm run lint && npm test && npx --no-install lint-staged
#!/usr/bin/bash
source ~/.nvm/nvm.sh && nvm use && npm run lint:ci # && npm test && npx --no-install lint-staged
2 changes: 2 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/bash
source ~/.nvm/nvm.sh && nvm use && npm run lint:ci && npm test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.14
22.10.0
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

# August 2024

Added initial SWE-bench runner. Also working on inference using the containerised environments at https://github.com/TrafficGuard/SWE-bench/blob/main/swebench/harness/run_inference.py

Added a process to generate documentation for a project.This is a bottom-up process which generates a one sentence and one-paragraph summary for each file
starting in the leaf folders, then generates the summary for the folder, and then iteratively moves up to the root node.

Prototyping new generateText methods on the LLM interface which have a message history to support both chatbots, and
setting the cache_control flag where the message history may be used like a stack for agentic workflows.

Add initial Slack chatbot integration.

Update the Aider wrapper to support editing Python projects in other directories, and to support using Vertex AI.

Fixes to GitHub integration.

Add LLM service integration tests.

Update CI build to run frontend and backend in parallel.

Fix Anthropic LLM service.

Add getFileSystemTreeStructure functions and other fixes to the FileSystem service.
20 changes: 3 additions & 17 deletions CONVENTIONS.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
# General code standards

Do not update project level configuration files unless explicitly instructed to.

Use async/await where possible

Test exceptional cases first and return/throw early.

# Test code standards

Unit test files should be in the same directory as the source file.

Any usage of chai-as-promised should use async/await
```
it('should work well with async/await', async () => {
(await Promise.resolve(42)).should.equal(42)
await Promise.reject(new Error()).should.be.rejectedWith(Error);
});
```

# Tool/function classes

Function classes with the @funcClass(__filename) must only have the default constructor.

Always use the Filesystem class in src/functions/storage/filesystem.ts to read/search/write to the local filesystem.
Never edit files name CONVENTIONS.md or .cursorrules
25 changes: 16 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ FROM python:3.11

ENV DEBIAN_FRONTEND=noninteractive

RUN pip install aider-chat

#COPY .nvmrc .
# $(cat .nvmrc)
RUN curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
RUN chmod +x ./nodesource_setup.sh && ./nodesource_setup.sh
RUN apt install -y nodejs

ENV user nous
ENV homedir /home/nous/
RUN pip install aider-chat

ENV user=typedai
ENV homedir=/home/typedai/

RUN useradd --create-home -g users nous
RUN useradd --create-home -g users typedai
WORKDIR $homedir

RUN mkdir ".husky"
Expand All @@ -25,14 +25,21 @@ RUN npm ci

COPY . .

# Download the tiktokenizer model, which is written to node_modules/@microsoft/tiktokenizer/model,
# as the root user, as the typedai user can't write to node_modules
RUN npm run initTiktokenizer

USER $user

RUN mkdir .nous
RUN mkdir .typedai
# Generate the function schemas
RUN npm run functionSchemas

ENV NODE_ENV production
ENV PORT 8080
# Needed to avoid the error "fatal: detected dubious ownership in repository at '/home/typedai'" when running git commands
# as the application files are owned by the root user so an agent (which runs as the typedai user) can't modify them.
RUN git config --global --add safe.directory /home/typedai

ENV NODE_ENV=production
ENV PORT=8080
EXPOSE 8080
CMD [ "npm", "run", "start" ]

17 changes: 7 additions & 10 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ RUN curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
RUN chmod +x ./nodesource_setup.sh && ./nodesource_setup.sh
RUN apt install -y nodejs

RUN npm install -g pm2

RUN pip install aider-chat

ENV user nous
ENV homedir /home/nous/
RUN useradd --create-home -g users nous
ENV user=typedai
ENV homedir=/home/typedai/
RUN useradd --create-home -g users typedai

WORKDIR $homedir

RUN mkdir ".husky"
Expand All @@ -24,8 +23,6 @@ COPY .husky/install.mjs .husky/install.mjs
COPY package*.json ./
RUN npm install

COPY . .

# Install Angular dependencies and build Angular app
WORKDIR $homedir/frontend
COPY frontend/package*.json ./
Expand All @@ -37,10 +34,10 @@ WORKDIR $homedir
# Switch to non-root user
USER $user

ENV NODE_ENV production
ENV NODE_ENV=production

# In the frontend package.jsson the `ng serve` needs the arg --host 0.0.0.0 for it to be available from the host machine
# In the frontend package.json the `ng serve` needs the arg --host 0.0.0.0 for it to be available from the host machine
EXPOSE 4200
EXPOSE 3000
CMD ["pm2-runtime", "start", "resources/ecosystem.config.js"]
CMD ["./bin/cmd-script"]

Loading