-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shift to pnpm workspace packages; fix linting (#53)
* Shift to pnpm workspace packages; fix linting * Fix PR CI * Add canary CI * Remove forced test failure * Ensure `@inngest/agent-kit` dep is built before we lint * Ignore examples when publishing * Create witty-mayflies-type.md * Set all examples to `private`
- Loading branch information
1 parent
b0df157
commit 4d6b263
Showing
48 changed files
with
870 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@inngest/agent-kit": patch | ||
--- | ||
|
||
Shift to pnpm workspace packages; fix linting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: "Canary" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- ".changeset/**/*.md" | ||
|
||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
# Used to fetch all history so that changesets doesn't attempt to | ||
# publish duplicate tags. | ||
fetch-depth: 0 | ||
# Replaces `concurrency` - never cancels any jobs | ||
- uses: softprops/turnstyle@v1 | ||
with: | ||
poll-interval-seconds: 30 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
- run: pnpm install | ||
- uses: "the-guild-org/[email protected]" | ||
with: | ||
tag: "alpha" | ||
prepareScript: "pnpm run build" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CHANGESET_GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_ENV: test # disable npm access checks; they don't work in CI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./packages/agent-kit/README.md |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ app.use( | |
serve({ | ||
client: inngest, | ||
functions: [fn], | ||
}), | ||
}) | ||
); | ||
|
||
app.listen(port, () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "demo", | ||
"private": true, | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"author": "", | ||
"license": "ISC", | ||
"description": "", | ||
"dependencies": { | ||
"@inngest/agent-kit": "workspace:^", | ||
"express": "^4.21.1", | ||
"inngest": "^3.27.6-pr-776.2", | ||
"zod": "^3.23.8" | ||
}, | ||
"devDependencies": { | ||
"@types/express": "^5.0.0", | ||
"typescript": "^5.6.3" | ||
}, | ||
"packageManager": "[email protected]+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,48 @@ | ||
import { createAgent, createNetwork, anthropic, createServer } from '@inngest/agent-kit'; | ||
import { | ||
anthropic, | ||
createAgent, | ||
createNetwork, | ||
createServer, | ||
} from "@inngest/agent-kit"; | ||
|
||
const dbaAgent = createAgent({ | ||
name: 'Database administrator', | ||
description: 'Provides expert support for managing PostgreSQL databases', | ||
name: "Database administrator", | ||
description: "Provides expert support for managing PostgreSQL databases", | ||
system: | ||
'You are a PostgreSQL expert database administrator. ' + | ||
'You only provide answers to questions linked to Postgres database schema, indexes, extensions.', | ||
"You are a PostgreSQL expert database administrator. " + | ||
"You only provide answers to questions linked to Postgres database schema, indexes, extensions.", | ||
model: anthropic({ | ||
model: 'claude-3-5-haiku-latest', | ||
model: "claude-3-5-haiku-latest", | ||
max_tokens: 1000, | ||
}), | ||
}); | ||
|
||
const securityAgent = createAgent({ | ||
name: 'Database Security Expert', | ||
description: 'Provides expert guidance on PostgreSQL security, access control, audit logging, and compliance best practices', | ||
system: 'You are a PostgreSQL security expert. ' + | ||
'You only provide answers to questions linked to PostgreSQL security topics such as encryption, access control, audit logging, and compliance best practices.', | ||
name: "Database Security Expert", | ||
description: | ||
"Provides expert guidance on PostgreSQL security, access control, audit logging, and compliance best practices", | ||
system: | ||
"You are a PostgreSQL security expert. " + | ||
"You only provide answers to questions linked to PostgreSQL security topics such as encryption, access control, audit logging, and compliance best practices.", | ||
model: anthropic({ | ||
model: 'claude-3-5-haiku-latest', | ||
model: "claude-3-5-haiku-latest", | ||
max_tokens: 1000, | ||
}), | ||
}); | ||
|
||
const devOpsNetwork = createNetwork({ | ||
name: 'DevOps team', | ||
name: "DevOps team", | ||
agents: [dbaAgent, securityAgent], | ||
maxIter: 2, | ||
defaultModel: anthropic({ | ||
model: 'claude-3-5-haiku-latest', | ||
model: "claude-3-5-haiku-latest", | ||
max_tokens: 1000, | ||
}), | ||
}); | ||
|
||
const server = createServer({ | ||
agents: [], | ||
networks: [devOpsNetwork], | ||
}); | ||
|
||
server.listen(3010, () => console.log('Agent kit running!')); | ||
server.listen(3010, () => console.log("Agent kit running!")); |
Oops, something went wrong.