@introspection-sdk/introspection-browser 0.5.8 → 0.5.9

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @introspection-sdk/introspection-browser@0.5.8 build /home/runner/work/introspection-js-sdk/introspection-js-sdk/packages/introspection-browser
2
+ > @introspection-sdk/introspection-browser@0.5.9 build /home/runner/work/introspection-js-sdk/introspection-js-sdk/packages/introspection-browser
3
3
  > tsc
4
4
 
package/README.md CHANGED
@@ -78,13 +78,13 @@ const run = await client.tasks.start({
78
78
  });
79
79
 
80
80
  for await (const ev of run.stream()) {
81
- console.log(ev.event, ev.data);
81
+ console.log(ev.type);
82
82
  }
83
83
  ```
84
84
 
85
85
  `client.tasks` exposes the full CRUD surface (`create` / `start` / `get` /
86
86
  `list` / `update` / `delete` / `archive` / `unarchive`) plus per-run streaming
87
- (`run.stream()`, `run.text()`, `run.cancel()`).
87
+ (`run.stream()` yields AG-UI events, `run.text()`, `run.cancel()`).
88
88
 
89
89
  `create` and `start` accept **`idle_timeout_seconds`** (`number`) to override
90
90
  the interactive idle window before the sandbox is torn down. `0` tears it down
@@ -2,7 +2,7 @@
2
2
  * Browser HTTP transport for the Introspection Data Plane `/v1` surface.
3
3
  *
4
4
  * The request/response machinery — URL joining, query building, body
5
- * serialization, error mapping, SSE — lives in the shared
5
+ * serialization, error mapping, AG-UI stream parsing — lives in the shared
6
6
  * `@introspection-sdk/http` {@link BaseHttpClient}. This module pins the
7
7
  * browser auth strategy on top of it: the DP is reached with the HttpOnly
8
8
  * `intro_dp_session` cookie minted by `POST /v1/oauth/exchange`, so every
package/dist/api/http.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Browser HTTP transport for the Introspection Data Plane `/v1` surface.
3
3
  *
4
4
  * The request/response machinery — URL joining, query building, body
5
- * serialization, error mapping, SSE — lives in the shared
5
+ * serialization, error mapping, AG-UI stream parsing — lives in the shared
6
6
  * `@introspection-sdk/http` {@link BaseHttpClient}. This module pins the
7
7
  * browser auth strategy on top of it: the DP is reached with the HttpOnly
8
8
  * `intro_dp_session` cookie minted by `POST /v1/oauth/exchange`, so every
@@ -31,15 +31,15 @@
31
31
  * prompt: "Summarize my latest order",
32
32
  * runtime_id: runtimeId,
33
33
  * });
34
- * for await (const ev of run.stream()) console.log(ev.event, ev.data);
34
+ * for await (const ev of run.stream()) console.log(ev.type);
35
35
  * ```
36
36
  */
37
37
  export { IntrospectionApiClient, type IntrospectionApiClientOptions, } from "./client.js";
38
38
  export { TasksClient, TaskRunsClient, RunHandle, type CreateTaskParams, type StartTaskParams, } from "./tasks.js";
39
39
  export { ConversationItemsClient, ConversationsClient, FileVersionsClient, FilesClient, SharesClient, type FileUploadBody, } from "@introspection-sdk/http";
40
40
  export { BrowserHttpClient, type BrowserHttpConfig } from "./http.js";
41
- export { parseSse } from "./sse.js";
42
41
  export { Paginator, cursorPaginate, type PageSource, } from "@introspection-sdk/http";
43
- export type { Task, TaskRun, TaskStatus, TaskCreateResponse, TaskListParams, TaskUpdateParams, TaskRunCreateParams, TaskCancelResponse, RunIdentityInput, Paginated, SseEvent, File, FileType, FileListParams, FileUpdateParams, FileCreateTextParams, ListParams, ConversationSummary, ConversationItem, ConversationItemList, ConversationListParams, ConversationItemListParams, ConversationItemInclude, ConversationResponse, ResourceShare, ShareResourceType, ShareCreateParams, ShareListParams, } from "@introspection-sdk/types";
42
+ export { EventType } from "@introspection-sdk/types";
43
+ export type { AGUIEvent, BaseEvent, Interrupt, Message, ResumeEntry, RunAgentInput, Task, TaskRun, TaskStatus, TaskRunKind, TaskCreateResponse, TaskListParams, TaskUpdateParams, TaskRunCreateParams, TaskRunResumeParams, TaskCancelResponse, RunIdentityInput, Paginated, File, FileType, FileListParams, FileUpdateParams, FileCreateTextParams, ListParams, ConversationSummary, ConversationItem, ConversationItemList, ConversationListParams, ConversationItemListParams, ConversationItemInclude, ConversationResponse, ResourceShare, ShareResourceType, ShareCreateParams, ShareListParams, } from "@introspection-sdk/types";
44
44
  export { IntrospectionAPIError, AuthenticationError, InsufficientScopeError, NotFoundError, NetworkError, RunnerExpiredError, } from "@introspection-sdk/types";
45
45
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,GACnC,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EACX,cAAc,EACd,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,KAAK,cAAc,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EACL,SAAS,EACT,cAAc,EACd,KAAK,UAAU,GAChB,MAAM,yBAAyB,CAAC;AAGjC,YAAY,EACV,IAAI,EACJ,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,kBAAkB,GACnB,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,GACnC,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EACX,cAAc,EACd,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,KAAK,cAAc,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EACL,SAAS,EACT,cAAc,EACd,KAAK,UAAU,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD,YAAY,EACV,SAAS,EACT,SAAS,EACT,SAAS,EACT,OAAO,EACP,WAAW,EACX,aAAa,EACb,IAAI,EACJ,OAAO,EACP,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,kBAAkB,GACnB,MAAM,0BAA0B,CAAC"}
package/dist/api/index.js CHANGED
@@ -31,14 +31,14 @@
31
31
  * prompt: "Summarize my latest order",
32
32
  * runtime_id: runtimeId,
33
33
  * });
34
- * for await (const ev of run.stream()) console.log(ev.event, ev.data);
34
+ * for await (const ev of run.stream()) console.log(ev.type);
35
35
  * ```
36
36
  */
37
37
  export { IntrospectionApiClient, } from "./client.js";
38
38
  export { TasksClient, TaskRunsClient, RunHandle, } from "./tasks.js";
39
39
  export { ConversationItemsClient, ConversationsClient, FileVersionsClient, FilesClient, SharesClient, } from "@introspection-sdk/http";
40
40
  export { BrowserHttpClient } from "./http.js";
41
- export { parseSse } from "./sse.js";
42
41
  export { Paginator, cursorPaginate, } from "@introspection-sdk/http";
42
+ export { EventType } from "@introspection-sdk/types";
43
43
  export { IntrospectionAPIError, AuthenticationError, InsufficientScopeError, NotFoundError, NetworkError, RunnerExpiredError, } from "@introspection-sdk/types";
44
44
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EACL,sBAAsB,GAEvB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EACX,cAAc,EACd,SAAS,GAGV,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,YAAY,GAEb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAA0B,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EACL,SAAS,EACT,cAAc,GAEf,MAAM,yBAAyB,CAAC;AAiCjC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,kBAAkB,GACnB,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EACL,sBAAsB,GAEvB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EACX,cAAc,EACd,SAAS,GAGV,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,YAAY,GAEb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAA0B,MAAM,WAAW,CAAC;AACtE,OAAO,EACL,SAAS,EACT,cAAc,GAEf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAwCrD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,kBAAkB,GACnB,MAAM,0BAA0B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@introspection-sdk/introspection-browser",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Introspection observability SDK for the browser",
6
6
  "engines": {
@@ -20,7 +20,7 @@
20
20
  }
21
21
  },
22
22
  "devDependencies": {
23
- "@types/node": "^22.19.21",
23
+ "@types/node": "^22.20.0",
24
24
  "eslint": "^9.39.4",
25
25
  "typescript": "5.9.3",
26
26
  "@repo/eslint-config": "0.0.0",
@@ -31,8 +31,8 @@
31
31
  "@opentelemetry/api-logs": "^0.219.0",
32
32
  "@opentelemetry/sdk-logs": "^0.219.0",
33
33
  "@opentelemetry/exporter-logs-otlp-http": "^0.219.0",
34
- "@introspection-sdk/http": "0.5.8",
35
- "@introspection-sdk/types": "0.5.8"
34
+ "@introspection-sdk/http": "0.5.9",
35
+ "@introspection-sdk/types": "0.5.9"
36
36
  },
37
37
  "scripts": {
38
38
  "lint": "eslint . --max-warnings 0",
package/src/api/http.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Browser HTTP transport for the Introspection Data Plane `/v1` surface.
3
3
  *
4
4
  * The request/response machinery — URL joining, query building, body
5
- * serialization, error mapping, SSE — lives in the shared
5
+ * serialization, error mapping, AG-UI stream parsing — lives in the shared
6
6
  * `@introspection-sdk/http` {@link BaseHttpClient}. This module pins the
7
7
  * browser auth strategy on top of it: the DP is reached with the HttpOnly
8
8
  * `intro_dp_session` cookie minted by `POST /v1/oauth/exchange`, so every
package/src/api/index.ts CHANGED
@@ -31,7 +31,7 @@
31
31
  * prompt: "Summarize my latest order",
32
32
  * runtime_id: runtimeId,
33
33
  * });
34
- * for await (const ev of run.stream()) console.log(ev.event, ev.data);
34
+ * for await (const ev of run.stream()) console.log(ev.type);
35
35
  * ```
