Align JavaScript SDK documentation with the Java SDK's structure and Conductor-agent terminology - #148
Closed
ambiorix2099 wants to merge 6 commits into
Closed
Align JavaScript SDK documentation with the Java SDK's structure and Conductor-agent terminology#148ambiorix2099 wants to merge 6 commits into
ambiorix2099 wants to merge 6 commits into
Conversation
The agent layer was merged in from the Agentspan TS SDK, which has since been rebranded to Conductor. This aligns the naming with the Python and Java SDKs (conductor-oss/python-sdk#441 did the same). Renamed: - AGENTSPAN_* env vars -> CONDUCTOR_AGENT_* (18 distinct names, 189 files) - AgentspanError -> ConductorAgentError (base of 12 subclasses) - AgentspanMetadata -> ConductorAgentMetadata (langchain/langgraph wrappers) - Stripped 15 "Copyright (c) 2025 Agentspan" headers, as Python did Backward compatibility (the PR description upstream claims env aliases were kept; they were not -- Python deleted every AGENTSPAN_* read. We keep them): - AGENTSPAN_* still resolves as a deprecated fallback beneath CONDUCTOR_AGENT_*, warning once per name per process - AgentspanError / AgentspanMetadata stay exported as @deprecated aliases. The error alias is the same class object, not a subclass, so instanceof works in both directions - AGENTSPAN_LOG_LEVEL falls back silently: warning there would log through the very logger whose level is still being resolved - e2e/helpers.ts carries its own fallback -- that suite ships as a release bundle, and the SDK-level alias does not cover vars the harness reads directly Spec R3 precedence gains one tier and is otherwise unchanged: CONDUCTOR_* env -> explicit config -> CONDUCTOR_AGENT_* env -> AGENTSPAN_* env (deprecated) -> http://localhost:8080 Names deliberately left alone, because they are not ours to rename -- renaming them points users at flags that do not exist or breaks interop. Full table in AGENTS.md: - cross-SDK wire keys, all underscore-prefixed: __agentspan_ctx__, __agentspan_sdk__.cjs, _agentspan.llm/.model/.framework/.tools, _agentspan_human_task/_prompt. Same server compile path as Python. - orkes-conductor boot properties: agentspan.embedded, agentspan.default-context-window - external repos, scopes, images: agentspan-ai/agentspan, agentspan-ai/codingexamples, @agentspan-ai, agentspan-server - the external CLI: the `agentspan` binary, ~/.agentspan/config.json, agentspan_linux_amd64, and agentspan deploy/credentials/login/import - version-qualified product references: agentspan <= 0.4.2, agentspan server > 0.4.2 -- renaming these makes them factually false - CHANGELOG.md history, which records what shipped under the old names Tests: adds src/agents/__tests__/legacy-env.test.ts and four spec R3 cases covering the fallback, precedence, warn-once behaviour, and alias identity. The rest of the suite was mechanically renamed, so without these the compat guarantee would have no coverage at all. Verified: 0 lint errors (358 warnings, unchanged from main), 1582 unit tests across 80 suites pass, build + verify:dist clean, and zero net new tsc errors against main. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Ports the layout established in conductor-oss/java-sdk and adopted by conductor-oss/python-sdk#441: docs/*.md plus docs/agents/{concepts,frameworks,reference}/. The 43 canonical pages are authored for TypeScript, not translated. The Python originals are Python prose with Python samples, so nothing was copyable -- every snippet here is TS against this SDK's actual API, mined from the six docs/agents pages being replaced. Authored (43): - docs/README.md index, organized by goal - 20 core guides server-setup, connection-authentication, core-quickstart, workflows, workflow-lifecycle, workers, reliability, observability, api-map, security, debugging, deployment-scaling, schedules-events, schema-client, workflow-testing, compatibility, upgrading, examples, documentation-standard, documentation-parity - docs/agents/concepts/ (11) agents, tools, multi-agent, guardrails, termination, callbacks, streaming-hitl, structured-output, scheduling, stateful, deploy-serve-run - docs/agents/frameworks/ (5) openai, google-adk, langchain, langgraph, vercel-ai - docs/agents/reference/ (6) api, runtime, client, agent-definition, agent-schema.md, agent-schema.json frameworks/ deviates from the canonical set deliberately: drops claude-agent-sdk (no such wrapper here) and adds vercel-ai, which is a JavaScript-only bridge with no Java or Python counterpart. Recorded in documentation-parity.md. Follows Python's documentation-standard verbatim -- "Conductor agents" as the noun, "Conductor-agent" hyphenated only attributively, an Audience line and Prerequisites on every page, goal/guide/result tables -- so the three sets stay diffable. agent-schema.json is a real draft-07 contract, not a placeholder: it validates all 19 fixtures in e2e/_configs/ (checked in the next commit's CI job). Stubs, not deletions (19), so inbound links from npm, issues, and blog posts keep resolving: - docs/agents/{getting-started,writing-agents,advanced,api-reference, framework-agents}.md -> their split replacements - docs/api-reference/*.md (11) -> api-map.md - METRICS.md -> docs/observability.md - LEASE_EXTENSION.md -> docs/reliability.md Java's CI greps to reject docs/agents/api-reference.md as retired while Python keeps it as a stub. We follow Python -- preserving inbound links to a public SDK's docs wins -- so the next commit's grep omits that pattern. METRICS.md and LEASE_EXTENSION.md content was migrated in full before stubbing (metric catalogs, labels, implementation notes, LeaseTracker usage, Python parity table), and their nine inbound references across README/SDK_DEVELOPMENT/SDK_NEW_LANGUAGE_GUIDE/SDK_COMPARISON/ WORKER_ARCHITECTURE_COMPARISON were repointed. CHANGELOG references were left alone -- it records what shipped under the old paths. Also fixes five pre-existing broken links in README.md, which pointed at docs/api-reference/{authorization,secret,prompt,integration,schema}-client.md -- files that never existed. They would have failed the link check added in the next commit. AGENTS.md's Documentation Maintenance contract now points at docs/observability.md, and gains a note that the stubs are deliberate. Verified: all 487 internal markdown links resolve. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This repo had no documentation gate at all -- none of the five workflows
referenced .md, lychee, a link checker, or markdownlint. Adds the three
checks java-sdk runs in ci.yml, in this repo's idiom.
One fast `docs` job rather than folding these into the unit-test matrix:
there they would run three times identically across Node 20/22/24, and
link checking would depend on network state inside a unit-test run.
1. Link validation -- lycheeverse/lychee-action, same args as java-sdk
(`--offline --no-progress README.md docs`).
2. Retired-reference grep, split into two steps because one pattern could
not serve both purposes:
- retired paths and renderer-specific constructs, unconditional
- AGENTSPAN_* outside the migration guide, with upgrading.md and
compatibility.md excluded
The second exists because docs/upgrading.md must show the old names to
document the rename; a single blanket grep failed on its own migration
guide. Deliberately omits java-sdk's docs/agents/api-reference.md and
docs/agents/index.md patterns -- we keep those as redirect stubs, as
python-sdk does. See docs/documentation-parity.md.
3. Agent configuration schema -- scripts/verify-agent-schema.mjs, wired as
`npm run verify:agent-schema`, following the existing verify-dist.mjs
pattern rather than transliterating python-sdk's pytest approach.
Validates docs/agents/reference/agent-schema.json against all 19
fixtures in e2e/_configs/, then asserts 8 structural invariants
(name required and identifier-patterned, additionalProperties stays
permissive so a newer server field cannot break an older SDK, agents
recursive, toolType enum includes worker, all nine strategies present,
guardrail onFail complete, handoff target required) and the canonical
documentation paths.
Adds ajv ^8.17.1 as an explicit devDependency. It was already present
transitively via eslint, but depending on a transitive dep for a CI gate
is how gates silently stop running.
Verified locally, not just assumed: lychee reports 506 links / 0 errors;
both greps are clean; the schema verifier passes and was negative-tested
three ways (a config missing `name`, a name violating the identifier
pattern, and a forbidden path reappearing) -- each fails as intended and
returns to green. Workflow YAML parses with all 7 steps. Lint 0 errors,
1582 unit tests pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
main advanced four commits while this branch was in flight (#141, #142 touched agent examples). Two files gained AGENTSPAN_* references after the rename sweep had already run, so they still told readers to set the deprecated names: - SDK_DEVELOPMENT.md:623 - examples/README.md:51-52 Both are outside the `README.md docs` scope the new CI grep covers, so they would not have been caught. Worth noting the grep itself is correctly calibrated: it matches AGENTSPAN_[A-Z] (a concrete variable name) and so does not fire on the `AGENTSPAN_*` glob that the migration and reference pages legitimately use. Also resolves the rebase conflict in examples/agents/README.md, taking main's table shape from #142 (example counts removed) with this branch's "Conductor Quickstart" rename applied. The `agentspan deploy` CLI invocation in that file is left as-is -- external command surface. Re-verified post-rebase: lint 0 errors (358 warnings, unchanged), 1582 unit tests across 80 suites, lychee 508 links / 0 errors, schema verifier green, 649 internal markdown links resolve. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ambiorix2099
force-pushed
the
docs/align-with-java-doc-structure
branch
from
July 29, 2026 01:59
bd2c875 to
d747352
Compare
The rebrand sweep rewrote `chmod +x agentspan` to `chmod +x Conductor`,
breaking the Agent E2E workflow at the "Download CLI binary from release"
step:
chmod: cannot access 'Conductor': No such file or directory
The downloaded artifact is named `agentspan` -- it is the external CLI's
binary, not ours. `--output agentspan` on the line above was in the
protected set, but the bare binary name on the next line was not, so the
lowercase prose rule caught it. Found by CI, not by the local audit, which
checked quoted string literals and URL/scope positions but not bare shell
command arguments.
Swept the same class across .github/workflows/, scripts/, and e2e/ for
`Conductor` in a command position -- no other instances.
Also corrects the surrounding comments, which the sweep had left calling
this the "Conductor CLI" while the command downloads `agentspan_linux_amd64`
and chmods `agentspan`. Prose that disagrees with the literal beside it is
the specific failure mode this rebrand was supposed to avoid, so these now
say "external `agentspan` CLI".
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Two leftovers from the rebrand sweep, both cosmetic but wrong: 1. "an Agentspan" became "an Conductor" in three doc comments (src/agents/worker.ts, src/agents/skill.ts, src/sdk/clients/agent/WorkflowClient.ts). The article no longer agrees. 2. Seven files carried `Copyright (c) 2026 Agentspan` headers, which the sweep renamed to "2026 Conductor" rather than removing. The 15 files with `2025 Agentspan` headers were stripped, matching what python-sdk did, so these were inconsistent -- and asserting a "Conductor" copyright holder is a claim this change has no business making. Only 7 of ~700 source files had a header at all, so stripping matches the repo norm too. No behavior change. src/ now carries no copyright headers. Verified: lint 0 errors (358 warnings, unchanged from origin/main), 1582 unit tests across 80 suites, schema verifier green, lychee 0 errors, and tsc has zero net new errors against origin/main -- 455 pre-existing on both sides, the single diff being one error line-shifted 15 -> 12 by the header strip. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author
|
Superseded. #147 merged the docs restructure and the rebrand while this was in flight, and Two things from here were not covered by #147, and are now split out into a focused PR:
See #151. Full original work preserved on the |
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.
Ports the work from conductor-oss/python-sdk#441 to this SDK. Three commits, reviewable in order: rebrand → docs → CI.
The premise was verified first, and it holds here
When this was attempted against the Java SDK the premise turned out inverted, because Java was the source of the structure, not the target. That is not the case here. The decisive evidence is what PR 441 modified under
docs/:That is byte-for-byte the six-file layout this repo has today. This repo sits at Python's pre-PR position. Zero of the PR's 43 added doc files existed here, and
CONDUCTOR_AGENT_appeared zero times.Two corrections to the upstream framing, both confirmed against the merged diff and
python-sdk@main:agentspan; 189 containedAGENTSPAN_, across 18 distinct names.runtime/config.pydeletes everyAGENTSPAN_*read ("Only CONDUCTOR_AGENT_* settings are supported."), andAgentspanErrorwas renamed outright —python-sdk@maincontains zero occurrences. The addedtest_agent_error_alias.pyonly asserts two import paths resolve to the same class. Neither kind of alias survived.This PR keeps both, deliberately, because this repo already ships a spec'd compat posture Python discarded (
resolveOrkesConfig.ts, spec R3) andAgentspanErroris the exported base of 12 subclasses.1. Rebrand (
2a613f8)AGENTSPAN_*→CONDUCTOR_AGENT_*,AgentspanError→ConductorAgentError,AgentspanMetadata→ConductorAgentMetadata, and 15 strippedCopyright (c) 2025 Agentspanheaders.Nothing breaks at runtime. Old env names resolve as deprecated fallbacks warning once per name per process; the error alias is the same class object, not a subclass, so
instanceofworks both directions, and both the value and type are exported.AGENTSPAN_LOG_LEVELfalls back silently — warning there means logging through the logger whose level is still being resolved.e2e/helpers.tscarries its own fallback because that suite ships as a release bundle and the SDK-level alias doesn't cover vars the harness reads directly.The only observable change is
error.nameon a base-class instance.Names deliberately left alone — the external-name set turned out to be roughly twice what an initial survey suggests, and includes traps worse than
agentspan.embedded:__agentspan_ctx__,_agentspan.llm,_agentspan_human_task,__agentspan_sdk__.cjsagentspan.embedded,agentspan.default-context-windowagentspan-ai/agentspan,@agentspan-ai,agentspan-ai/codingexamplesagentspanbinary,~/.agentspan/config.json,agentspan deploy(198 occurrences)agentspan <= 0.4.2,agentspan server > 0.4.2— renaming these makes them factually falseUseful invariant: every cross-SDK wire key is underscore-prefixed. That's the fastest way to tell a wire contract from prose. Full table now in
AGENTS.md.A blanket sweep would have broken an npm scope under
node_modules, the CLI binary name, an external GitHub user, and four npm package names (npm names must be lowercase). Each was caught and restored.New tests cover the compat guarantee — the rest of the suite was mechanically renamed, so without them it would have had zero coverage.
2. Docs (
6b10e46)43 canonical pages, authored rather than translated — the Python originals are Python prose with Python samples, so nothing was copyable. Every snippet is TS against this SDK's real API, mined from the six pages being replaced.
frameworks/deviates from the canonical set on purpose: dropsclaude-agent-sdk(no such wrapper here), addsvercel-ai, a JavaScript-only bridge with no Java or Python counterpart. Recorded indocumentation-parity.md.agent-schema.jsonis a real draft-07 contract, not a placeholder — it validates all 19e2e/_configs/fixtures.19 stubs, not deletions, so inbound links from npm, issues, and blog posts keep resolving.
METRICS.mdandLEASE_EXTENSION.mdcontent was migrated in full before stubbing, and their nine inbound references repointed.CHANGELOG.mdwas left alone — it records what shipped under the old paths.Also fixes five pre-existing broken README links to
docs/api-reference/*-client.mdfiles that never existed, which would have failed the new link check.3. CI (
bd2c875)This repo had no documentation gate — none of the five workflows referenced
.md, lychee, or a link checker. Adds Java's three checks in this repo's idiom (a Nodeverify:*script, not pytest), as one fast job rather than three redundant runs across the Node matrix.A genuine conflict surfaced: Java's CI greps to reject
docs/agents/api-reference.md, while Python keeps it as a stub. We follow Python — preserving inbound links to a public SDK's docs wins — so that pattern is omitted. The retired-reference check is also split in two, because a single blanket grep failed onupgrading.md, whose job is to document the old names.Verification
Everything below was run, not assumed:
maintsc --noEmitmain(diffed; the 455 pre-existinge2e/errors are unchanged)verify:distdist/Notes for the reviewer
2a613f8is mostly mechanical,6b10e46is prose,bd2c875is 40 lines of YAML plus a script.CHANGELOG.mdretainsAGENTSPAN_*in historical entries. Intentional.docs/agents/getting-started.mddocumentedAGENTSPAN_API_KEY, which no shipped code reads. Dropped from the new docs rather than implemented — if it's meant to work, that's a separate fix.REVIEW.md(529 lines) is a stale code-review artifact, left in place as out of scope.🤖 Generated with Claude Code