@standardagents/spec 0.41.11 → 0.41.13

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.ts CHANGED
@@ -800,10 +800,23 @@ interface UserState {
800
800
  total: number;
801
801
  }>;
802
802
  /**
803
- * Resolve a user-scoped environment property. Rejects when the property is
804
- * not defined for this user.
803
+ * Resolve an environment property for this user: the user-account value
804
+ * first, then the runtime instance value. Rejects when neither defines it.
805
+ * This is the tail of the thread resolution order (`ThreadState.env`), so
806
+ * a value configured once for the instance is visible to user endpoints
807
+ * and user hooks as it is to threads, and a user-account value overrides
808
+ * it for that user.
805
809
  */
806
810
  env(name: string): Promise<string>;
811
+ /**
812
+ * Optionally resolve only the runtime-instance value, never a user-account
813
+ * value, for trust anchors such as a service endpoint and the credential
814
+ * sent to it. Resolves `undefined` when the instance does not configure the
815
+ * key and rejects when the runtime cannot read its instance environment.
816
+ * Consumers that require this boundary must feature-detect the method and
817
+ * fail closed when it is absent.
818
+ */
819
+ instanceEnv?(name: string): Promise<string | undefined>;
807
820
  /**
808
821
  * Broadcast an event to every socket attached to this user's event stream
809
822
  * (`{runtime_prefix}/users/me/stream`) and to every room socket. Delivery