36
36
  */
37
37
 
@@ -55,26 +55,33 @@ export {
55
55
  type FileUploadBody,
56
56
  } from "@introspection-sdk/http";
57
57
  export { BrowserHttpClient, type BrowserHttpConfig } from "./http.js";
58
- export { parseSse } from "./sse.js";
59
58
  export {
60
59
  Paginator,
61
60
  cursorPaginate,
62
61
  type PageSource,
63
62
  } from "@introspection-sdk/http";
63
+ export { EventType } from "@introspection-sdk/types";
64
64
 
65
65
  // Re-exported wire types for convenience.
66
66
  export type {
67
+ AGUIEvent,
68
+ BaseEvent,
69
+ Interrupt,
70
+ Message,
71
+ ResumeEntry,
72
+ RunAgentInput,
67
73
  Task,
68
74
  TaskRun,
69
75
  TaskStatus,
76
+ TaskRunKind,
70
77
  TaskCreateResponse,
71
78
  TaskListParams,
72
79
  TaskUpdateParams,
73
80
  TaskRunCreateParams,
81
+ TaskRunResumeParams,
74
82
  TaskCancelResponse,
75
83
  RunIdentityInput,
76
84
  Paginated,
77
- SseEvent,
78
85
  File,
79
86
  FileType,
80
87
  FileListParams,
package/dist/api/sse.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * SSE parsing now lives in the shared `@introspection-sdk/http` core so
3
- * the browser and Node SDKs stay byte-for-byte identical. Re-exported
4
- * here to keep the existing `./sse.js` import path stable.
5
- */
6
- export { parseSse } from "@introspection-sdk/http";
7
- //# sourceMappingURL=sse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../src/api/sse.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC"}
package/dist/api/sse.js DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * SSE parsing now lives in the shared `@introspection-sdk/http` core so
3
- * the browser and Node SDKs stay byte-for-byte identical. Re-exported
4
- * here to keep the existing `./sse.js` import path stable.
5
- */
6
- export { parseSse } from "@introspection-sdk/http";
7
- //# sourceMappingURL=sse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sse.js","sourceRoot":"","sources":["../../src/api/sse.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC"}
package/src/api/sse.ts DELETED
@@ -1,6 +0,0 @@
1
- /**
2
- * SSE parsing now lives in the shared `@introspection-sdk/http` core so
3
- * the browser and Node SDKs stay byte-for-byte identical. Re-exported
4
- * here to keep the existing `./sse.js` import path stable.
5
- */
6
- export { parseSse } from "@introspection-sdk/http";