@renai-labs/sdk 0.1.16 → 0.1.17

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.
@@ -2186,7 +2186,7 @@ export declare const sessionUrlQueryKey: (options: Options<SessionUrlData>) => [
2186
2186
  /**
2187
2187
  * Get the OpenCode URL for a session
2188
2188
  *
2189
- * Returns the session's OpenCode endpoint. `url` is the bare (Basic-auth protected) URL; `authedUrl` embeds the credential as an `auth_token` query param for one-call access — treat it as a secret since it is equivalent to the password. `serverPassword`/`username` are provided so callers can build their own Basic auth header instead.
2189
+ * Returns the session's OpenCode endpoint. `url` is the bare (Basic-auth protected) web-UI deep link; `authedUrl` embeds the credential as an `auth_token` query param for one-call access — treat it as a secret since it is equivalent to the password. `serverUrl` is the bare server origin — pass it to `opencode attach <serverUrl> --session <id>` (its URL arg is the SDK base, so a deep link would break). `serverPassword`/`username` are provided so callers can build their own Basic auth header instead.
2190
2190
  */
2191
2191
  export declare const sessionUrlOptions: (options: Options<SessionUrlData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").SessionUrlResponse, SessionUrlError, import("../types.gen").SessionUrlResponse, [Pick<Options<SessionUrlData>, "headers" | "query" | "body" | "path" | "baseUrl"> & {
2192
2192
  _id: string;
@@ -2473,7 +2473,7 @@ export const sessionUrlQueryKey = (options) => createQueryKey("sessionUrl", opti
2473
2473
  /**
2474
2474
  * Get the OpenCode URL for a session
2475
2475
  *
2476
- * Returns the session's OpenCode endpoint. `url` is the bare (Basic-auth protected) URL; `authedUrl` embeds the credential as an `auth_token` query param for one-call access — treat it as a secret since it is equivalent to the password. `serverPassword`/`username` are provided so callers can build their own Basic auth header instead.
2476
+ * Returns the session's OpenCode endpoint. `url` is the bare (Basic-auth protected) web-UI deep link; `authedUrl` embeds the credential as an `auth_token` query param for one-call access — treat it as a secret since it is equivalent to the password. `serverUrl` is the bare server origin — pass it to `opencode attach <serverUrl> --session <id>` (its URL arg is the SDK base, so a deep link would break). `serverPassword`/`username` are provided so callers can build their own Basic auth header instead.
2477
2477
  */
2478
2478
  export const sessionUrlOptions = (options) => queryOptions({
2479
2479
  queryFn: async ({ queryKey, signal }) => {
@@ -663,7 +663,7 @@ export declare class Session extends HeyApiClient {
663
663
  /**
664
664
  * Get the OpenCode URL for a session
665
665
  *
666
- * Returns the session's OpenCode endpoint. `url` is the bare (Basic-auth protected) URL; `authedUrl` embeds the credential as an `auth_token` query param for one-call access — treat it as a secret since it is equivalent to the password. `serverPassword`/`username` are provided so callers can build their own Basic auth header instead.
666
+ * Returns the session's OpenCode endpoint. `url` is the bare (Basic-auth protected) web-UI deep link; `authedUrl` embeds the credential as an `auth_token` query param for one-call access — treat it as a secret since it is equivalent to the password. `serverUrl` is the bare server origin — pass it to `opencode attach <serverUrl> --session <id>` (its URL arg is the SDK base, so a deep link would break). `serverPassword`/`username` are provided so callers can build their own Basic auth header instead.
667
667
  */
668
668
  url<ThrowOnError extends boolean = false>(options: Options<SessionUrlData, ThrowOnError>): import("./client").RequestResult<SessionUrlResponses, SessionUrlErrors, ThrowOnError, "fields">;
669
669
  /**
@@ -1504,7 +1504,7 @@ export class Session extends HeyApiClient {
1504
1504
  /**
1505
1505
  * Get the OpenCode URL for a session
1506
1506
  *
1507
- * Returns the session's OpenCode endpoint. `url` is the bare (Basic-auth protected) URL; `authedUrl` embeds the credential as an `auth_token` query param for one-call access — treat it as a secret since it is equivalent to the password. `serverPassword`/`username` are provided so callers can build their own Basic auth header instead.
1507
+ * Returns the session's OpenCode endpoint. `url` is the bare (Basic-auth protected) web-UI deep link; `authedUrl` embeds the credential as an `auth_token` query param for one-call access — treat it as a secret since it is equivalent to the password. `serverUrl` is the bare server origin — pass it to `opencode attach <serverUrl> --session <id>` (its URL arg is the SDK base, so a deep link would break). `serverPassword`/`username` are provided so callers can build their own Basic auth header instead.
1508
1508
  */
1509
1509
  url(options) {
1510
1510
  return (options.client ?? this.client).get({
@@ -867,6 +867,7 @@ export type SessionMessagesPage = {
867
867
  export type SessionUrlResponse = {
868
868
  url: string;
869
869
  authedUrl: string;
870
+ serverUrl: string;
870
871
  serverPassword: string;
871
872
  username: string;
872
873
  };
@@ -1395,6 +1395,7 @@ export declare const zSessionMessagesPage: z.ZodObject<{
1395
1395
  export declare const zSessionUrlResponse: z.ZodObject<{
1396
1396
  url: z.ZodString;
1397
1397
  authedUrl: z.ZodString;
1398
+ serverUrl: z.ZodString;
1398
1399
  serverPassword: z.ZodString;
1399
1400
  username: z.ZodString;
1400
1401
  }, z.core.$strip>;
@@ -10428,6 +10429,7 @@ export declare const zSessionUrlQuery: z.ZodObject<{
10428
10429
  export declare const zSessionUrlResponse2: z.ZodObject<{
10429
10430
  url: z.ZodString;
10430
10431
  authedUrl: z.ZodString;
10432
+ serverUrl: z.ZodString;
10431
10433
  serverPassword: z.ZodString;
10432
10434
  username: z.ZodString;
10433
10435
  }, z.core.$strip>;
@@ -819,6 +819,7 @@ export const zSessionMessagesPage = z.object({
819
819
  export const zSessionUrlResponse = z.object({
820
820
  url: z.string(),
821
821
  authedUrl: z.string(),
822
+ serverUrl: z.string(),
822
823
  serverPassword: z.string(),
823
824
  username: z.string(),
824
825
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renai-labs/sdk",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "TypeScript SDK for the Ren API, generated from OpenAPI.",
5
5
  "license": "MIT",
6
6
  "author": "Ren Labs, Inc.",