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
4 changes: 3 additions & 1 deletion .changeset/canonical-harness-foundation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
'bazilion': patch
---

Add the canonical Team-template and one-policy-per-Group persistence foundation, atomically migrate legacy Profile Groups, and preserve their CLI/API behavior through deprecated compatibility adapters.
Complete the breaking alpha cleanup to canonical Teams, Team Templates, and Team Policy. Remove
Group, Profile Group, Harness prototype, compatibility API/URL, and incremental migration
surfaces; consolidate fresh installs into the final `0001_init.sql` schema.
6 changes: 6 additions & 0 deletions .changeset/fresh-pi-models.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"bazilion": minor
---

Update the bundled Pi agent packages to 0.80.6 and refresh provider examples for the GPT-5.6
Luna, Terra, and Sol model family.
10 changes: 9 additions & 1 deletion .codex/skills/bazilion-release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ description: Bazilion release workflow for the rullopat/bazilion monorepo. Use w

## Scope

Use this workflow in `/home/patri/coding/bazilion` for the `rullopat/bazilion` monorepo.
Use this workflow from the root of the `rullopat/bazilion` monorepo. Confirm the root with
`git rev-parse --show-toplevel`; do not rely on a machine-specific absolute path.

Public release packages are fixed together by `.changeset/config.json`:

Expand Down Expand Up @@ -58,8 +59,15 @@ Run validation before committing a release:
```sh
pnpm typecheck
pnpm test
pnpm --filter @bazilion/web typecheck
pnpm --filter @bazilion/web build
```

Because Bazilion currently has a clean-install-only alpha database contract, also bootstrap a
fresh temporary `BAZILION_HOME` whenever the release changes the schema, canonical Team APIs, or
filesystem layout. Verify that `schema_migrations` contains only `0001_init` and that no removed
Group, Profile Team, Harness, or compatibility route is advertised by current docs or CLI help.

If sandbox loopback/process restrictions cause failures such as `listen EPERM 127.0.0.1` or empty CLI subprocess output, rerun the same test command outside the sandbox with escalation. Treat the sandbox failure as environmental only after the escalated run passes.

For dependency/provider releases, also verify pi provider coverage when relevant:
Expand Down
53 changes: 53 additions & 0 deletions .codex/skills/refresh-pi-models/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: refresh-pi-models
description: Update Bazilion to current @earendil-works Pi packages and reconcile its provider catalog, curated model examples, setup copy, tests, lockfile, and release notes. Use when Pi publishes a release, new model families appear, model examples become stale, provider catalogs change, or a Bazilion dependency refresh is requested.
---

# Refresh Pi Models

Refresh the engine and the user-visible model guidance from upstream evidence. Do not guess model
ids or update examples merely because a model was announced elsewhere.

## Workflow

1. Read repository `AGENTS.md` and inspect the worktree. Preserve unrelated changes.
2. Query npm for the latest versions of `@earendil-works/pi-ai`, `pi-agent-core`, and
`pi-coding-agent`. Treat npm package metadata and the installed Pi catalog as authoritative.
3. Record the current dependency declarations in `apps/daemon/package.json`,
`apps/cli/package.json`, and `pnpm-lock.yaml`. Keep all three Pi packages on one compatible
release unless upstream explicitly publishes a supported mixed set.
4. Update both the daemon and published CLI workspace dependencies with pnpm. Never hand-edit the
lockfile.
5. Inspect upstream release/API changes. Fix Bazilion imports and adapters instead of pinning an
old release. In particular, verify whether catalog helpers still live at the root or require
`@earendil-works/pi-ai/compat`/the provider collection API.
6. Run `node .codex/skills/refresh-pi-models/scripts/audit-pi-models.mjs`. Use its exact catalog
output to update:
- `apps/web/src/routes/config/index.tsx` examples and its Pi-version comment;
- first-run examples in `apps/web/src/routes/welcome.tsx`;
- root and CLI README model examples/provider text;
- current AGENTS.md model examples when stale.
7. Prefer a current generally useful tool-capable model per provider. Do not rewrite historical
changelogs or tests whose ids are deliberate fixtures. For OAuth `openai-codex`, confirm the
model exists in that provider's catalog rather than copying an `openai` API model id.
8. Add or update focused catalog tests so key newly added families and example ids are proven to
exist. Add a Changeset for the published `bazilion` package when the bundled engine changes.
9. Validate in order:

```sh
node .codex/skills/refresh-pi-models/scripts/audit-pi-models.mjs
pnpm vitest run apps/daemon/test/runtime/providers.test.ts apps/daemon/test/core/provider-models.test.ts
pnpm typecheck
pnpm --filter @bazilion/web typecheck
pnpm test
pnpm lint
pnpm build
git diff --check
```

10. Audit the final diff: dependency versions agree, advertised examples are present in the
installed catalog (or explicitly identified live/local aliases), and no unrelated files were
staged or reverted.

If network or subprocess tests fail only because of the sandbox, rerun the same command with the
required approval. Report upstream versions, notable new models, API adaptations, and validation.
4 changes: 4 additions & 0 deletions .codex/skills/refresh-pi-models/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Refresh Pi Models"
short_description: "Update Pi packages and Bazilion model examples"
default_prompt: "Use $refresh-pi-models to update Bazilion to the latest Pi packages and refresh its model examples."
61 changes: 61 additions & 0 deletions .codex/skills/refresh-pi-models/scripts/audit-pi-models.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env node

import { existsSync, readFileSync } from 'node:fs'

const piDist = new URL(
'../../../../apps/daemon/node_modules/@earendil-works/pi-ai/dist/',
import.meta.url,
)
const compat = new URL('compat.js', piDist)
const pi = await import(existsSync(compat) ? compat.href : new URL('index.js', piDist).href)
const { getModels, getProviders } = pi
if (typeof getModels !== 'function' || typeof getProviders !== 'function') {
throw new Error('installed pi-ai exposes neither the compat nor legacy catalog helpers')
}

const source = readFileSync('apps/web/src/routes/config/index.tsx', 'utf8')
const examples = new Map()
for (const match of source.matchAll(/case '([^']+)':\s+return '([^']+)'/g)) {
examples.set(match[1], match[2])
}

const aliases = new Map([
['bedrock', 'amazon-bedrock'],
['azure-openai', 'azure-openai-responses'],
])
const providers = getProviders()
const report = []
const full = process.argv.includes('--full')

for (const provider of providers) {
const models = (getModels(provider) ?? []).map((model) => model.id)
report.push({ provider, count: models.length, models })
}

const failures = []
for (const [provider, example] of examples) {
const piProvider = aliases.get(provider) ?? provider
if (!providers.includes(piProvider)) continue // dynamic/local Bazilion provider
const models = (getModels(piProvider) ?? []).map((model) => model.id)
if (models.length > 0 && !models.includes(example)) {
failures.push(`${provider}: example '${example}' is absent from Pi provider '${piProvider}'`)
}
}

for (const entry of report) {
console.log(`${entry.provider}: ${entry.count}`)
if (full) console.log(entry.models.map((model) => ` ${model}`).join('\n'))
}

const newOpenAI = report
.find((entry) => entry.provider === 'openai')
?.models.filter((model) => /^gpt-5\.\d/.test(model))
console.log(`\nRecent OpenAI families: ${(newOpenAI ?? []).slice(-12).join(', ')}`)

if (failures.length > 0) {
console.error('\nStale catalog-backed examples:')
for (const failure of failures) console.error(`- ${failure}`)
process.exitCode = 1
} else {
console.log('\nAll catalog-backed web examples resolve in the installed Pi catalog.')
}
Loading
Loading