Skip to content

Commit

Permalink
Merge branch 'main' into fix/return-threadId
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharking authored Feb 12, 2025
2 parents d65f099 + 117abdb commit 1ecfddc
Show file tree
Hide file tree
Showing 31 changed files with 26,722 additions and 15,734 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,14 @@ jobs:
- name: Publish NPM packages
if: steps.semantic.outputs.new-release-published == 'true'
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
# Publish Model
yarn workspace @2060.io/service-agent-model version --no-git-tag-version --new-version $RELEASE_VERSION
yarn workspace @2060.io/service-agent-model publish --non-interactive
# Publish Client
yarn workspace @2060.io/service-agent-client add @2060.io/service-agent-model@$RELEASE_VERSION
yarn workspace @2060.io/service-agent-client version --no-git-tag-version --new-version $RELEASE_VERSION
yarn workspace @2060.io/service-agent-client publish --non-interactive
# Publish Nestjs-client
yarn workspace @2060.io/service-agent-nestjs-client add @2060.io/service-agent-client@$RELEASE_VERSION
yarn workspace @2060.io/service-agent-nestjs-client add @2060.io/service-agent-model@$RELEASE_VERSION
yarn workspace @2060.io/service-agent-nestjs-client version --no-git-tag-version --new-version $RELEASE_VERSION
yarn workspace @2060.io/service-agent-nestjs-client publish --non-interactive
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ~/.npmrc
yarn config set npmAuthToken ${NPM_AUTH_TOKEN}
yarn workspaces foreach --topological version $RELEASE_VERSION
yarn up @2060.io/service-agent-model@$RELEASE_VERSION
yarn up @2060.io/service-agent-client@$RELEASE_VERSION
yarn workspaces foreach --topological --no-private --exclude @2060.io/service-agent-main npm publish
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ jobs:
steps:
- name: Checkout service-agent
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup node v20
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: |
yarn install --frozen-lockfile
yarn install --immutable
- name: Build
run: |
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ build
*.txn
logs.txt
examples/**/afj

# Yarn
.yarn/cache
.yarn/install-state.gz
examples/**/.yarn/cache
examples/**/.yarn/install-state.gz
550 changes: 550 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.4.cjs

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.6.4.cjs
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
FROM node:20 as base

# Setup yarn version
RUN corepack enable
RUN yarn set version 3.6.4
RUN corepack prepare [email protected] --activate

# AFJ specifc setup
WORKDIR /www
ENV RUN_MODE="docker"

COPY package.json yarn.lock ./
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn/releases/ .yarn/releases/
COPY .yarn/plugins/ .yarn/plugins/

COPY packages/model/package.json packages/model/package.json
COPY packages/main/package.json packages/main/package.json
Expand Down
874 changes: 874 additions & 0 deletions examples/chatbot/.yarn/releases/yarn-3.6.4.cjs

Large diffs are not rendered by default.

34 changes: 19 additions & 15 deletions examples/chatbot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
FROM node:18 as base

COPY package.json yarn.lock tsconfig.json tsconfig.build.json ./
# Setup yarn version
RUN corepack enable
RUN yarn set version 3.6.4
RUN corepack prepare [email protected] --activate

# AFJ specifc setup
WORKDIR /www
ENV RUN_MODE="docker"

COPY package.json yarn.lock tsconfig.json tsconfig.build.json .yarnrc.yml ./
COPY .yarn/releases/ .yarn/releases/
COPY .yarn/plugins/ .yarn/plugins/
COPY packages/model/package.json packages/model/package.json
COPY packages/client/package.json packages/client/package.json

Expand All @@ -21,22 +32,15 @@ FROM base as final
WORKDIR /www
ENV RUN_MODE="docker"

COPY examples/chatbot/package.json examples/chatbot/package.json
COPY examples/chatbot/yarn.lock examples/chatbot/yarn.lock
COPY examples/chatbot/ examples/chatbot/

# Run install after copying only depdendency file
# to make use of docker layer caching
COPY --from=base packages/model/build /www/packages/model/build
COPY --from=base packages/client/build /www/packages/client/build
RUN yarn --cwd examples/chatbot install


# Copy other depdencies
COPY examples/chatbot/index.ts examples/chatbot/index.ts
COPY examples/chatbot/data.ts examples/chatbot/data.ts
COPY examples/chatbot/phone-cred-def-dev.json examples/chatbot/phone-cred-def-dev.json
COPY examples/chatbot/tsconfig.json examples/chatbot/tsconfig.json
COPY --from=base /www/packages ./packages
WORKDIR /www/examples/chatbot
RUN yarn install
RUN yarn build

RUN yarn --cwd examples/chatbot build
COPY examples/chatbot/public examples/chatbot/build/public
CMD yarn --cwd examples/chatbot start
WORKDIR /www/examples/chatbot
CMD yarn start
13 changes: 9 additions & 4 deletions examples/chatbot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,22 @@
"@types/express": "^4.17.13",
"@types/node": "^16.7.10",
"@types/node-fetch": "^2.6.2",
"rimraf": "^6.0.1",
"ts-node-dev": "^2.0.0",
"tsconfig-paths": "^4.1.0",
"typescript": "4.7.4"
},
"dependencies": {
"@2060.io/service-agent-model": "file:../../packages/model/build",
"@2060.io/service-agent-client": "file:../../packages/client/build",
"@2060.io/service-agent-client": "link:../../packages/client",
"@2060.io/service-agent-model": "link:../../packages/model",
"body-parser": "^1.20.0",
"cors": "^2.8.5",
"express": "^4.18.1",
"tslog": "^4.8.2",
"node-fetch": "^2.6.7"
"node-fetch": "^2.6.7",
"tslog": "^4.8.2"
},
"resolutions": {
"@types/express": "4.17.21",
"express": "4.21.0"
}
}
Loading

0 comments on commit 1ecfddc

Please sign in to comment.