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
42 changes: 42 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish codio-authoring plugin
on: push

env:
BINARY_REPOSITORY_URL: ${{ secrets.BINARY_REPOSITORY_URL }}
BINARY_REPOSITORY_CREDENTIALS: ${{ secrets.BINARY_REPOSITORY_USER }}:${{ secrets.BINARY_REPOSITORY_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: build
run: ./build.sh "$GITHUB_SHA"

- name: Upload artifact
shell: bash
run: |
upload () {
local result_file=( codio-authoring-opencode-plugin-*.tar.gz )
local git_hash=${1}

local url="${BINARY_REPOSITORY_URL}/component-builds/codio-authoring-opencode-plugin-${git_hash}.tar.gz"

curl --fail -i -u"${BINARY_REPOSITORY_CREDENTIALS}" -T "${result_file[0]}" "${url}"
}
upload "${GITHUB_SHA}"

- name: Slack
uses: codio/codio-slack-action@master
if: always()
with:
slack_hook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
message: "<https://github.com/${{ github.repository }}/actions/runs/${{github.run_id}}|${{ github.workflow }} release> for ${{ github.repository }} by ${{ github.actor }} has ${{ job.status }} on branch ${{ github.ref_name }}"
success: ${{ job.status }}
16 changes: 16 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -xe

commit=$1

bun install --frozen-lockfile

bun run build:deploy

rm -rf _staging
mkdir -p _staging/plugins
cp dist/index.js _staging/plugins/codio-authoring.js
cp -r src/skills _staging/skills

tar -czf "codio-authoring-opencode-plugin-${commit}.tar.gz" -C _staging .
rm -rf _staging
235 changes: 2 additions & 233 deletions bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"scripts": {
"build": "bun build src/index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external @opencode-ai/sdk --external zod && tsc --emitDeclarationOnly",
"build:deploy": "bun build src/index.ts --outdir dist --target node --format esm --minify && tsc --emitDeclarationOnly",
"postinstall": "node ./bin/codio-authoring-register.js || true",
"preuninstall": "node ./bin/codio-authoring-unregister.js || true",
"test": "bun test",
Expand Down Expand Up @@ -49,7 +50,6 @@
"@biomejs/biome": "2.4.11",
"@types/node": "^24.6.1",
"bun-types": "1.3.12",
"codio-api-js": "^0.18.0",
"json-2-csv": "^5.5.10",
"typescript": "^5.9.3",
"zod": "~4.1.0"
Expand Down
8 changes: 0 additions & 8 deletions src/agents/orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@ ${enabledAgents}
- \`create_assessment({type, workspace, payload})\` — stamp an assessment JSON with a fresh taskId and write to \`.guides/assessments/\`. Returns \`{ taskId, jsonPath, embedLine }\`. Use after \`@assessment-author\` returns a payload. The returned \`embedLine\` is what you splice into the page markdown.
- \`validate_guide({workspace})\` — deterministic structural validation (UUIDs, order arrays, embed references, taskId/filename consistency). Run automatically at the end of new-assignment, import-source, and reorder workflows. Run manually on user request (\`/validate-guide\`).

### Codio platform tools
- \`fetch_course({workspace, courseId, outputDir?, domain?})\` — pull an existing Codio course from the platform into an AI-ready local project. Requires \`CODIO_CLIENT_ID\` and \`CODIO_CLIENT_SECRET\` env vars. Returns \`{ outputDir, manifestPath, moduleCount, assignmentCount }\`. Writes \`course-manifest.json\`, \`course-assignments.csv\`, and extracted assignment content under \`course-content/\`. **Delegate when:** user wants to fetch, pull, import, or export an existing Codio course.
- \`publish_course({manifestPath, dryRun?, force?, module?, assignment?, changelog?, stack?})\` — push course assignments back to the Codio platform using \`course-manifest.json\` as the source of truth. Creates missing courses/modules/assignments automatically. Skips unchanged assignments by content hash. Returns \`{ published, created, unchanged, skipped }\`. **Delegate when:** user wants to publish, push, deploy, or sync assignments to Codio. Always suggest \`dryRun: true\` first to preview.

### Platform tool routing
- User says "fetch/pull/import/export this course" → \`fetch_course\`
- User says "publish/push/deploy/sync assignments" → \`publish_course\` (dryRun first)
- Typical flow: \`fetch_course\` → edit assignments using authoring tools → \`publish_course\`
</Tools>

<Workflow>
Expand Down
149 changes: 0 additions & 149 deletions src/skills/reference-codio-api/SKILL.md

This file was deleted.

33 changes: 0 additions & 33 deletions src/tools/fetch-course.test.ts

This file was deleted.

Loading
Loading