Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.

Add beginner-friendly high-level SDK API and quickstart example#26

Closed
GsCommand wants to merge 1 commit into
mainfrom
codex/implement-high-level-api-for-commandlayer-sdk
Closed

Add beginner-friendly high-level SDK API and quickstart example#26
GsCommand wants to merge 1 commit into
mainfrom
codex/implement-high-level-api-for-commandlayer-sdk

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • Make the TypeScript SDK the primary, beginner-friendly front door for CommandLayer by adding a concise run/verify surface and a quickstart example.
  • Default to the hosted runtime at https://runtime.commandlayer.org while preserving existing low-level APIs and backwards-compatible options.

Description

  • Add a high-level commandlayer export with commandlayer.run(action, input, options?) and commandlayer.verify(receipt, options?) backed by a module-wide default client.
  • Add CommandLayerClient.run(...) and CommandLayerClient.verify(...) helpers and extend createClient(options?) to accept baseUrl (falls back to runtime and https://runtime.commandlayer.org).
  • Ensure commandlayer.verify delegates to the existing verifyReceipt logic and return a beginner-friendly valid alias (valid === ok) while leaving the full VerifyResult intact.
  • Add examples/quickstart-node (package.json, index.js, README.md) and update the top of the repo and TypeScript SDK README.md to show install + a 10-line run/verify example.
  • Add tests in typescript-sdk/tests/high-level-api.test.mjs for default baseUrl, custom baseUrl, commandlayer.run delegation, and commandlayer.verify delegation, and keep all existing low-level exports unchanged.

Testing

  • Successfully built the TypeScript SDK with npm run build in typescript-sdk and produced dist artifacts.
  • Ran the new high-level tests with node --test typescript-sdk/tests/high-level-api.test.mjs and they passed.
  • Ran the package test run (npm test) which produced 43 passed, 1 failed; the single failing assertion is from an existing unit test in the suite and appears unrelated to the added high-level onboarding API.

Codex Task

@GsCommand GsCommand closed this Apr 24, 2026
@GsCommand GsCommand deleted the codex/implement-high-level-api-for-commandlayer-sdk branch April 24, 2026 03:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant