SDKTypeScript v2 preview

TypeScript v2 preview

There is no TypeScript v2 preview. No preview package has been published, and no persistent-session API is offered to programs.

A persistent-session package would let a program open a session, send prompts to it over several calls, and resume it later from code. No such package is published. The command line already covers this work in two ways.

To keep one process open across several prompts, start the run with --input-format stream-json --output-format stream-json --verbose and write each user message to standard input. A message sent after a turn ends starts the next turn. See Streaming vs single mode.

To continue a saved session in a new process:

  • Start a session with --session-id <id> and a first prompt, then continue it with --resume <id> and each following prompt. See Scripting and CI.
  • Use -c to continue the most recent session in the current folder.
syntic -p "find where we validate email addresses" --session-id 11111111-2222-4333-8444-555555555555
syntic -p --resume 11111111-2222-4333-8444-555555555555 "now add a check for plus-addressing"

Each syntic -p call with a plain prompt starts a new process. The session survives between calls because it is saved, so a program can resume it. Use streaming input when the process should stay open between prompts.

Status

The SDK, including its TypeScript package, is not released. Decisions about its scope and release date are made by the Syntic Code team. This page will be updated when a preview is published.

  • TypeScript for the current way to call Syntic Code from Node.js.
  • Python for the current way to call it from Python.