@openkaiden/opnshll-sdk 0.1.3 → 0.1.5

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,7 +1,7 @@
1
1
  import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
2
  import type { ObjectMeta, Provider, Workspace, WorkspaceSelector } from "./datamodel_pb.js";
3
3
  import type { Duration, Timestamp } from "@bufbuild/protobuf/wkt";
4
- import type { GetGatewayConfigRequestSchema, GetGatewayConfigResponseSchema, GetSandboxConfigRequestSchema, GetSandboxConfigResponseSchema, L7DenyRule, L7Rule, NetworkBinary, NetworkEndpoint, NetworkPolicyRule, PolicySource, SandboxPolicy, SettingValue } from "./sandbox_pb.js";
4
+ import type { GetGatewayConfigRequestSchema, GetGatewayConfigResponseSchema, GetSandboxConfigRequestSchema, GetSandboxConfigResponseSchema, L7DenyRule, L7Rule, NetworkBinary, NetworkEndpoint, NetworkPolicyRule, PolicySource, SandboxConfigSnapshot, SandboxPolicy, SettingValue } from "./sandbox_pb.js";
5
5
  import type { JsonObject, Message } from "@bufbuild/protobuf";
6
6
  /**
7
7
  * Describes the file openshell.proto.
@@ -967,6 +967,14 @@ export type SandboxStatus = Message<"openshell.v1.SandboxStatus"> & {
967
967
  * @generated from field: google.protobuf.Timestamp main_process_started_time = 16;
968
968
  */
969
969
  mainProcessStartedTime?: Timestamp | undefined;
970
+ /**
971
+ * Latest refused token grant across all outbound HTTP protocols, including
972
+ * failures before a configured endpoint or credential could be selected.
973
+ * Matching grant success or a policy, provider, or supervisor reset clears it.
974
+ *
975
+ * @generated from field: openshell.v1.TokenGrantFailureObservation last_token_grant_failure = 17;
976
+ */
977
+ lastTokenGrantFailure?: TokenGrantFailureObservation | undefined;
970
978
  };
971
979
  /**
972
980
  * Describes the message openshell.v1.SandboxStatus.
@@ -1096,7 +1104,8 @@ export type CreateSandboxRequest = Message<"openshell.v1.CreateSandboxRequest">
1096
1104
  [key: string]: string;
1097
1105
  };
1098
1106
  /**
1099
- * Optional annotations for the sandbox (non-selector metadata).
1107
+ * Optional annotations for the sandbox (non-selector metadata). Keys under
1108
+ * the `internal.openshell.ai/` prefix are reserved for the gateway.
1100
1109
  *
1101
1110
  * @generated from field: map<string, string> annotations = 4;
1102
1111
  */
@@ -3283,6 +3292,83 @@ export type GetProviderRequest = Message<"openshell.v1.GetProviderRequest"> & {
3283
3292
  * Use `create(GetProviderRequestSchema)` to create a new message.
3284
3293
  */
3285
3294
  export declare const GetProviderRequestSchema: GenMessage<GetProviderRequest>;
3295
+ /**
3296
+ * Retrieve selected runtime credentials from one provider in one workspace.
3297
+ * Refresh side effects can persist even when the complete request fails.
3298
+ *
3299
+ * @generated from message openshell.v1.GetProviderCredentialsRequest
3300
+ */
3301
+ export type GetProviderCredentialsRequest = Message<"openshell.v1.GetProviderCredentialsRequest"> & {
3302
+ /**
3303
+ * Required named workspace selection; all_workspaces is not accepted.
3304
+ *
3305
+ * @generated from field: openshell.datamodel.v1.WorkspaceSelector workspace_scope = 1;
3306
+ */
3307
+ workspaceScope?: WorkspaceSelector | undefined;
3308
+ /**
3309
+ * Provider canonical name.
3310
+ *
3311
+ * @generated from field: string name = 2;
3312
+ */
3313
+ name: string;
3314
+ /**
3315
+ * Nonempty selection of runtime environment keys (maximum 32).
3316
+ *
3317
+ * @generated from field: repeated string credential_keys = 3;
3318
+ */
3319
+ credentialKeys: string[];
3320
+ /**
3321
+ * Omitted/zero uses a five-minute safety margin. Maximum is 24 hours.
3322
+ *
3323
+ * @generated from field: google.protobuf.Duration minimum_remaining_lifetime = 4;
3324
+ */
3325
+ minimumRemainingLifetime?: Duration | undefined;
3326
+ };
3327
+ /**
3328
+ * Describes the message openshell.v1.GetProviderCredentialsRequest.
3329
+ * Use `create(GetProviderCredentialsRequestSchema)` to create a new message.
3330
+ */
3331
+ export declare const GetProviderCredentialsRequestSchema: GenMessage<GetProviderCredentialsRequest>;
3332
+ /**
3333
+ * Usable runtime value, never gateway-only minting material.
3334
+ *
3335
+ * @generated from message openshell.v1.ProviderCredentialValue
3336
+ */
3337
+ export type ProviderCredentialValue = Message<"openshell.v1.ProviderCredentialValue"> & {
3338
+ /**
3339
+ * @generated from field: string value = 1;
3340
+ */
3341
+ value: string;
3342
+ /**
3343
+ * Absent for credentials with no declared expiration.
3344
+ *
3345
+ * @generated from field: google.protobuf.Timestamp expiration_time = 2;
3346
+ */
3347
+ expirationTime?: Timestamp | undefined;
3348
+ };
3349
+ /**
3350
+ * Describes the message openshell.v1.ProviderCredentialValue.
3351
+ * Use `create(ProviderCredentialValueSchema)` to create a new message.
3352
+ */
3353
+ export declare const ProviderCredentialValueSchema: GenMessage<ProviderCredentialValue>;
3354
+ /**
3355
+ * @generated from message openshell.v1.GetProviderCredentialsResponse
3356
+ */
3357
+ export type GetProviderCredentialsResponse = Message<"openshell.v1.GetProviderCredentialsResponse"> & {
3358
+ /**
3359
+ * All requested values or an error; no partial response.
3360
+ *
3361
+ * @generated from field: map<string, openshell.v1.ProviderCredentialValue> credentials = 1;
3362
+ */
3363
+ credentials: {
3364
+ [key: string]: ProviderCredentialValue;
3365
+ };
3366
+ };
3367
+ /**
3368
+ * Describes the message openshell.v1.GetProviderCredentialsResponse.
3369
+ * Use `create(GetProviderCredentialsResponseSchema)` to create a new message.
3370
+ */
3371
+ export declare const GetProviderCredentialsResponseSchema: GenMessage<GetProviderCredentialsResponse>;
3286
3372
  /**
3287
3373
  * List providers request.
3288
3374
  *
@@ -3309,6 +3395,12 @@ export type ListProvidersRequest = Message<"openshell.v1.ListProvidersRequest">
3309
3395
  * @generated from field: string page_token = 2;
3310
3396
  */
3311
3397
  pageToken: string;
3398
+ /**
3399
+ * Optional label selector for filtering (format: "key1=value1,key2=value2").
3400
+ *
3401
+ * @generated from field: string label_selector = 4;
3402
+ */
3403
+ labelSelector: string;
3312
3404
  };
