Skip to content

Commit

Permalink
Merge branch 'main' of github.com:transitive-bullshit/agentic-old int…
Browse files Browse the repository at this point in the history
…o old-agentic-v1

* 'main' of github.com:transitive-bullshit/agentic-old: (338 commits)
  chore: bump deps
  chore: bump deps and pin prettier until sort plugin supports v3
  docs: add TSDoc comments
  docs: add TSDoc comments
  feat: allow disabling task tracking via terminal
  feat: make options object optional
  feat: initialize default model providers
  feat: set model param defaults
  feat: upgrade to API of new Anthropic SDK
  chore: bump dependencies
  feat: allow setting model via env, rename opt to modelDefaults, and fix setting of retryConfig
  fix: improve types via overloading
  feat: add pause message
  feat: format output differently depending on mechanism
  feat: improve clear perf, toggle cursor, and resume key listeners
  fix: avoid truncating to e.g. preserve valid JSON
  feat: properly indent task outputs
  feat: support separator
  fix: remove unused symbol
  chore: add eventemitter3 dep
  ...
  • Loading branch information
transitive-bullshit committed Jun 7, 2024
2 parents bd23269 + f5e2499 commit cd969cb
Show file tree
Hide file tree
Showing 158 changed files with 23,006 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root = true

[*]
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{*.json,*.json.example,*.gyp,*.yml,*.yaml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.js]
quote_type = single
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/
scratch/
docs/
70 changes: 70 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"parser": "@typescript-eslint/parser",
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"plugins": ["@typescript-eslint", "eslint-plugin-tsdoc"],
"root": true,
"env": {
"browser": false,
"es6": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module",
"project": "tsconfig.json"
},
"rules": {
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true
}
],
"no-useless-catch": "warn",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": ["block", "block-like"],
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": ["block", "block-like"]
},
{
"blankLine": "any",
"prev": ["singleline-const", "singleline-let", "expression"],
"next": ["block", "block-like"]
}
],
"tsdoc/syntax": "warn"
},
"overrides": [
{
"files": ["*.tsx"],
"rules": {
"no-undef": "off"
}
},
{
// disable process.env for framework source files
"files": "packages/**/src/*.ts",
"rules": {
"no-process-env": "error"
}
}
],
"settings": {},
"globals": {
"__DEV__": true
}
}
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore in GitHub Languages:
# See https://github.com/github/linguist#vendored-code
examples/* linguist-vendored
test/* linguist-vendored
14 changes: 14 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# This file auto-assigns reviewers for pull requests based on file/directory changes.
# Pattern: path/to/code @owner1 @owner2

# Example usages:
# * @username # username is the owner of the whole repo
# /folder/ @username # username is the owner of 'folder/' directory
# *.ext @username # username is the owner of all '.ext' files

# Remember:
# 1. Users/teams must have write access to the repo.
# 2. Multiple owners can be specified.
# 3. The last matching pattern takes precedence.
73 changes: 73 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: 🐛 Bug Report
description: Report an issue or possible bug with Agentic
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to file a bug report! Please fill out this form as completely as possible.
- type: input
id: version
attributes:
label: Agentic Version
description: What version of agentic are you using?
placeholder: 0.0.0
validations:
required: true
- type: input
id: node-version
attributes:
label: Node.js / npm Version
description: What Node.js / npm version(s) are you using?
validations:
required: true
- type: input
id: platform
attributes:
label: Platform
description: What operating system are you on?
placeholder: Windows 10, macOS 11.5.2, Ubuntu 20.04, etc.
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: expected-results
attributes:
label: Expected Results
description: What are the expected results?
placeholder: Insert expected results here
validations:
required: true
- type: textarea
id: actual-results
attributes:
label: Actual Results
description: What are the actual results?
placeholder: Insert actual results here
validations:
required: true
- type: input
id: bug-reproduction
attributes:
label: Link to Minimal Reproducible Example
description: 'If relevant, provide a link to a minimal reproduction of the problem. You may use a code playground like [Replit](https://replit.com) or [CodeSandbox](https://codesandbox.io). If you are unable to provide a link, please provide a code snippet or a detailed description of the steps necessary to reproduce the problem.'
validations:
required: true
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please ensure the following tasks are completed before filing a bug report.
options:
- label: Read and understood the Code of Conduct.
required: true
- label: Searched for existing issues and pull requests.
required: true
- label: I am willing to submit a pull request for this issue.
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: ❓ Question
url: https://github.com/transitive-bullshit/agentic/discussions/new?category=Q%26A
about: Got a (non-bug related) question? Ask the community for help!
- name: 💡 Feature Request
url: https://github.com/transitive-bullshit/agentic/discussions/new?category=Ideas
about: Share ideas for new features with the community.
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Changes

- This PR... (please explain what changes you made and why).
- Fixes #issue_number (if the PR fixes an open issue)

## Testing

<!--
How can the reviewers verify this change? What tests did you add to verify your changes?
-->

## Additional Information

<!--
Any additional information that you think is important and relevant to this pull request.
-->
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 10
allow:
- dependency-name: "*"
dependency-type: "all"
1 change: 1 addition & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [transitive-bullshit]
53 changes: 53 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on: [push, pull_request]

jobs:
test:
name: Test Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 19
- 18
# - 16 // TODO

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run test
env:
REDIS_URL_TEST: ${{ secrets.REDIS_URL_TEST }}
run: pnpm run test
55 changes: 55 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

*.swp
.idea

# ignore editor workspace files
.vscode/
.idea/
*.sublime-workspace
*.sublime-project

# dependencies
node_modules/
.pnp/
.pnp.js

# testing
/coverage

# next.js
.next/
out/

# production
build/

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# local env files
.env
.env.local
.env.build
.env.development.local
.env.test.local
.env.production.local

.turbo
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run pre-commit
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts=true
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.snapshots/
build/
dist/
node_modules/
.next/
.vercel/
16 changes: 16 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
plugins: [require('@trivago/prettier-plugin-sort-imports')],
singleQuote: true,
jsxSingleQuote: true,
semi: false,
useTabs: false,
tabWidth: 2,
bracketSpacing: true,
bracketSameLine: false,
arrowParens: 'always',
trailingComma: 'none',
importOrder: ['^node:.*', '<THIRD_PARTY_MODULES>', '^(@/(.*)$)', '^[./]'],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
importOrderGroupNamespaceSpecifiers: true
}
9 changes: 9 additions & 0 deletions ava.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
snapshotDir: 'test/.snapshots',
failFast: true,
extensions: {
ts: 'module'
},
nodeArguments: ['--loader=tsx', '--no-warnings'],
timeout: '30s'
}
Loading

0 comments on commit cd969cb

Please sign in to comment.