@slicervm/sdk 0.1.10 → 0.1.11

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/dist/index.d.cts CHANGED
@@ -870,12 +870,24 @@ declare class SecretsAPI {
870
870
  */
871
871
 
872
872
  /** Credential type for upstream injection. */
873
- type ProxySecretType = 'bearer' | 'basic' | 'oauth-client-creds';
873
+ type ProxySecretType = 'bearer' | 'basic' | 'oauth-client-creds' | 'oauth-codex' | 'oauth-claude' | 'oauth-github-copilot' | 'oauth-xai' | 'github-app-user' | 'github-app';
874
874
  declare const ProxySecretBearer: ProxySecretType;
875
875
  /** For basic auth, the secret value must be in `user:pass` form. */
876
876
  declare const ProxySecretBasic: ProxySecretType;
877
877
  /** OAuth 2.0 client credentials exchanged and renewed by the proxy host. */
878
878
  declare const ProxySecretOAuthClientCredentials: ProxySecretType;
879
+ /** Adopt and refresh a host-side Codex ChatGPT OAuth credential. */
880
+ declare const ProxySecretOAuthCodex: ProxySecretType;
881
+ /** Adopt and refresh a host-side Claude Code OAuth credential. */
882
+ declare const ProxySecretOAuthClaude: ProxySecretType;
883
+ /** Adopt and refresh a host-side GitHub Copilot OAuth credential. */
884
+ declare const ProxySecretOAuthGitHubCopilot: ProxySecretType;
885
+ /** Adopt and refresh a host-side xAI Grok OAuth credential. */
886
+ declare const ProxySecretOAuthXAI: ProxySecretType;
887
+ /** Adopt and refresh a host-side GitHub App user OAuth credential. */
888
+ declare const ProxySecretGitHubAppUser: ProxySecretType;
889
+ /** Adopt a host-side GitHub App tuple and inject installation-token Git auth. */
890
+ declare const ProxySecretGitHubApp: ProxySecretType;
879
891
  /** A registered proxy client. Tokens are never returned by list/get. */
880
892
  interface ProxyClient {
881
893
  name: string;
@@ -906,6 +918,9 @@ interface ProxySecret {
906
918
  /** Defaults to `bearer` when empty in older state files. */
907
919
  type?: ProxySecretType;
908
920
  createdAt: string;
921
+ updatedAt?: string;
922
+ adoptedAt?: string;
923
+ refreshedAt?: string;
909
924
  }
910
925
  interface CreateProxySecretRequest {
911
926
  name: string;
@@ -918,8 +933,30 @@ interface CreateProxySecretRequest {
918
933
  * inner request). For `oauth-client-creds`, pass top-level JSON containing
919
934
  * `token_endpoint`, `client_id`, and `client_secret`; optional `scope` is
920
935
  * supported. The proxy obtains, caches, and renews the bearer host-side.
936
+ * For `oauth-codex`, pass a Codex auth.json or
937
+ * minimal OAuth JSON containing access_token, refresh_token, and
938
+ * account_id. For `oauth-claude`, pass Claude Code's .credentials.json
939
+ * or minimal OAuth JSON containing accessToken and refreshToken. For
940
+ * `oauth-github-copilot`, pass opencode auth.json or minimal OAuth JSON
941
+ * containing a GitHub Copilot gho_* or ghu_* token. For `oauth-xai`, pass JSON
942
+ * emitted by `slicer proxy oauth xai`, or equivalent top-level JSON
943
+ * containing access_token and refresh_token. For `github-app-user`, pass
944
+ * JSON emitted by `slicer proxy oauth github-app-user`, or equivalent
945
+ * top-level JSON containing access_token. The proxy stores and refreshes
946
+ * OAuth credentials host-side. For `github-app`, pass top-level JSON
947
+ * containing app_id and either private_key_file or private_key. With
948
+ * private_key_file, the proxy keeps the PEM file on the host; with
949
+ * private_key, the PEM is stored in proxy state. The proxy mints GitHub App
950
+ * installation tokens in memory and injects Git HTTPS Basic auth for
951
+ * github.com clone/fetch requests.
921
952
  */
922
953
  value: string;
954
+ /**
955
+ * Overwrite an existing secret with the same name. Useful after the
956
+ * host-side OAuth login has been refreshed manually and the proxy
957
+ * should re-adopt the credential without rewriting allow rules.
958
+ */
959
+ force?: boolean;
923
960
  }
924
961
  /**
925
962
  * Per-client allow entry. First-match-wins by declaration order.
@@ -928,6 +965,8 @@ interface CreateProxySecretRequest {
928
965
  * on the inner request and substitutes the secret's value.
929
966
  * - `methods`/`paths` are optional filters (any-of within each list,
930
967
  * all-of across lists). Empty list = any.
968
+ * - `ports` is optional. Empty means the default web ports 80 and 443
969
+ * for backwards compatibility with older host-only rules.
931
970
  * - When `passthrough` is true, the proxy splices TCP both ways at
932
971
  * CONNECT without terminating TLS. Cert-pinned clients work
933
972
  * unchanged. Mutually exclusive with `secret`, `methods`, `paths`;
@@ -938,6 +977,7 @@ interface ProxyAllowRule {
938
977
  secret?: string;
939
978
  methods?: string[];
940
979
  paths?: string[];
980
+ ports?: number[];
941
981
  /** RFC 3339 timestamp; absent / zero-value when no expiry. */
942
982
  expires?: string;
943
983
  passthrough?: boolean;
@@ -949,6 +989,7 @@ interface AddProxyAllowRequest {
949
989
  secret?: string;
950
990
  methods?: string[];
951
991
  paths?: string[];
992
+ ports?: number[];
952
993
  /**
953
994
  * Time-to-live in seconds. 0 / omitted = never expires. Resolved to
954
995
  * an absolute `expires` timestamp on the returned rule.
@@ -960,7 +1001,7 @@ interface AddProxyAllowRequest {
960
1001
  /**
961
1002
  * Input to `allows.removeByTuple`. Mirrors the create payload minus
962
1003
  * `ttlSeconds` (TTL is mutable lifetime, not part of identity). The
963
- * proxy matches the rule by (host, methods, paths, passthrough) and
1004
+ * proxy matches the rule by (host, methods, paths, ports, passthrough) and
964
1005
  * removes the single matching rule. Use when several rules share a
965
1006
  * host and you want surgical removal of one — pass exactly the same
966
1007
  * fields you used at create time.
@@ -971,6 +1012,7 @@ interface RemoveProxyAllowByTupleRequest {
971
1012
  secret?: string;
972
1013
  methods?: string[];
973
1014
  paths?: string[];
1015
+ ports?: number[];
974
1016
  passthrough?: boolean;
975
1017
  }
976
1018
  declare class ProxyAPI {
@@ -1019,7 +1061,7 @@ declare class ProxyAllowsAPI {
1019
1061
  remove(client: string, host: string): Promise<void>;
1020
1062
  /**
1021
1063
  * Surgical revoke: removes the single rule whose
1022
- * (host, methods, paths, passthrough) tuple matches the request.
1064
+ * (host, methods, paths, ports, passthrough) tuple matches the request.
1023
1065
  * Pass exactly the same fields you used at create time. Method and
1024
1066
  * host casing are normalised server-side, so `"GET"` / `"get"` and
1025
1067
  * `"github.com"` / `"GITHUB.COM"` all match the same stored rule.
@@ -1125,4 +1167,4 @@ declare class SlicerShellSession {
1125
1167
  private teardown;
1126
1168
  }
1127
1169
 
1128
- export { type AddProxyAllowRequest, type AddressMapping, type AgentHealth, type BgDeleteResponse, type BgExecInfo, type BgExecRequest, type BgExecResponse, type BgKillOptions, type BgKillResponse, type BgLogOptions, type BgWaitExitResponse, CommitsAPI, CommittedVM, type CreateProxyClientOptions, type CreateProxySecretRequest, type CreateSecretRequest, type CreateVMNetworkPolicy, type CreateVMOptions, type CreateVMRequest, type CreateVMResponse, type DeleteResponse, type ExecFrame, type ExecRequest, type ExecResult, type ExecResultBinary, type ExecStdio, ExecStdioBase64, ExecStdioText, FRAME_TYPE_DATA, FRAME_TYPE_HEARTBEAT, FRAME_TYPE_SESSION_CLOSE, FRAME_TYPE_SHUTDOWN, FRAME_TYPE_WINDOW_SIZE, type FSEntry, type FSMkdirRequest, type FSWatchEvent, type FSWatchEventType, type FSWatchRequest, Forwarder, type ForwarderListener, type ForwarderOptions, GiB, type HostGroup, HostGroupsAPI, type ListOptions, MiB, NonRootUser, ProxyAPI, type ProxyAllowRule, ProxyAllowsAPI, type ProxyClient, type ProxyClientCreated, ProxyClientsAPI, type ProxySecret, ProxySecretBasic, ProxySecretBearer, ProxySecretOAuthClientCredentials, type ProxySecretType, ProxySecretsAPI, type RemoveProxyAllowByTupleRequest, type Secret, SecretExistsError, SecretsAPI, type ShellSessionOptions, type ShutdownRequest, SlicerAPIError, SlicerClient, type SlicerClientOptions, type SlicerInfo, SlicerShellSession, type UpdateSecretRequest, VM, VMBg, type VMCommitDeleteResponse, type VMCommitInfo, type VMCommitListOptions, type VMCommitOptions, type VMCommitResponse, type VMDescription, VMFileSystem, type VMForkFixup, type VMForkNetworkPolicy, type VMForkOptions, type VMForkResponse, type VMForkTagMode, type VMForkWait, type VMInfo, type VMInit, type VMLogs, type VMNetworkDescription, type VMNetworkPolicy, type VMSnapshot, type VMStat, type VMTagResponse, type VMTagUpdate, VMsAPI, type WaitOptions, type XTermLike, encodeFrame, parseAddressMapping, parseFrame, resolveTransport };
1170
+ export { type AddProxyAllowRequest, type AddressMapping, type AgentHealth, type BgDeleteResponse, type BgExecInfo, type BgExecRequest, type BgExecResponse, type BgKillOptions, type BgKillResponse, type BgLogOptions, type BgWaitExitResponse, CommitsAPI, CommittedVM, type CreateProxyClientOptions, type CreateProxySecretRequest, type CreateSecretRequest, type CreateVMNetworkPolicy, type CreateVMOptions, type CreateVMRequest, type CreateVMResponse, type DeleteResponse, type ExecFrame, type ExecRequest, type ExecResult, type ExecResultBinary, type ExecStdio, ExecStdioBase64, ExecStdioText, FRAME_TYPE_DATA, FRAME_TYPE_HEARTBEAT, FRAME_TYPE_SESSION_CLOSE, FRAME_TYPE_SHUTDOWN, FRAME_TYPE_WINDOW_SIZE, type FSEntry, type FSMkdirRequest, type FSWatchEvent, type FSWatchEventType, type FSWatchRequest, Forwarder, type ForwarderListener, type ForwarderOptions, GiB, type HostGroup, HostGroupsAPI, type ListOptions, MiB, NonRootUser, ProxyAPI, type ProxyAllowRule, ProxyAllowsAPI, type ProxyClient, type ProxyClientCreated, ProxyClientsAPI, type ProxySecret, ProxySecretBasic, ProxySecretBearer, ProxySecretGitHubApp, ProxySecretGitHubAppUser, ProxySecretOAuthClaude, ProxySecretOAuthClientCredentials, ProxySecretOAuthCodex, ProxySecretOAuthGitHubCopilot, ProxySecretOAuthXAI, type ProxySecretType, ProxySecretsAPI, type RemoveProxyAllowByTupleRequest, type Secret, SecretExistsError, SecretsAPI, type ShellSessionOptions, type ShutdownRequest, SlicerAPIError, SlicerClient, type SlicerClientOptions, type SlicerInfo, SlicerShellSession, type UpdateSecretRequest, VM, VMBg, type VMCommitDeleteResponse, type VMCommitInfo, type VMCommitListOptions, type VMCommitOptions, type VMCommitResponse, type VMDescription, VMFileSystem, type VMForkFixup, type VMForkNetworkPolicy, type VMForkOptions, type VMForkResponse, type VMForkTagMode, type VMForkWait, type VMInfo, type VMInit, type VMLogs, type VMNetworkDescription, type VMNetworkPolicy, type VMSnapshot, type VMStat, type VMTagResponse, type VMTagUpdate, VMsAPI, type WaitOptions, type XTermLike, encodeFrame, parseAddressMapping, parseFrame, resolveTransport };
package/dist/index.d.ts CHANGED
@@ -870,12 +870,24 @@ declare class SecretsAPI {
870
870
  */
871
871
 
872
872
  /** Credential type for upstream injection. */
873
- type ProxySecretType = 'bearer' | 'basic' | 'oauth-client-creds';
873
+ type ProxySecretType = 'bearer' | 'basic' | 'oauth-client-creds' | 'oauth-codex' | 'oauth-claude' | 'oauth-github-copilot' | 'oauth-xai' | 'github-app-user' | 'github-app';
874
874
  declare const ProxySecretBearer: ProxySecretType;
875
875
  /** For basic auth, the secret value must be in `user:pass` form. */
876
876
  declare const ProxySecretBasic: ProxySecretType;
877
877
  /** OAuth 2.0 client credentials exchanged and renewed by the proxy host. */
878
878
  declare const ProxySecretOAuthClientCredentials: ProxySecretType;
879
+ /** Adopt and refresh a host-side Codex ChatGPT OAuth credential. */
880
+ declare const ProxySecretOAuthCodex: ProxySecretType;
881
+ /** Adopt and refresh a host-side Claude Code OAuth credential. */
882
+ declare const ProxySecretOAuthClaude: ProxySecretType;
883
+ /** Adopt and refresh a host-side GitHub Copilot OAuth credential. */
884
+ declare const ProxySecretOAuthGitHubCopilot: ProxySecretType;
885
+ /** Adopt and refresh a host-side xAI Grok OAuth credential. */
886
+ declare const ProxySecretOAuthXAI: ProxySecretType;
887
+ /** Adopt and refresh a host-side GitHub App user OAuth credential. */
888
+ declare const ProxySecretGitHubAppUser: ProxySecretType;
889
+ /** Adopt a host-side GitHub App tuple and inject installation-token Git auth. */
890
+ declare const ProxySecretGitHubApp: ProxySecretType;
879
891
  /** A registered proxy client. Tokens are never returned by list/get. */
880
892
  interface ProxyClient {
881
893
  name: string;
@@ -906,6 +918,9 @@ interface ProxySecret {
906
918
  /** Defaults to `bearer` when empty in older state files. */
907
919
  type?: ProxySecretType;
908
920
  createdAt: string;
921
+ updatedAt?: string;
922
+ adoptedAt?: string;
923
+ refreshedAt?: string;
909
924
  }
910
925
  interface CreateProxySecretRequest {
911
926
  name: string;
@@ -918,8 +933,30 @@ interface CreateProxySecretRequest {
918
933
  * inner request). For `oauth-client-creds`, pass top-level JSON containing
919
934
  * `token_endpoint`, `client_id`, and `client_secret`; optional `scope` is
920
935
  * supported. The proxy obtains, caches, and renews the bearer host-side.
936
+ * For `oauth-codex`, pass a Codex auth.json or
937
+ * minimal OAuth JSON containing access_token, refresh_token, and
938
+ * account_id. For `oauth-claude`, pass Claude Code's .credentials.json
939
+ * or minimal OAuth JSON containing accessToken and refreshToken. For
940
+ * `oauth-github-copilot`, pass opencode auth.json or minimal OAuth JSON
941
+ * containing a GitHub Copilot gho_* or ghu_* token. For `oauth-xai`, pass JSON
942
+ * emitted by `slicer proxy oauth xai`, or equivalent top-level JSON
943
+ * containing access_token and refresh_token. For `github-app-user`, pass
944
+ * JSON emitted by `slicer proxy oauth github-app-user`, or equivalent
945
+ * top-level JSON containing access_token. The proxy stores and refreshes
946
+ * OAuth credentials host-side. For `github-app`, pass top-level JSON
947
+ * containing app_id and either private_key_file or private_key. With
948
+ * private_key_file, the proxy keeps the PEM file on the host; with
949
+ * private_key, the PEM is stored in proxy state. The proxy mints GitHub App
950
+ * installation tokens in memory and injects Git HTTPS Basic auth for
951
+ * github.com clone/fetch requests.
921
952
  */
922
953
  value: string;
954
+ /**
955
+ * Overwrite an existing secret with the same name. Useful after the
956
+ * host-side OAuth login has been refreshed manually and the proxy
957
+ * should re-adopt the credential without rewriting allow rules.
958
+ */
959
+ force?: boolean;
923
960
  }
924
961
  /**
925
962
  * Per-client allow entry. First-match-wins by declaration order.
@@ -928,6 +965,8 @@ interface CreateProxySecretRequest {
928
965
  * on the inner request and substitutes the secret's value.
929
966
  * - `methods`/`paths` are optional filters (any-of within each list,
930
967
  * all-of across lists). Empty list = any.
968
+ * - `ports` is optional. Empty means the default web ports 80 and 443
969
+ * for backwards compatibility with older host-only rules.
931
970
  * - When `passthrough` is true, the proxy splices TCP both ways at
932
971
  * CONNECT without terminating TLS. Cert-pinned clients work
933
972
  * unchanged. Mutually exclusive with `secret`, `methods`, `paths`;
@@ -938,6 +977,7 @@ interface ProxyAllowRule {
938
977
  secret?: string;
939
978
  methods?: string[];
940
979
  paths?: string[];
980
+ ports?: number[];
941
981
  /** RFC 3339 timestamp; absent / zero-value when no expiry. */
942
982
  expires?: string;
943
983
  passthrough?: boolean;
@@ -949,6 +989,7 @@ interface AddProxyAllowRequest {
949
989
  secret?: string;
950
990
  methods?: string[];
951
991
  paths?: string[];
992
+ ports?: number[];
952
993
  /**
953
994
  * Time-to-live in seconds. 0 / omitted = never expires. Resolved to
954
995
  * an absolute `expires` timestamp on the returned rule.
@@ -960,7 +1001,7 @@ interface AddProxyAllowRequest {
960
1001
  /**
961
1002
  * Input to `allows.removeByTuple`. Mirrors the create payload minus
962
1003
  * `ttlSeconds` (TTL is mutable lifetime, not part of identity). The
963
- * proxy matches the rule by (host, methods, paths, passthrough) and
1004
+ * proxy matches the rule by (host, methods, paths, ports, passthrough) and
964
1005
  * removes the single matching rule. Use when several rules share a
965
1006
  * host and you want surgical removal of one — pass exactly the same
966
1007
  * fields you used at create time.
@@ -971,6 +1012,7 @@ interface RemoveProxyAllowByTupleRequest {
971
1012
  secret?: string;
972
1013
  methods?: string[];
973
1014
  paths?: string[];
1015
+ ports?: number[];
974
1016
  passthrough?: boolean;
975
1017
  }
976
1018
  declare class ProxyAPI {
@@ -1019,7 +1061,7 @@ declare class ProxyAllowsAPI {
1019
1061
  remove(client: string, host: string): Promise<void>;
1020
1062
  /**
1021
1063
  * Surgical revoke: removes the single rule whose
1022
- * (host, methods, paths, passthrough) tuple matches the request.
1064
+ * (host, methods, paths, ports, passthrough) tuple matches the request.
1023
1065
  * Pass exactly the same fields you used at create time. Method and
1024
1066
  * host casing are normalised server-side, so `"GET"` / `"get"` and
1025
1067
  * `"github.com"` / `"GITHUB.COM"` all match the same stored rule.
@@ -1125,4 +1167,4 @@ declare class SlicerShellSession {
1125
1167
  private teardown;
1126
1168
  }
1127
1169
 
1128
- export { type AddProxyAllowRequest, type AddressMapping, type AgentHealth, type BgDeleteResponse, type BgExecInfo, type BgExecRequest, type BgExecResponse, type BgKillOptions, type BgKillResponse, type BgLogOptions, type BgWaitExitResponse, CommitsAPI, CommittedVM, type CreateProxyClientOptions, type CreateProxySecretRequest, type CreateSecretRequest, type CreateVMNetworkPolicy, type CreateVMOptions, type CreateVMRequest, type CreateVMResponse, type DeleteResponse, type ExecFrame, type ExecRequest, type ExecResult, type ExecResultBinary, type ExecStdio, ExecStdioBase64, ExecStdioText, FRAME_TYPE_DATA, FRAME_TYPE_HEARTBEAT, FRAME_TYPE_SESSION_CLOSE, FRAME_TYPE_SHUTDOWN, FRAME_TYPE_WINDOW_SIZE, type FSEntry, type FSMkdirRequest, type FSWatchEvent, type FSWatchEventType, type FSWatchRequest, Forwarder, type ForwarderListener, type ForwarderOptions, GiB, type HostGroup, HostGroupsAPI, type ListOptions, MiB, NonRootUser, ProxyAPI, type ProxyAllowRule, ProxyAllowsAPI, type ProxyClient, type ProxyClientCreated, ProxyClientsAPI, type ProxySecret, ProxySecretBasic, ProxySecretBearer, ProxySecretOAuthClientCredentials, type ProxySecretType, ProxySecretsAPI, type RemoveProxyAllowByTupleRequest, type Secret, SecretExistsError, SecretsAPI, type ShellSessionOptions, type ShutdownRequest, SlicerAPIError, SlicerClient, type SlicerClientOptions, type SlicerInfo, SlicerShellSession, type UpdateSecretRequest, VM, VMBg, type VMCommitDeleteResponse, type VMCommitInfo, type VMCommitListOptions, type VMCommitOptions, type VMCommitResponse, type VMDescription, VMFileSystem, type VMForkFixup, type VMForkNetworkPolicy, type VMForkOptions, type VMForkResponse, type VMForkTagMode, type VMForkWait, type VMInfo, type VMInit, type VMLogs, type VMNetworkDescription, type VMNetworkPolicy, type VMSnapshot, type VMStat, type VMTagResponse, type VMTagUpdate, VMsAPI, type WaitOptions, type XTermLike, encodeFrame, parseAddressMapping, parseFrame, resolveTransport };
1170
+ export { type AddProxyAllowRequest, type AddressMapping, type AgentHealth, type BgDeleteResponse, type BgExecInfo, type BgExecRequest, type BgExecResponse, type BgKillOptions, type BgKillResponse, type BgLogOptions, type BgWaitExitResponse, CommitsAPI, CommittedVM, type CreateProxyClientOptions, type CreateProxySecretRequest, type CreateSecretRequest, type CreateVMNetworkPolicy, type CreateVMOptions, type CreateVMRequest, type CreateVMResponse, type DeleteResponse, type ExecFrame, type ExecRequest, type ExecResult, type ExecResultBinary, type ExecStdio, ExecStdioBase64, ExecStdioText, FRAME_TYPE_DATA, FRAME_TYPE_HEARTBEAT, FRAME_TYPE_SESSION_CLOSE, FRAME_TYPE_SHUTDOWN, FRAME_TYPE_WINDOW_SIZE, type FSEntry, type FSMkdirRequest, type FSWatchEvent, type FSWatchEventType, type FSWatchRequest, Forwarder, type ForwarderListener, type ForwarderOptions, GiB, type HostGroup, HostGroupsAPI, type ListOptions, MiB, NonRootUser, ProxyAPI, type ProxyAllowRule, ProxyAllowsAPI, type ProxyClient, type ProxyClientCreated, ProxyClientsAPI, type ProxySecret, ProxySecretBasic, ProxySecretBearer, ProxySecretGitHubApp, ProxySecretGitHubAppUser, ProxySecretOAuthClaude, ProxySecretOAuthClientCredentials, ProxySecretOAuthCodex, ProxySecretOAuthGitHubCopilot, ProxySecretOAuthXAI, type ProxySecretType, ProxySecretsAPI, type RemoveProxyAllowByTupleRequest, type Secret, SecretExistsError, SecretsAPI, type ShellSessionOptions, type ShutdownRequest, SlicerAPIError, SlicerClient, type SlicerClientOptions, type SlicerInfo, SlicerShellSession, type UpdateSecretRequest, VM, VMBg, type VMCommitDeleteResponse, type VMCommitInfo, type VMCommitListOptions, type VMCommitOptions, type VMCommitResponse, type VMDescription, VMFileSystem, type VMForkFixup, type VMForkNetworkPolicy, type VMForkOptions, type VMForkResponse, type VMForkTagMode, type VMForkWait, type VMInfo, type VMInit, type VMLogs, type VMNetworkDescription, type VMNetworkPolicy, type VMSnapshot, type VMStat, type VMTagResponse, type VMTagUpdate, VMsAPI, type WaitOptions, type XTermLike, encodeFrame, parseAddressMapping, parseFrame, resolveTransport };
package/dist/index.js CHANGED
@@ -1515,6 +1515,12 @@ function validateCommitId2(commitId) {
1515
1515
  var ProxySecretBearer = "bearer";
1516
1516
  var ProxySecretBasic = "basic";
1517
1517
  var ProxySecretOAuthClientCredentials = "oauth-client-creds";
1518
+ var ProxySecretOAuthCodex = "oauth-codex";
1519
+ var ProxySecretOAuthClaude = "oauth-claude";
1520
+ var ProxySecretOAuthGitHubCopilot = "oauth-github-copilot";
1521
+ var ProxySecretOAuthXAI = "oauth-xai";
1522
+ var ProxySecretGitHubAppUser = "github-app-user";
1523
+ var ProxySecretGitHubApp = "github-app";
1518
1524
  function clientFromWire(w) {
1519
1525
  return { name: w.name, createdAt: w.created_at };
1520
1526
  }
@@ -1524,6 +1530,9 @@ function clientCreatedFromWire(w) {
1524
1530
  function secretFromWire2(w) {
1525
1531
  const out = { name: w.name, host: w.host, createdAt: w.created_at };
1526
1532
  if (w.type) out.type = w.type;
1533
+ if (w.updated_at && w.updated_at !== "0001-01-01T00:00:00Z") out.updatedAt = w.updated_at;
1534
+ if (w.adopted_at && w.adopted_at !== "0001-01-01T00:00:00Z") out.adoptedAt = w.adopted_at;
1535
+ if (w.refreshed_at && w.refreshed_at !== "0001-01-01T00:00:00Z") out.refreshedAt = w.refreshed_at;
1527
1536
  return out;
1528
1537
  }
1529
1538
  function ruleFromWire(w) {
@@ -1531,6 +1540,7 @@ function ruleFromWire(w) {
1531
1540
  if (w.secret) out.secret = w.secret;
1532
1541
  if (w.methods && w.methods.length > 0) out.methods = w.methods;
1533
1542
  if (w.paths && w.paths.length > 0) out.paths = w.paths;
1543
+ if (w.ports && w.ports.length > 0) out.ports = w.ports;
1534
1544
  if (w.expires && w.expires !== "0001-01-01T00:00:00Z") out.expires = w.expires;
1535
1545
  if (w.passthrough) out.passthrough = w.passthrough;
1536
1546
  return out;
@@ -1595,6 +1605,7 @@ var ProxySecretsAPI = class {
1595
1605
  value: req.value
1596
1606
  };
1597
1607
  if (req.type) body.type = req.type;
1608
+ if (req.force) body.force = true;
1598
1609
  await this.transport.request("POST", "/proxy/v1/secrets", body);
1599
1610
  }
1600
1611
  async list() {
@@ -1623,6 +1634,7 @@ var ProxyAllowsAPI = class {
1623
1634
  if (req.secret) body.secret = req.secret;
1624
1635
  if (req.methods && req.methods.length > 0) body.methods = req.methods;
1625
1636
  if (req.paths && req.paths.length > 0) body.paths = req.paths;
1637
+ if (req.ports && req.ports.length > 0) body.ports = req.ports;
1626
1638
  if (req.ttlSeconds && req.ttlSeconds > 0) body.ttl_seconds = req.ttlSeconds;
1627
1639
  if (req.passthrough) body.passthrough = true;
1628
1640
  const wire = await this.transport.request(
@@ -1646,7 +1658,7 @@ var ProxyAllowsAPI = class {
1646
1658
  }
1647
1659
  /**
1648
1660
  * Surgical revoke: removes the single rule whose
1649
- * (host, methods, paths, passthrough) tuple matches the request.
1661
+ * (host, methods, paths, ports, passthrough) tuple matches the request.
1650
1662
  * Pass exactly the same fields you used at create time. Method and
1651
1663
  * host casing are normalised server-side, so `"GET"` / `"get"` and
1652
1664
  * `"github.com"` / `"GITHUB.COM"` all match the same stored rule.
@@ -1661,6 +1673,7 @@ var ProxyAllowsAPI = class {
1661
1673
  if (req.secret) body.secret = req.secret;
1662
1674
  if (req.methods && req.methods.length > 0) body.methods = req.methods;
1663
1675
  if (req.paths && req.paths.length > 0) body.paths = req.paths;
1676
+ if (req.ports && req.ports.length > 0) body.ports = req.ports;
1664
1677
  if (req.passthrough) body.passthrough = true;
1665
1678
  await this.transport.request("POST", "/proxy/v1/allows/revoke", body);
1666
1679
  }
@@ -1837,6 +1850,6 @@ var SlicerShellSession = class {
1837
1850
  }
1838
1851
  };
1839
1852
 
1840
- export { CommitsAPI, CommittedVM, ExecStdioBase64, ExecStdioText, FRAME_TYPE_DATA, FRAME_TYPE_HEARTBEAT, FRAME_TYPE_SESSION_CLOSE, FRAME_TYPE_SHUTDOWN, FRAME_TYPE_WINDOW_SIZE, Forwarder, GiB, HostGroupsAPI, MiB, NonRootUser, ProxyAPI, ProxyAllowsAPI, ProxyClientsAPI, ProxySecretBasic, ProxySecretBearer, ProxySecretOAuthClientCredentials, ProxySecretsAPI, SecretExistsError, SecretsAPI, SlicerAPIError, SlicerClient, SlicerShellSession, VM, VMBg, VMFileSystem, VMsAPI, encodeFrame, parseAddressMapping, parseFrame, resolveTransport };
1853
+ export { CommitsAPI, CommittedVM, ExecStdioBase64, ExecStdioText, FRAME_TYPE_DATA, FRAME_TYPE_HEARTBEAT, FRAME_TYPE_SESSION_CLOSE, FRAME_TYPE_SHUTDOWN, FRAME_TYPE_WINDOW_SIZE, Forwarder, GiB, HostGroupsAPI, MiB, NonRootUser, ProxyAPI, ProxyAllowsAPI, ProxyClientsAPI, ProxySecretBasic, ProxySecretBearer, ProxySecretGitHubApp, ProxySecretGitHubAppUser, ProxySecretOAuthClaude, ProxySecretOAuthClientCredentials, ProxySecretOAuthCodex, ProxySecretOAuthGitHubCopilot, ProxySecretOAuthXAI, ProxySecretsAPI, SecretExistsError, SecretsAPI, SlicerAPIError, SlicerClient, SlicerShellSession, VM, VMBg, VMFileSystem, VMsAPI, encodeFrame, parseAddressMapping, parseFrame, resolveTransport };
1841
1854
  //# sourceMappingURL=index.js.map
1842
1855
  //# sourceMappingURL=index.js.map