3313
3405
  /**
3314
3406
  * Describes the message openshell.v1.ListProvidersRequest.
@@ -3752,6 +3844,16 @@ export type ProviderProfileCredential = Message<"openshell.v1.ProviderProfileCre
3752
3844
  * @generated from field: repeated string token_grant_owners = 11;
3753
3845
  */
3754
3846
  tokenGrantOwners: string[];
3847
+ /**
3848
+ * Opt in to an opaque identity-bound environment placeholder for every env
3849
+ * var declared by this credential. Use this only when an external credential
3850
+ * updater requires one placeholder across value-only provider revisions.
3851
+ * Gateway-managed refresh and token-grant credentials cannot opt in because
3852
+ * they require identity-bearing handles for authorization-epoch revocation.
3853
+ *
3854
+ * @generated from field: bool stable_placeholder = 12;
3855
+ */
3856
+ stablePlaceholder: boolean;
3755
3857
  };
3756
3858
  /**
3757
3859
  * Describes the message openshell.v1.ProviderProfileCredential.
@@ -4449,6 +4551,13 @@ export type LintProviderProfilesResponse = Message<"openshell.v1.LintProviderPro
4449
4551
  * @generated from field: bool valid = 2;
4450
4552
  */
4451
4553
  valid: boolean;
4554
+ /**
4555
+ * Clients enabling stable_placeholder check this before import or update,
4556
+ * since older gateways silently discard unknown credential fields.
4557
+ *
4558
+ * @generated from field: bool supports_stable_placeholder = 3;
4559
+ */
4560
+ supportsStablePlaceholder: boolean;
4452
4561
  };
4453
4562
  /**
4454
4563
  * Describes the message openshell.v1.LintProviderProfilesResponse.
@@ -4540,6 +4649,14 @@ export type GetSandboxProviderEnvironmentRequest = Message<"openshell.v1.GetSand
4540
4649
  * @generated from field: bool supports_static_credential_bindings = 2;
4541
4650
  */
4542
4651
  supportsStaticCredentialBindings: boolean;
4652
+ /**
4653
+ * Whether the requesting supervisor understands stable external-placeholder
4654
+ * metadata. Gateways withhold credentials that require this behavior when
4655
+ * the capability is absent.
4656
+ *
4657
+ * @generated from field: bool supports_stable_placeholder_environment_keys = 3;
4658
+ */
4659
+ supportsStablePlaceholderEnvironmentKeys: boolean;
4543
4660
  };
4544
4661
  /**
4545
4662
  * Describes the message openshell.v1.GetSandboxProviderEnvironmentRequest.
@@ -4589,11 +4706,11 @@ export type StaticCredentialBinding = Message<"openshell.v1.StaticCredentialBind
4589
4706
  */
4590
4707
  credentialIdentity: string;
4591
4708
  /**
4592
- * Opaque gateway-issued handle for a refresh-managed credential identity
4593
- * epoch. When non-empty, supervisors keep the workload placeholder stable
4594
- * across access-token rotations and replace only the resolver value. The
4595
- * handle changes when the sandbox, provider, credential key, refresh
4596
- * authorization epoch, or endpoint authorization boundary changes.
4709
+ * Opaque gateway-issued handle for a stable credential lifecycle. When
4710
+ * non-empty, supervisors keep the workload placeholder stable across value
4711
+ * updates and replace only the resolver value. The handle changes when the
4712
+ * sandbox, provider, credential key, endpoint authorization, or an applicable
4713
+ * refresh authorization epoch changes.
4597
4714
  *
4598
4715
  * @generated from field: string workload_credential_handle = 3;
4599
4716
  */
@@ -4605,7 +4722,9 @@ export type StaticCredentialBinding = Message<"openshell.v1.StaticCredentialBind
4605
4722
  */
4606
4723
  export declare const StaticCredentialBindingSchema: GenMessage<StaticCredentialBinding>;
4607
4724
  /**
4608
- * Get sandbox provider environment response.
4725
+ * Polling projection of ProviderEnvironmentSnapshot. The parallel maps below
4726
+ * are keyed by the same environment variable names. Removed with the polling
4727
+ * RPCs; new provider environment fields belong on the snapshot first.
4609
4728
  *
4610
4729
  * @generated from message openshell.v1.GetSandboxProviderEnvironmentResponse
4611
4730
  */
@@ -4686,12 +4805,124 @@ export type GetSandboxProviderEnvironmentResponse = Message<"openshell.v1.GetSan
4686
4805
  files: {
4687
4806
  [key: string]: string;
4688
4807
  };
4808
+ /**
4809
+ * Credential environment variables whose opaque resolver handle remains
4810
+ * stable across value-only provider revisions. These keys are still secrets;
4811
+ * this metadata only selects the stable external-placeholder behavior.
4812
+ *
4813
+ * @generated from field: repeated string stable_placeholder_environment_keys = 11;
4814
+ */
4815
+ stablePlaceholderEnvironmentKeys: string[];
4816
+ /**
4817
+ * Supporting gateways always acknowledge the stable-placeholder delivery
4818
+ * contract, including responses without opted-in credentials. Supervisors
4819
+ * require acknowledgment for declared or previously activated external
4820
+ * stable credentials; ordinary legacy delivery does not require it.
4821
+ *
4822
+ * @generated from field: bool supports_stable_placeholder_environment_keys = 12;
4823
+ */
4824
+ supportsStablePlaceholderEnvironmentKeys: boolean;
4689
4825
  };
4690
4826
  /**
4691
4827
  * Describes the message openshell.v1.GetSandboxProviderEnvironmentResponse.
4692
4828
  * Use `create(GetSandboxProviderEnvironmentResponseSchema)` to create a new message.
4693
4829
  */
4694
4830
  export declare const GetSandboxProviderEnvironmentResponseSchema: GenMessage<GetSandboxProviderEnvironmentResponse>;
4831
+ /**
4832
+ * One environment value and all metadata that shares its key. Names are unique
4833
+ * within a snapshot. static_credential_binding is present exactly when
4834
+ * classification is STATIC_CREDENTIAL. Snapshots that violate either rule are
4835
+ * invalid.
4836
+ *
4837
+ * @generated from message openshell.v1.ProviderEnvironmentValue
4838
+ */
4839
+ export type ProviderEnvironmentValue = Message<"openshell.v1.ProviderEnvironmentValue"> & {
4840
+ /**
4841
+ * @generated from field: string name = 1;
4842
+ */
4843
+ name: string;
4844
+ /**
4845
+ * @generated from field: string value = 2;
4846
+ */
4847
+ value: string;
4848
+ /**
4849
+ * @generated from field: openshell.v1.ProviderEnvironmentValueClassification classification = 4;
4850
+ */
4851
+ classification: ProviderEnvironmentValueClassification;
4852
+ /**
4853
+ * @generated from field: openshell.v1.StaticCredentialBinding static_credential_binding = 5;
4854
+ */
4855
+ staticCredentialBinding?: StaticCredentialBinding | undefined;
4856
+ /**
4857
+ * Absolute expiration time. Absence means no expiry.
4858
+ *
4859
+ * @generated from field: google.protobuf.Timestamp expiration_time = 3;
4860
+ */
4861
+ expirationTime?: Timestamp | undefined;
4862
+ /**
4863
+ * The static credential keeps one opaque resolver handle across value-only
4864
+ * provider revisions. Set only for STATIC_CREDENTIAL values whose binding
4865
+ * carries a workload_credential_handle.
4866
+ *
4867
+ * @generated from field: bool stable_placeholder = 6;
4868
+ */
4869
+ stablePlaceholder: boolean;
4870
+ };
4871
+ /**
4872
+ * Describes the message openshell.v1.ProviderEnvironmentValue.
4873
+ * Use `create(ProviderEnvironmentValueSchema)` to create a new message.
4874
+ */
4875
+ export declare const ProviderEnvironmentValueSchema: GenMessage<ProviderEnvironmentValue>;
4876
+ /**
4877
+ * Complete provider environment state delivered to a supervisor. This is the
4878
+ * canonical provider environment shape; GetSandboxProviderEnvironmentResponse
4879
+ * is its polling projection and is removed with the polling RPCs. Dynamic
4880
+ * credentials are endpoint selectors rather than environment values and stay
4881
+ * in their own collection.
4882
+ *
4883
+ * @generated from message openshell.v1.ProviderEnvironmentSnapshot
4884
+ */
4885
+ export type ProviderEnvironmentSnapshot = Message<"openshell.v1.ProviderEnvironmentSnapshot"> & {
4886
+ /**
4887
+ * @generated from field: uint64 provider_env_revision = 1;
4888
+ */
4889
+ providerEnvRevision: bigint;
4890
+ /**
4891
+ * @generated from field: repeated openshell.v1.ProviderEnvironmentValue values = 2;
4892
+ */
4893
+ values: ProviderEnvironmentValue[];
4894
+ /**
4895
+ * @generated from field: map<string, openshell.v1.ProviderProfileCredential> dynamic_credentials = 3;
4896
+ */
4897
+ dynamicCredentials: {
4898
+ [key: string]: ProviderProfileCredential;
4899
+ };
4900
+ /**
4901
+ * @generated from field: string provider_attachment_epoch = 4;
4902
+ */
4903
+ providerAttachmentEpoch: string;
4904
+ /**
4905
+ * @generated from field: string policy_hash = 5;
4906
+ */
4907
+ policyHash: string;
4908
+ /**
4909
+ * @generated from field: openshell.v1.ProviderReadinessReason readiness_reason = 6;
4910
+ */
4911
+ readinessReason: ProviderReadinessReason;
4912
+ /**
4913
+ * Complete desired set of non-secret managed files, keyed by absolute path.
4914
+ *
4915
+ * @generated from field: map<string, string> files = 7;
4916
+ */
4917
+ files: {
4918
+ [key: string]: string;
4919
+ };
4920
+ };
4921
+ /**
4922
+ * Describes the message openshell.v1.ProviderEnvironmentSnapshot.
4923
+ * Use `create(ProviderEnvironmentSnapshotSchema)` to create a new message.
4924
+ */
4925
+ export declare const ProviderEnvironmentSnapshotSchema: GenMessage<ProviderEnvironmentSnapshot>;
4695
4926
  /**
4696
4927
  * @generated from message openshell.v1.ExchangeProviderSubjectTokenRequest
4697
4928
  */
@@ -4821,7 +5052,8 @@ export type UpdateConfigRequest = Message<"openshell.v1.UpdateConfigRequest"> &
4821
5052
  * not interpret or verify their semantics. For policy updates, the gateway
4822
5053
  * stores the annotations immutably with the revision and merges them into
4823
5054
  * sandbox metadata as a convenience projection. For setting-only updates, it
4824
- * only merges them into sandbox metadata.
5055
+ * only merges them into sandbox metadata. Keys under the
5056
+ * `internal.openshell.ai/` prefix are reserved for the gateway.
4825
5057
  *
4826
5058
  * @generated from field: map<string, string> annotations = 9;
4827
5059
  */
@@ -5544,6 +5776,12 @@ export type SupervisorMessage = Message<"openshell.v1.SupervisorMessage"> & {
5544
5776
  */
5545
5777
  value: RelayClose;
5546
5778
  case: "relayClose";
5779
+ } | {
5780
+ /**
5781
+ * @generated from field: openshell.v1.ConfigUpdateResult config_update_result = 5;
5782
+ */
5783
+ value: ConfigUpdateResult;
5784
+ case: "configUpdateResult";
5547
5785
  } | {
5548
5786
  case: undefined;
5549
5787
  value?: undefined;
@@ -5599,6 +5837,12 @@ export type GatewayMessage = Message<"openshell.v1.GatewayMessage"> & {
5599
5837
  */
5600
5838
  value: SessionRedirect;
5601
5839
  case: "sessionRedirect";
5840
+ } | {
5841
+ /**
5842
+ * @generated from field: openshell.v1.ConfigUpdate config_update = 7;
5843
+ */
5844
+ value: ConfigUpdate;
5845
+ case: "configUpdate";
5602
5846
  } | {
5603
5847
  case: undefined;
5604
5848
  value?: undefined;
@@ -5656,6 +5900,15 @@ export type SupervisorHello = Message<"openshell.v1.SupervisorHello"> & {
5656
5900
  * @generated from field: bool supports_session_redirect = 6;
5657
5901
  */
5658
5902
  supportsSessionRedirect: boolean;
5903
+ /**
5904
+ * The supervisor can receive its configuration over this stream instead of
5905
+ * polling for it: it applies the bootstrap ConfigUpdate and later
5906
+ * ConfigUpdate payloads, and answers each with its result and admission.
5907
+ * Gateways push configuration only to supervisors that set this.
5908
+ *
5909
+ * @generated from field: bool supports_config_push = 7;
5910
+ */
5911
+ supportsConfigPush: boolean;
5659
5912
  };
5660
5913
  /**
5661
5914
  * Describes the message openshell.v1.SupervisorHello.
@@ -5674,6 +5927,22 @@ export type SessionAccepted = Message<"openshell.v1.SessionAccepted"> & {
5674
5927
  * @generated from field: string session_id = 1;
5675
5928
  */
5676
5929
  sessionId: string;
5930
+ /**
5931
+ * The session's first configuration update. Present exactly when
5932
+ * config_push_enabled is set.
5933
+ *
5934
+ * @generated from field: openshell.v1.ConfigUpdate bootstrap = 3;
5935
+ */
5936
+ bootstrap?: ConfigUpdate | undefined;
5937
+ /**
5938
+ * The gateway pushes configuration authoritatively on this stream instead
5939
+ * of the supervisor polling for it: the bootstrap is required, ConfigUpdate
5940
+ * payloads are applied and acknowledged, and the supervisor stops polling.
5941
+ * Set only for supervisors that set SupervisorHello.supports_config_push.
5942
+ *
5943
+ * @generated from field: bool config_push_enabled = 4;
5944
+ */
5945
+ configPushEnabled: boolean;
5677
5946
  /**
5678
5947
  * Recommended heartbeat interval.
5679
5948
  *
@@ -5686,6 +5955,131 @@ export type SessionAccepted = Message<"openshell.v1.SessionAccepted"> & {
5686
5955
  * Use `create(SessionAcceptedSchema)` to create a new message.
5687
5956
  */
5688
5957
  export declare const SessionAcceptedSchema: GenMessage<SessionAccepted>;
5958
+ /**
5959
+ * Complete gateway-owned configuration for a supervisor session. Each update
5960
+ * replaces the previous one. The supervisor applies the two parts together
5961
+ * and answers every update with one ConfigUpdateResult before the gateway
5962
+ * sends the next.
5963
+ *
5964
+ * @generated from message openshell.v1.ConfigUpdate
5965
+ */
5966
+ export type ConfigUpdate = Message<"openshell.v1.ConfigUpdate"> & {
5967
+ /**
5968
+ * Opaque non-empty identifier scoped to the active supervisor session.
5969
+ *
5970
+ * @generated from field: string update_id = 1;
5971
+ */
5972
+ updateId: string;
5973
+ /**
5974
+ * @generated from field: openshell.sandbox.v1.SandboxConfigSnapshot sandbox_config = 2;
5975
+ */
5976
+ sandboxConfig?: SandboxConfigSnapshot | undefined;
5977
+ /**
5978
+ * The provider environment the sandbox configuration names through its
5979
+ * provider revision, attachment epoch, and policy hash.
5980
+ *
5981
+ * @generated from field: openshell.v1.ProviderEnvironmentSnapshot provider_environment = 3;
5982
+ */
5983
+ providerEnvironment?: ProviderEnvironmentSnapshot | undefined;
5984
+ };
5985
+ /**
5986
+ * Describes the message openshell.v1.ConfigUpdate.
5987
+ * Use `create(ConfigUpdateSchema)` to create a new message.
5988
+ */
5989
+ export declare const ConfigUpdateSchema: GenMessage<ConfigUpdate>;
5990
+ /**
5991
+ * Sanitized application failure. Messages must not contain configuration
5992
+ * payloads, credentials, or provider values.
5993
+ *
5994
+ * @generated from message openshell.v1.ConfigApplyFailure
5995
+ */
5996
+ export type ConfigApplyFailure = Message<"openshell.v1.ConfigApplyFailure"> & {
5997
+ /**
5998
+ * @generated from field: string code = 1;
5999
+ */
6000
+ code: string;
6001
+ /**
6002
+ * @generated from field: string message = 2;
6003
+ */
6004
+ message: string;
6005
+ /**
6006
+ * @generated from field: bool retryable = 3;
6007
+ */
6008
+ retryable: boolean;
6009
+ };
6010
+ /**
6011
+ * Describes the message openshell.v1.ConfigApplyFailure.
6012
+ * Use `create(ConfigApplyFailureSchema)` to create a new message.
6013
+ */
6014
+ export declare const ConfigApplyFailureSchema: GenMessage<ConfigApplyFailure>;
6015
+ /**
6016
+ * Application result for one ConfigUpdate, including the bootstrap.
6017
+ *
6018
+ * @generated from message openshell.v1.ConfigUpdateResult
6019
+ */
6020
+ export type ConfigUpdateResult = Message<"openshell.v1.ConfigUpdateResult"> & {
6021
+ /**
6022
+ * Echoes ConfigUpdate.update_id for session-local correlation.
6023
+ *
6024
+ * @generated from field: string update_id = 1;
6025
+ */
6026
+ updateId: string;
6027
+ /**
6028
+ * @generated from field: openshell.v1.ConfigApplyOutcome outcome = 2;
6029
+ */
6030
+ outcome: ConfigApplyOutcome;
6031
+ /**
6032
+ * Why the update did not take effect. Omitted when it did.
6033
+ *
6034
+ * @generated from field: openshell.v1.ConfigApplyFailure failure = 3;
6035
+ */
6036
+ failure?: ConfigApplyFailure | undefined;
6037
+ /**
6038
+ * Admission state of the delivered sandbox configuration.
6039
+ *
6040
+ * @generated from field: openshell.v1.SandboxConfigurationAdmission admission = 4;
6041
+ */
6042
+ admission?: SandboxConfigurationAdmission | undefined;
6043
+ /**
6044
+ * Load result of the sandbox policy revision the update changed, as a
6045
+ * polling supervisor reports it with ReportPolicyStatus. Omitted when the
6046
+ * update did not change the sandbox policy.
6047
+ *
6048
+ * @generated from field: openshell.v1.PolicyLoadResult policy_load = 5;
6049
+ */
6050
+ policyLoad?: PolicyLoadResult | undefined;
6051
+ };
6052
+ /**
6053
+ * Describes the message openshell.v1.ConfigUpdateResult.
6054
+ * Use `create(ConfigUpdateResultSchema)` to create a new message.
6055
+ */
6056
+ export declare const ConfigUpdateResultSchema: GenMessage<ConfigUpdateResult>;
6057
+ /**
6058
+ * Load result of one sandbox policy revision.
6059
+ *
6060
+ * @generated from message openshell.v1.PolicyLoadResult
6061
+ */
6062
+ export type PolicyLoadResult = Message<"openshell.v1.PolicyLoadResult"> & {
6063
+ /**
6064
+ * @generated from field: uint32 version = 1;
6065
+ */
6066
+ version: number;
6067
+ /**
6068
+ * @generated from field: bool loaded = 2;
6069
+ */
6070
+ loaded: boolean;
6071
+ /**
6072
+ * Sanitized load error. Empty when loaded.
6073
+ *
6074
+ * @generated from field: string error = 3;
6075
+ */
6076
+ error: string;
6077
+ };
6078
+ /**
6079
+ * Describes the message openshell.v1.PolicyLoadResult.
6080
+ * Use `create(PolicyLoadResultSchema)` to create a new message.
6081
+ */
6082
+ export declare const PolicyLoadResultSchema: GenMessage<PolicyLoadResult>;
5689
6083
  /**
5690
6084
  * Gateway rejects the supervisor session.
5691
6085
  *
@@ -6022,6 +6416,103 @@ export type PeerRelayFrame = Message<"openshell.v1.PeerRelayFrame"> & {
6022
6416
  * Use `create(PeerRelayFrameSchema)` to create a new message.
6023
6417
  */
6024
6418
  export declare const PeerRelayFrameSchema: GenMessage<PeerRelayFrame>;
6419
+ /**
6420
+ * @generated from message openshell.v1.PeerConfigSandboxTarget
6421
+ */
6422
+ export type PeerConfigSandboxTarget = Message<"openshell.v1.PeerConfigSandboxTarget"> & {
6423
+ /**
6424
+ * @generated from field: string sandbox_id = 1;
6425
+ */
6426
+ sandboxId: string;
6427
+ /**
6428
+ * Fences a targeted notification to the session observed by the sending replica.
6429
+ *
6430
+ * @generated from field: string session_id = 2;
6431
+ */
6432
+ sessionId: string;
6433
+ };
6434
+ /**
6435
+ * Describes the message openshell.v1.PeerConfigSandboxTarget.
6436
+ * Use `create(PeerConfigSandboxTargetSchema)` to create a new message.
6437
+ */
6438
+ export declare const PeerConfigSandboxTargetSchema: GenMessage<PeerConfigSandboxTarget>;
6439
+ /**
6440
+ * Sandboxes in a workspace that attach the named provider.
6441
+ *
6442
+ * @generated from message openshell.v1.PeerConfigProviderTarget
6443
+ */
6444
+ export type PeerConfigProviderTarget = Message<"openshell.v1.PeerConfigProviderTarget"> & {
6445
+ /**
6446
+ * @generated from field: string workspace = 1;
6447
+ */
6448
+ workspace: string;
6449
+ /**
6450
+ * @generated from field: string name = 2;
6451
+ */
6452
+ name: string;
6453
+ };
6454
+ /**
6455
+ * Describes the message openshell.v1.PeerConfigProviderTarget.
6456
+ * Use `create(PeerConfigProviderTargetSchema)` to create a new message.
6457
+ */
6458
+ export declare const PeerConfigProviderTargetSchema: GenMessage<PeerConfigProviderTarget>;
6459
+ /**
6460
+ * @generated from message openshell.v1.PeerNotifyConfigUpdateRequest
6461
+ */
6462
+ export type PeerNotifyConfigUpdateRequest = Message<"openshell.v1.PeerNotifyConfigUpdateRequest"> & {
6463
+ /**
6464
+ * @generated from oneof openshell.v1.PeerNotifyConfigUpdateRequest.scope
6465
+ */
6466
+ scope: {
6467
+ /**
6468
+ * @generated from field: openshell.v1.PeerConfigSandboxTarget sandbox = 1;
6469
+ */
6470
+ value: PeerConfigSandboxTarget;
6471
+ case: "sandbox";
6472
+ } | {
6473
+ /**
6474
+ * @generated from field: string workspace = 2;
6475
+ */
6476
+ value: string;
6477
+ case: "workspace";
6478
+ } | {
6479
+ /**
6480
+ * @generated from field: bool all_connected = 3;
6481
+ */
6482
+ value: boolean;
6483
+ case: "allConnected";
6484
+ } | {
6485
+ /**
6486
+ * @generated from field: openshell.v1.PeerConfigProviderTarget provider = 4;
6487
+ */
6488
+ value: PeerConfigProviderTarget;
6489
+ case: "provider";
6490
+ } | {
6491
+ case: undefined;
6492
+ value?: undefined;
6493
+ };
6494
+ };
6495
+ /**
6496
+ * Describes the message openshell.v1.PeerNotifyConfigUpdateRequest.
6497
+ * Use `create(PeerNotifyConfigUpdateRequestSchema)` to create a new message.
6498
+ */
6499
+ export declare const PeerNotifyConfigUpdateRequestSchema: GenMessage<PeerNotifyConfigUpdateRequest>;
6500
+ /**
6501
+ * @generated from message openshell.v1.PeerNotifyConfigUpdateResponse
6502
+ */
6503
+ export type PeerNotifyConfigUpdateResponse = Message<"openshell.v1.PeerNotifyConfigUpdateResponse"> & {
6504
+ /**
6505
+ * The targeted session moved before the receiving replica accepted the notification.
6506
+ *
6507
+ * @generated from field: bool stale_owner = 1;
6508
+ */
6509
+ staleOwner: boolean;
6510
+ };
6511
+ /**
6512
+ * Describes the message openshell.v1.PeerNotifyConfigUpdateResponse.
6513
+ * Use `create(PeerNotifyConfigUpdateResponseSchema)` to create a new message.
6514
+ */
6515
+ export declare const PeerNotifyConfigUpdateResponseSchema: GenMessage<PeerNotifyConfigUpdateResponse>;
6025
6516
  /**
6026
6517
  * Supervisor reports the result of a relay open request.
6027
6518
  *
@@ -7480,6 +7971,13 @@ export type EndpointObservation = Message<"openshell.v1.EndpointObservation"> &
7480
7971
  * @generated from field: openshell.v1.EndpointResult result = 2;
7481
7972
  */
7482
7973
  result: EndpointResult;
7974
+ /**
7975
+ * Bounded cause of result, when the supervisor classified it. Each failure
7976
+ * domain names the results it can explain.
7977
+ *
7978
+ * @generated from field: openshell.v1.EndpointFailure failure = 3;
7979
+ */
7980
+ failure?: EndpointFailure | undefined;
7483
7981
  };
7484
7982
  /**
7485
7983
  * Describes the message openshell.v1.EndpointObservation.
@@ -7537,12 +8035,67 @@ export type ReportEndpointStatusRequest = Message<"openshell.v1.ReportEndpointSt
7537
8035
  * @generated from field: uint64 report_sequence = 7;
7538
8036
  */
7539
8037
  reportSequence: bigint;
8038
+ /**
8039
+ * Complete latest grant state. Omission retains legacy compatibility;
8040
+ * a present message with no last_failure explicitly clears the prior cause.
8041
+ *
8042
+ * @generated from field: openshell.v1.TokenGrantStatus token_grant_status = 8;
8043
+ */
8044
+ tokenGrantStatus?: TokenGrantStatus | undefined;
7540
8045
  };
7541
8046
  /**
7542
8047
  * Describes the message openshell.v1.ReportEndpointStatusRequest.
7543
8048
  * Use `create(ReportEndpointStatusRequestSchema)` to create a new message.
7544
8049
  */
7545
8050
  export declare const ReportEndpointStatusRequestSchema: GenMessage<ReportEndpointStatusRequest>;
8051
+ /**
8052
+ * Latest token-grant state sent by the authenticated supervisor.
8053
+ *
8054
+ * @generated from message openshell.v1.TokenGrantStatus
8055
+ */
8056
+ export type TokenGrantStatus = Message<"openshell.v1.TokenGrantStatus"> & {
8057
+ /**
8058
+ * @generated from field: openshell.v1.TokenGrantFailureObservation last_failure = 1;
8059
+ */
8060
+ lastFailure?: TokenGrantFailureObservation | undefined;
8061
+ };
8062
+ /**
8063
+ * Describes the message openshell.v1.TokenGrantStatus.
8064
+ * Use `create(TokenGrantStatusSchema)` to create a new message.
8065
+ */
8066
+ export declare const TokenGrantStatusSchema: GenMessage<TokenGrantStatus>;
8067
+ /**
8068
+ * A refused grant and its destination, without request paths or remote text.
8069
+ * This describes the failed attempt, not the destination's current health.
8070
+ *
8071
+ * @generated from message openshell.v1.TokenGrantFailureObservation
8072
+ */
8073
+ export type TokenGrantFailureObservation = Message<"openshell.v1.TokenGrantFailureObservation"> & {
8074
+ /**
8075
+ * Canonical observed host or IP address, bounded to 253 ASCII bytes.
8076
+ *
8077
+ * @generated from field: string destination_host = 1;
8078
+ */
8079
+ destinationHost: string;
8080
+ /**
8081
+ * Observed destination port in the range 1 through 65535.
8082
+ *
8083
+ * @generated from field: uint32 destination_port = 2;
8084
+ */
8085
+ destinationPort: number;
8086
+ /**
8087
+ * Bounded token_grant cause. Provider and credential may be absent when
8088
+ * selection failed; the request ID still identifies the refused exchange.
8089
+ *
8090
+ * @generated from field: openshell.v1.EndpointFailure failure = 3;
8091
+ */
8092
+ failure?: EndpointFailure | undefined;
8093
+ };
8094
+ /**
8095
+ * Describes the message openshell.v1.TokenGrantFailureObservation.
8096
+ * Use `create(TokenGrantFailureObservationSchema)` to create a new message.
8097
+ */
8098
+ export declare const TokenGrantFailureObservationSchema: GenMessage<TokenGrantFailureObservation>;
7546
8099
  /**
7547
8100
  * Empty acknowledgement for a persisted endpoint status report.
7548
8101
  *
@@ -7601,6 +8154,15 @@ export type EndpointStatus = Message<"openshell.v1.EndpointStatus"> & {
7601
8154
  * @generated from field: google.protobuf.Timestamp last_reported_time = 106;
7602
8155
  */
7603
8156
  lastReportedTime?: Timestamp | undefined;
8157
+ /**
8158
+ * Bounded cause of last_result, when the supervisor classified it. Each
8159
+ * failure domain names the results it can explain. Replaced or cleared by
8160
+ * every later observation, and cleared by the same resets that clear
8161
+ * last_result.
8162
+ *
8163
+ * @generated from field: openshell.v1.EndpointFailure last_failure = 7;
8164
+ */
8165
+ lastFailure?: EndpointFailure | undefined;
7604
8166
  };
7605
8167
  /**
7606
8168
  * Describes the message openshell.v1.EndpointStatus.
@@ -7737,6 +8299,70 @@ export type SandboxServiceExposure = Message<"openshell.v1.SandboxServiceExposur
7737
8299
  * Use `create(SandboxServiceExposureSchema)` to create a new message.
7738
8300
  */
7739
8301
  export declare const SandboxServiceExposureSchema: GenMessage<SandboxServiceExposure>;
8302
+ /**
8303
+ * Bounded cause of a failed endpoint observation, including failures before
8304
+ * any request reaches the endpoint. No field carries remote
8305
+ * text: code and stage come from the domain's closed sets, provider and
8306
+ * credential_key are configured names, and request_id is an opaque random ID.
8307
+ *
8308
+ * @generated from message openshell.v1.EndpointFailure
8309
+ */
8310
+ export type EndpointFailure = Message<"openshell.v1.EndpointFailure"> & {
8311
+ /**
8312
+ * @generated from field: openshell.v1.EndpointFailureDomain domain = 1;
8313
+ */
8314
+ domain: EndpointFailureDomain;
8315
+ /**
8316
+ * Stable lower_snake_case code from the domain's closed set, such as
8317
+ * provider_authorization_required.
8318
+ *
8319
+ * @generated from field: string code = 2;
8320
+ */
8321
+ code: string;
8322
+ /**
8323
+ * Who can resolve the failure; always the action documented for the code.
8324
+ *
8325
+ * @generated from field: openshell.v1.ProviderCredentialRefreshRecoveryAction recovery_action = 3;
8326
+ */
8327
+ recoveryAction: ProviderCredentialRefreshRecoveryAction;
8328
+ /**
8329
+ * Provider whose credential failed. Empty when the failure happened before
8330
+ * a credential was selected.
8331
+ *
8332
+ * @generated from field: string provider = 4;
8333
+ */
8334
+ provider: string;
8335
+ /**
8336
+ * Credential name within the provider. Never a credential value.
8337
+ *
8338
+ * @generated from field: string credential_key = 5;
8339
+ */
8340
+ credentialKey: string;
8341
+ /**
8342
+ * Step that observed the failure, from the domain's closed set.
8343
+ *
8344
+ * @generated from field: string stage = 6;
8345
+ */
8346
+ stage: string;
8347
+ /**
8348
+ * HTTP status a token service returned, when one was received.
8349
+ *
8350
+ * @generated from field: optional uint32 upstream_http_status = 7;
8351
+ */
8352
+ upstreamHttpStatus?: number | undefined;
8353
+ /**
8354
+ * Supervisor-minted UUID of the refused exchange. The workload receives the
8355
+ * same value in the x-openshell-request-id response header.
8356
+ *
8357
+ * @generated from field: string request_id = 8;
8358
+ */
8359
+ requestId: string;
8360
+ };
8361
+ /**
8362
+ * Describes the message openshell.v1.EndpointFailure.
8363
+ * Use `create(EndpointFailureSchema)` to create a new message.
8364
+ */
8365
+ export declare const EndpointFailureSchema: GenMessage<EndpointFailure>;
7740
8366
  /**
7741
8367
  * @generated from enum openshell.v1.ExtensionKind
7742
8368
  */
@@ -8187,6 +8813,29 @@ export declare enum ProviderProfileCategory {
8187
8813
  * Describes the enum openshell.v1.ProviderProfileCategory.
8188
8814
  */
8189
8815
  export declare const ProviderProfileCategorySchema: GenEnum<ProviderProfileCategory>;
8816
+ /**
8817
+ * Receivers treat UNSPECIFIED and unknown values as secret.
8818
+ *
8819
+ * @generated from enum openshell.v1.ProviderEnvironmentValueClassification
8820
+ */
8821
+ export declare enum ProviderEnvironmentValueClassification {
8822
+ /**
8823
+ * @generated from enum value: PROVIDER_ENVIRONMENT_VALUE_CLASSIFICATION_UNSPECIFIED = 0;
8824
+ */
8825
+ UNSPECIFIED = 0,
8826
+ /**
8827
+ * @generated from enum value: PROVIDER_ENVIRONMENT_VALUE_CLASSIFICATION_NON_SECRET = 1;
8828
+ */
8829
+ NON_SECRET = 1,
8830
+ /**
8831
+ * @generated from enum value: PROVIDER_ENVIRONMENT_VALUE_CLASSIFICATION_STATIC_CREDENTIAL = 2;
8832
+ */
8833
+ STATIC_CREDENTIAL = 2
8834
+ }
8835
+ /**
8836
+ * Describes the enum openshell.v1.ProviderEnvironmentValueClassification.
8837
+ */
8838
+ export declare const ProviderEnvironmentValueClassificationSchema: GenEnum<ProviderEnvironmentValueClassification>;
8190
8839
  /**
8191
8840
  * @generated from enum openshell.v1.ConfigurationAdmissionState
8192
8841
  */
@@ -8496,6 +9145,32 @@ export declare enum ServiceAuthorizationMode {
8496
9145
  * Describes the enum openshell.v1.ServiceAuthorizationMode.
8497
9146
  */
8498
9147
  export declare const ServiceAuthorizationModeSchema: GenEnum<ServiceAuthorizationMode>;
9148
+ /**
9149
+ * Subsystem whose closed code set explains an endpoint failure. Each domain
9150
+ * defines its codes, stages, recovery actions, and the endpoint results it
9151
+ * can explain. Kept at the end of the file so adding it does not renumber
9152
+ * existing generated descriptors.
9153
+ *
9154
+ * @generated from enum openshell.v1.EndpointFailureDomain
9155
+ */
9156
+ export declare enum EndpointFailureDomain {
9157
+ /**
9158
+ * @generated from enum value: ENDPOINT_FAILURE_DOMAIN_UNSPECIFIED = 0;
9159
+ */
9160
+ UNSPECIFIED = 0,
9161
+ /**
9162
+ * A dynamic token grant for a provider credential failed, so OpenShell
9163
+ * refused the request before any of it reached the endpoint. Explains
9164
+ * ENDPOINT_RESULT_CREDENTIAL_UNAVAILABLE.
9165
+ *
9166
+ * @generated from enum value: ENDPOINT_FAILURE_DOMAIN_TOKEN_GRANT = 1;
9167
+ */
9168
+ TOKEN_GRANT = 1
9169
+ }
9170
+ /**
9171
+ * Describes the enum openshell.v1.EndpointFailureDomain.
9172
+ */
9173
+ export declare const EndpointFailureDomainSchema: GenEnum<EndpointFailureDomain>;
8499
9174
  /**
8500
9175
  * OpenShell service provides sandbox, provider, and runtime management capabilities.
8501
9176
  *
@@ -8808,6 +9483,17 @@ export declare const OpenShell: GenService<{
8808
9483
  input: typeof GetProviderRequestSchema;
8809
9484
  output: typeof ProviderResponseSchema;
8810
9485
  };
9486
+ /**
9487
+ * Export selected usable runtime credentials. Only directly authenticated
9488
+ * mTLS operators may call this method; refresh material is never returned.
9489
+ *
9490
+ * @generated from rpc openshell.v1.OpenShell.GetProviderCredentials
9491
+ */
9492
+ getProviderCredentials: {
9493
+ methodKind: "unary";
9494
+ input: typeof GetProviderCredentialsRequestSchema;
9495
+ output: typeof GetProviderCredentialsResponseSchema;
9496
+ };
8811
9497
  /**
8812
9498
  * List providers.
8813
9499
  *
@@ -8939,7 +9625,9 @@ export declare const OpenShell: GenService<{
8939
9625
  output: typeof DeleteProviderProfileResponseSchema;
8940
9626
  };
8941
9627
  /**
8942
- * Get sandbox settings by id (called by sandbox entrypoint and poll loop).
9628
+ * Get sandbox settings by id (called by users, and by supervisors at startup
9629
+ * and in their poll loop). A supervisor whose session pushes configuration
9630
+ * receives later updates over ConnectSupervisor and stops polling.
8943
9631
  *
8944
9632
  * @generated from rpc openshell.v1.OpenShell.GetSandboxConfig
8945
9633
  */
@@ -9036,7 +9724,9 @@ export declare const OpenShell: GenService<{
9036
9724
  output: typeof ReportSandboxConfigurationResponseSchema;
9037
9725
  };
9038
9726
  /**
9039
- * Get provider environment for a sandbox (called by sandbox supervisor at startup).
9727
+ * Get provider environment for a sandbox (called by the sandbox supervisor at
9728
+ * startup and by its poll loop). Polling projection of the provider
9729
+ * environment delivered over ConnectSupervisor; removed with the polling RPCs.
9040
9730
  *
9041
9731
  * @generated from rpc openshell.v1.OpenShell.GetSandboxProviderEnvironment
9042
9732
  */
@@ -9081,9 +9771,11 @@ export declare const OpenShell: GenService<{
9081
9771
  *
9082
9772
  * The supervisor opens this stream at startup and keeps it alive for the
9083
9773
  * sandbox lifetime. The gateway uses it to coordinate relay channels for
9084
- * SSH connect, ExecSandbox, and targetable sandbox services. Raw service
9085
- * bytes flow over RelayStream calls (separate HTTP/2 streams on the same
9086
- * connection), not over this stream.
9774
+ * SSH connect, ExecSandbox, targetable sandbox services, and configuration
9775
+ * delivery. Supervisors advertise optional stream features in
9776
+ * SupervisorHello, and the gateway sends only payloads the supervisor
9777
+ * advertises. Raw service bytes flow over RelayStream calls (separate HTTP/2
9778
+ * streams on the same connection), not over this stream.
9087
9779
  *
9088
9780
  * @generated from rpc openshell.v1.OpenShell.ConnectSupervisor
9089
9781
  */
@@ -9174,6 +9866,17 @@ export declare const OpenShell: GenService<{
9174
9866
  input: typeof GetSandboxProviderStatusRequestSchema;
9175
9867
  output: typeof GetSandboxProviderStatusResponseSchema;
9176
9868
  };
9869
+ /**
9870
+ * Best-effort notification to the replica that owns a supervisor session.
9871
+ * The receiver rebuilds snapshots from authoritative state.
9872
+ *
9873
+ * @generated from rpc openshell.v1.OpenShell.PeerNotifyConfigUpdate
9874
+ */
9875
+ peerNotifyConfigUpdate: {
9876
+ methodKind: "unary";
9877
+ input: typeof PeerNotifyConfigUpdateRequestSchema;
9878
+ output: typeof PeerNotifyConfigUpdateResponseSchema;
9879
+ };
9177
9880
  /**
9178
9881
  * Watch a sandbox and stream updates.
9179
9882
  *