Skip to content

Guides and recipes use obsolete SDK imports, event objects, and runtime APIs #38

@nficano

Description

@nficano

Several guides and long-form recipes use APIs that do not exist in the current SDK. docs/guides/jobs.md:26 documents agent_version, resume_token, and resume_from_seq submit parameters that ARCPClient.submit does not accept, docs/guides/jobs.md:50 calls ctx.progress(0, 100) even though total is keyword-only, docs/guides/jobs.md:56 calls nonexistent ctx.report_cost, and docs/guides/jobs.md:88 calls nonexistent handle.cancel. docs/transports.md:40 imports ARCPMiddleware, docs/transports.md:51 imports arcp.transport.WebSocketClientTransport, and docs/transports.md:66 imports StdioClientTransport, but the current package exposes arcp.middleware.asgi.arcp_asgi_app, WebSocketTransport.connect, and StdioTransport. docs/recipes/mcp-skill.md:33 imports ARCPRuntime and JobContext from arcp, imports arcp.auth and arcp.transport, constructs ARCPRuntime(transport=..., auth=...), uses ctx.input_stream() and ctx.emit_event(), and reads event.kind and event.data; those names do not match the current public surface or event dictionaries.

Fix prompt: Audit docs/guides/*.md, docs/transports.md, and the narrative recipes for executable Python snippets, then rewrite them against the current APIs from arcp.client, arcp.runtime, arcp.middleware.asgi, WebSocketTransport, StdioTransport, JobContext, and JobHandle. Update event examples to use dictionaries yielded by handle.events() or the chunks() helper, document version pinning as agent="name@version", and replace old cost and lease examples with the current lease_request, LeaseConstraints, and ctx.metric behavior. Add a docs snippet test, even if it only imports and type-checks fenced Python blocks, so broken imports and missing methods are caught before release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationseverity:highHigh severity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions