feat(sdk): session.ledger() + session.issue() wrappers + two_header api-type - #72
Merged
Merged
Conversation
Hermes Agent (Nous Research) is an open-source autonomous agent runtime
with MCP-server + plugin support and zero commerce tooling — exactly where
CodeSpar's LatAm commerce meta-tools add value (see
codespar-web/docs/research/hermes-agent-privy-2026-06.md).
New package `@codespar/hermes` (0.4.0, peerDep @codespar/sdk@^0.10.0)
mirroring the crewai/langchain adapter scaffold:
- `HermesTool { name, description, inputSchema, call() }` — the MCP-aligned
tool shape (name/description/JSON-schema + async call → string), the most
portable contract since Hermes ingests tools via MCP servers + plugins.
- `getTools(session)`, `toHermesTool(tool, session)`,
`handleToolCall(session, name, args)` — thin transforms wrapping
`session.execute()`, same idiom as the sibling adapters.
- README documents both the npm adapter (in-process typed tools) AND the
lower-friction MCP-server paste-URL path via @codespar/mcp.
- 4 conformance tests; tsc clean.
- Added the Hermes row to the monorepo README adapters list.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…pi-type Typed SDK wrappers for the two new backend meta-tools (codespar-enterprise): - session.ledger() (codespar_ledger) + session.issue() (codespar_issue), across TS (types + core session + testing mock) and Python (async + sync client + exports). - @codespar/api-types: add "two_header" to the ServerAuthSchemaResponse auth_type enum so the dashboard connect modal can render the Cielo / Transbank / Kushki / Payway credential form. Gates: types + api-types build clean; tsc core clean; python ruff + mypy + pytest green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…pters Adding session.ledger()/issue() to the Session interface (@codespar/types) left every adapter's inline mock Session missing the two new methods — tsc TS2739 across camel, autogen, crewai, google-genai, letta, hermes, llama-index, langchain, mastra, openai, mcp. Mirror the existing charge()/ship() stub shape (hermes already had ledger; deduped). Gate: turbo build 18/18 packages green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-wrappers # Conflicts: # packages/hermes/src/__tests__/hermes.test.ts
fabianocruz
added a commit
that referenced
this pull request
Jun 5, 2026
…s billing) (#73) ## Run core CI on the self-hosted runner GitHub-hosted (`ubuntu-latest`) workflow runs no longer trigger on this repo while the org's Actions billing is blocked — core PRs get **no CI at all** (this is why #72 had to be validated locally and merged on `MERGEABLE/UNSTABLE`). `codespar-enterprise` is unaffected because it already runs on the org self-hosted runner. This points all 4 jobs (`ci`, `validate-example-skeleton`, `validate-example-nfse-from-natural-language`, `validate-example-whatsapp-installment-negotiation`) at `runs-on: [self-hosted, Linux, X64]` — the same label enterprise uses. CI then runs free and records real PR checks again. ###⚠️ Operator (org admin) — one-time, required before this works 1. **Runner group access**: allow `codespar-core` in the self-hosted runner group's repository access (the runner is registered at the org level; core currently has 0 runners of its own). 2. **Secret**: set `ANTHROPIC_API_KEY` in `codespar-core` repo secrets — the three `validate-example` jobs call it via `npm run validate`. ### Note This is a workflow-file change, so it can't be CI-validated here (CI is exactly what's blocked). It takes effect on the **next** PR after merge. The current `main` was validated locally and is green: `turbo run build typecheck test` → build 18/18, typecheck clean, test 35/35 (after the one-time macOS `npm i @rollup/rollup-darwin-arm64 --no-save` for the npm optional-deps bug). ### Alternative if you'd rather not touch the runner Fix the GitHub Actions billing and revert this — `ubuntu-latest` resumes on its own. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
session.ledger()+session.issue()SDK wrappers +two_headerapi-typeTyped SDK surface for the two new backend meta-tools (paired with codespar-enterprise
feat/latam-catalog-ledger-issue).TypeScript
packages/types:LedgerArgs/LedgerResult,IssueArgs/IssueResult/IssueAction,Session.ledger()/Session.issue().packages/core:session.ledger()(→codespar_ledger) +session.issue()(→codespar_issue), plus testing mocks.packages/api-types: add"two_header"to theServerAuthSchemaResponseauth_typeenum so the dashboard connect modal can render the Cielo / Transbank / Kushki / Payway credential form.Python
types.py:LedgerArgs/LedgerResult+IssueArgs/IssueResult/IssueAction._async_session.py+_sync_client.py:ledger()/issue()(async + sync).__init__.py: exports.Gates
types+api-typesbuild clean;tsccore clean.ruff+mypy+pytestgreen.Follow-up (not blocking merge)
@codespar/api-typesso the web connect-modal 1-liner gate fortwo_headercan land.publish.sh(TS 2FA + PyPI OIDC) when cutting a release.🤖 Generated with Claude Code