@withgateway/sdk 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withgateway/sdk",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Gateway SDK for TypeScript - A/B experiments, tracing, and observability",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -337,7 +337,7 @@ SDK: `openSession(slug, { task: spec })` (TS), `open_session(slug, spec)` (Pytho
337
337
  sessions open it by id and grades attribute to the task and its version:
338
338
 
339
339
  ```bash
340
- gateway worlds task create task.json --world x # version 1; --name overrides the spec's name
340
+ gateway worlds task create task.json --world x # version 1; --name overrides the spec's name; --replace: a taken name becomes its next version
341
341
  gateway worlds task list --world x --metadata externalUserId=u_42
342
342
  gateway worlds task show <TASK_ID> [--version 2] # spec + version history
343
343
  gateway worlds task validate <TASK_ID> # seed/grader entities against the pinned world's version
@@ -403,14 +403,14 @@ client is the agent. Dependency tools are `<alias>.<tool>`, each world grades on
403
403
  ```bash
404
404
  gateway worlds serve ./whatsapp --task escalate_locked_account --port 8080 # prints {task, prompt, tools, verifiers, worlds}
405
405
  curl -s localhost:8080/__session/task # + contracts: each tool's description and input schema
406
- curl -s -X POST localhost:8080/__session/call -d '{"tool":"slack.post_message","args":{...}}'
407
406
  gateway worlds call http://localhost:8080 list_conversations --state --grade # act from the CLI, read state, grade
408
407
  gateway worlds call http://localhost:8080 slack.list_channels --args '{...}' --close # end it; the serve process exits
409
408
  ```
410
409
 
411
- `GET /__session/{task,tools,state}`, `POST /__session/{call,grade,reset,seed,close}`. `--task`
412
- and `--scenario` belong to `serve`; `worlds call <url>` refuses them. A directory target
413
- (`worlds call ./x <tool>`) opens and closes its own session per call instead.
410
+ `GET /__session/{task,tools,state}`, `POST /__session/{call,grade,reset,seed,close}`; `--task` and
411
+ `--scenario` belong to `serve`. A directory target (`worlds call ./x <tool>`) opens and closes its
412
+ own session per call. A HOSTED session is not a served url (the World Host serves no `/__session/*`;
413
+ its `api.url` takes the session's bearer): act on it by id, `gateway worlds call <sessionId> <tool> --state --grade --close`.
414
414
 
415
415
  ## 7. Run and grade
416
416
 
@@ -337,7 +337,7 @@ SDK: `openSession(slug, { task: spec })` (TS), `open_session(slug, spec)` (Pytho
337
337
  sessions open it by id and grades attribute to the task and its version:
338
338
 
339
339
  ```bash
340
- gateway worlds task create task.json --world x # version 1; --name overrides the spec's name
340
+ gateway worlds task create task.json --world x # version 1; --name overrides the spec's name; --replace: a taken name becomes its next version
341
341
  gateway worlds task list --world x --metadata externalUserId=u_42
342
342
  gateway worlds task show <TASK_ID> [--version 2] # spec + version history
343
343
  gateway worlds task validate <TASK_ID> # seed/grader entities against the pinned world's version
@@ -403,14 +403,14 @@ client is the agent. Dependency tools are `<alias>.<tool>`, each world grades on
403
403
  ```bash
404
404
  gateway worlds serve ./whatsapp --task escalate_locked_account --port 8080 # prints {task, prompt, tools, verifiers, worlds}
405
405
  curl -s localhost:8080/__session/task # + contracts: each tool's description and input schema
406
- curl -s -X POST localhost:8080/__session/call -d '{"tool":"slack.post_message","args":{...}}'
407
406
  gateway worlds call http://localhost:8080 list_conversations --state --grade # act from the CLI, read state, grade
408
407
  gateway worlds call http://localhost:8080 slack.list_channels --args '{...}' --close # end it; the serve process exits
409
408
  ```
410
409
 
411
- `GET /__session/{task,tools,state}`, `POST /__session/{call,grade,reset,seed,close}`. `--task`
412
- and `--scenario` belong to `serve`; `worlds call <url>` refuses them. A directory target
413
- (`worlds call ./x <tool>`) opens and closes its own session per call instead.
410
+ `GET /__session/{task,tools,state}`, `POST /__session/{call,grade,reset,seed,close}`; `--task` and
411
+ `--scenario` belong to `serve`. A directory target (`worlds call ./x <tool>`) opens and closes its
412
+ own session per call. A HOSTED session is not a served url (the World Host serves no `/__session/*`;
413
+ its `api.url` takes the session's bearer): act on it by id, `gateway worlds call <sessionId> <tool> --state --grade --close`.
414
414
 
415
415
  ## 7. Run and grade
416
416