Skip to content

feat: added ts-core sdk#50

Open
Adarsh9977 wants to merge 10 commits into
secureagentics:mainfrom
Adarsh9977:ts-core
Open

feat: added ts-core sdk#50
Adarsh9977 wants to merge 10 commits into
secureagentics:mainfrom
Adarsh9977:ts-core

Conversation

@Adarsh9977

Copy link
Copy Markdown
Contributor

Summary

  • Implemented the core sdk and splitted from feat:added typescript sdk supports openai-sdk #40
  • Add @secureagentics/adrian with adrian.init() / adrian.shutdown() lifecycle, JSONL logging, WebSocket streaming, PII redaction, and LLM/tool event pairing
  • Export @secureagentics/adrian/capture subpath for shared provider instrumentation helpers
  • Align BLOCK-mode tool gating with Python SDK: fail-open on verdict timeout; honour 4003 quota-exhausted reconnect after 60s

Test plan

  • cd sdk/typescript/packages/core npm run test

Checklist

  • CLA signed (see CLA.md)
  • Tests pass locally
  • Docs updated where needed
  • British English; no em-dashes; no marketing fluff

Introduce @secureagentics/adrian with the event pipeline, PII redaction,
WebSocket streaming, policy gating, and core test suite. Includes shared
proto layout and workspace scaffolding for provider packages.
Remove the legacy root proto/event.proto after relocating the schema into
the Python SDK package layout.
Restore proto/event.proto at the repo root and drop the unrelated Python
proto relocation, Makefile, and SDK changes from the ts-core branch.
Fix init option resolution so explicit params beat env vars and wsUrl: null
disables WebSocket. Align BLOCK-mode with Python fail-open, wire 4003 quota
reconnect delay, refactor shouldHalt to switch, export adrian namespace,
merge README docs, and add init/policy/ws tests.
@Adarsh9977

Copy link
Copy Markdown
Contributor Author

@yanny-sec please review this as PR1 with core logic/tests only

@yanny-sec

Copy link
Copy Markdown
Contributor

Thank you for addressing all of the issues so quickly. Three more things to address:

  1. sdk/typescript is missing integrity hashes for package-lock.json
  2. In block mode when missing a tool call id fails closed instead of open. As stated this will be dictated by the policy in a followup PR later on but for now I say let's make it match the Python SDK's behaviour.
  3. 4003 reconnect test doesn't test the real reconnect path so it would miss a regresion. Also small nit: the delay should stay at 60s matching the Python SDK instead of the 61s. Currently it sleeps twice for 60 + 1 seconds.

@Adarsh9977

Copy link
Copy Markdown
Contributor Author

Thank you for addressing all of the issues so quickly. Three more things to address:

  1. sdk/typescript is missing integrity hashes for package-lock.json
  2. In block mode when missing a tool call id fails closed instead of open. As stated this will be dictated by the policy in a followup PR later on but for now I say let's make it match the Python SDK's behaviour.
  3. 4003 reconnect test doesn't test the real reconnect path so it would miss a regresion. Also small nit: the delay should stay at 60s matching the Python SDK instead of the 61s. Currently it sleeps twice for 60 + 1 seconds.

Thanks @yanny-sec, addressing these now

@Adarsh9977

Copy link
Copy Markdown
Contributor Author

Hey @yanny-sec, I've addressed all previous comments, appreciate your views now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants