You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SDKs: stream-json, Node 18, and publishing to PyPI and npm #21
sdk/python (incode_sdk, stdlib only, 3.9+) and sdk/typescript (@incord/incode-sdk, Node 18+, no runtime deps) are done and tested against a shared fake (sdk/testing/fake_incode.py) and the real binary. They aren't published, and a few pieces are missing.
Steps (local)
python3 -m unittest discover sdk/python/tests
cd sdk/typescript && npm install && npm test
INCODE_BIN=$PWD/target/debug/incode python3 -m unittest discover sdk/python/tests # live test
python3 sdk/examples/python_example.py ; node sdk/examples/typescript_example.mjs
To build
Wrap incode -t ... --output-format stream-json as a streaming run_task / runTask: one event per line, then the final result object. Today only json is wrapped.
Test on Node 18 (only 20 and 22 were run).
Agent→client terminal/* requests and elicitation (answered "method not found" today).
A fuller session/list helper.
Publish:
Python: a PyPI project, python -m build then twine upload, or trusted publishing from a tagged workflow.
TypeScript: the npm org @incord, then npm publish --access public from sdk/typescript after npm run build.
Streaming one-shot runs. Python stream_task(...) / TaskStream and TypeScript streamTask(...) deliver each stream-json event (init, text, thinking, notice, tool_use, tool_result, usage) as it arrives, then the result, with the same errors run_task/runTask raise.
Node 18 tested. CI now runs the SDKs on Node 18 with Python 3.9 (on ubuntu-22.04, since ubuntu-latest is now 26.04 and has no Python 3.9 build), and on Node 20 and 22.
Intentionally not built: terminal/* and elicitation. incode never sends terminal/* requests to a client. It deliberately doesn't send elicitation either: see src/acp_agent/permission.rs:11-15. Questions are reported to the model as unanswered, because clients answer elicitation with "method not supported". So the SDKs answering "method not found" is correct for everything incode does, and handlers would be dead code. If incode ever starts sending them, the SDKs should follow.
Next: a typed session/list helper, listing this workspace's sessions or every workspace's (branch feat/sdk-sessions, coming as its own PR).
The typed session/list helper is done in #48 (merged). Python Session.sessions(all_workspaces=False) and TypeScript session.sessions({ allWorkspaces }) return typed SessionInfo (id, cwd, title, last updated), newest first, for this workspace or every workspace. list_sessions / listSessions are unchanged.
That finishes this issue's code items:
streaming;
Node 18 (and Python 3.9) in CI;
the sessions helper;
terminal/* and elicitation, intentionally not built (see the comment above).
What's left is publishing, which needs your PyPI project and the @incord npm org: python -m build + twine upload (or trusted publishing), and npm publish --access public.
Solved: streaming in #47, typed sessions in #48, Node 18 and Python 3.9 tested in CI. Both SDKs are tested against the fake agent and the real binary. Publishing to PyPI and npm moved to #56 (it needs the owner's accounts).
Activity
blockmandev commentedon Oct 22, 2026
Done in #47 (merged):
stream_task(...)/TaskStreamand TypeScriptstreamTask(...)deliver eachstream-jsonevent (init,text,thinking,notice,tool_use,tool_result,usage) as it arrives, then the result, with the same errorsrun_task/runTaskraise.ubuntu-22.04, sinceubuntu-latestis now 26.04 and has no Python 3.9 build), and on Node 20 and 22.Intentionally not built:
terminal/*and elicitation. incode never sendsterminal/*requests to a client. It deliberately doesn't send elicitation either: seesrc/acp_agent/permission.rs:11-15. Questions are reported to the model as unanswered, because clients answer elicitation with "method not supported". So the SDKs answering "method not found" is correct for everything incode does, and handlers would be dead code. If incode ever starts sending them, the SDKs should follow.Next: a typed
session/listhelper, listing this workspace's sessions or every workspace's (branchfeat/sdk-sessions, coming as its own PR).Needs your accounts: publishing to PyPI and npm.
Merge pull request #47 from incordai/feat/sdk-stream
Merge pull request #48 from incordai/feat/sdk-sessions
blockmandev commentedon Oct 22, 2026
The typed
session/listhelper is done in #48 (merged). PythonSession.sessions(all_workspaces=False)and TypeScriptsession.sessions({ allWorkspaces })return typedSessionInfo(id,cwd, title, last updated), newest first, for this workspace or every workspace.list_sessions/listSessionsare unchanged.That finishes this issue's code items:
terminal/*and elicitation, intentionally not built (see the comment above).What's left is publishing, which needs your PyPI project and the
@incordnpm org:python -m build+twine upload(or trusted publishing), andnpm publish --access public.blockmandev commentedon Oct 23, 2026
Solved: streaming in #47, typed sessions in #48, Node 18 and Python 3.9 tested in CI. Both SDKs are tested against the fake agent and the real binary. Publishing to PyPI and npm moved to #56 (it needs the owner's accounts).