Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 8 additions & 17 deletions .github/workflows/expert-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,21 @@ jobs:
steps:
- uses: actions/checkout@v6

- uses: oven-sh/setup-bun@v2

- run: bun install --frozen-lockfile

- run: bun run build
- uses: actions/setup-node@v4
with:
node-version: '22'

- name: Extract version from perstack.toml
id: version
run: |
VERSION=$(bun -e "
const TOML = require('smol-toml');
const fs = require('fs');
const config = TOML.parse(fs.readFileSync('${{ matrix.definition.path }}/perstack.toml', 'utf-8'));
const experts = config.experts || {};
const coordinator = Object.entries(experts).find(([k]) => !k.startsWith('@'));
console.log(coordinator?.[1]?.version || '1.0.0');
")
VERSION=$(grep -m1 '^version' ${{ matrix.definition.path }}/perstack.toml | sed 's/.*"\(.*\)".*/\1/')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Extracted version: $VERSION"

- name: Check if version already exists
id: check
run: |
OUTPUT=$(npx perstack expert versions ${{ matrix.definition.name }} \
OUTPUT=$(npx -y perstack expert versions ${{ matrix.definition.name }} \
--api-key ${{ secrets.PERSTACK_API_KEY }} 2>&1) || true
echo "$OUTPUT"
if echo "$OUTPUT" | grep -q "^ ${{ steps.version.outputs.version }}"; then
Expand All @@ -56,14 +47,14 @@ jobs:
- name: Publish scope if private
if: steps.check.outputs.should-publish == 'true'
run: |
npx perstack expert publish ${{ matrix.definition.name }} \
npx -y perstack expert publish ${{ matrix.definition.name }} \
--api-key ${{ secrets.PERSTACK_API_KEY }} || true

- name: Push to draft
if: steps.check.outputs.should-publish == 'true'
id: push
run: |
OUTPUT=$(npx perstack expert push ${{ matrix.definition.draft-id }} \
OUTPUT=$(npx -y perstack expert push ${{ matrix.definition.draft-id }} \
--config ${{ matrix.definition.path }}/perstack.toml \
--api-key ${{ secrets.PERSTACK_API_KEY }})
echo "$OUTPUT"
Expand All @@ -73,7 +64,7 @@ jobs:
- name: Assign version
if: steps.check.outputs.should-publish == 'true'
run: |
npx perstack expert version \
npx -y perstack expert version \
${{ matrix.definition.draft-id }} \
${{ steps.push.outputs.ref-id }} \
${{ steps.version.outputs.version }} \
Expand Down
5 changes: 5 additions & 0 deletions definitions/create-expert/perstack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ model = "claude-sonnet-4-5"
providerName = "anthropic"

[experts."create-expert"]
defaultModelTier = "high"
version = "1.0.0"
description = "Creates and modifies Perstack expert definitions in perstack.toml"
instruction = """
Expand Down Expand Up @@ -38,6 +39,7 @@ packageName = "@perstack/base"
pick = ["exec", "attemptCompletion"]

[experts."@create-expert/planner"]
defaultModelTier = "high"
version = "1.0.0"
description = """
Designs expert architectures for Perstack. Provide: (1) what the expert should do, (2) path to existing perstack.toml if one exists. \
Expand Down Expand Up @@ -131,6 +133,7 @@ packageName = "@perstack/base"
pick = ["readTextFile", "writeTextFile", "exec", "todo", "attemptCompletion"]

[experts."@create-expert/skill-finder"]
defaultModelTier = "low"
version = "1.0.0"
description = """
Searches the MCP registry for MCP servers that match expert skill requirements. Provide: path to plan.md \
Expand Down Expand Up @@ -193,6 +196,7 @@ packageName = "@perstack/create-expert-skill"
pick = ["searchMcpRegistry", "getMcpServerDetail"]

[experts."@create-expert/definition-writer"]
defaultModelTier = "low"
version = "1.0.0"
description = """
Writes Perstack expert definitions in perstack.toml from a design plan. Provide: path to the plan file (e.g. plan.md). \
Expand Down Expand Up @@ -290,6 +294,7 @@ packageName = "@perstack/base"
pick = ["readTextFile", "writeTextFile", "exec", "todo", "attemptCompletion"]

[experts."@create-expert/expert-tester"]
defaultModelTier = "low"
version = "1.0.0"
description = """
Tests Perstack expert definitions in a perstack.toml. Provide: path to the perstack.toml to test. \
Expand Down