@ravi-os/sdk 0.260608.1 → 0.260724.1

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/README.md CHANGED
@@ -121,6 +121,38 @@ import { RaviClient } from "@ravi-os/sdk/client";
121
121
  import { createHttpTransport } from "@ravi-os/sdk/transport/http";
122
122
  ```
123
123
 
124
+ ## Inherit The Calling Ravi Runtime
125
+
126
+ Handlers launched by Ravi already receive `RAVI_CONTEXT_KEY` plus the local
127
+ gateway env. Use `createInheritedClient` to reuse that runtime context without
128
+ manually wiring transport config:
129
+
130
+ ```ts
131
+ import { createInheritedClient } from "@ravi-os/sdk";
132
+
133
+ const { client: ravi } = await createInheritedClient();
134
+ await ravi.context.whoami();
135
+ ```
136
+
137
+ Child context mode is available when handing context to another process or
138
+ subsystem. Make inheritance explicit, or pass a narrow `allow` list:
139
+
140
+ ```ts
141
+ const inherited = await createInheritedClient({
142
+ child: {
143
+ cliName: "agent-factory",
144
+ ttl: "5m",
145
+ inherit: true,
146
+ },
147
+ });
148
+
149
+ try {
150
+ await inherited.client.agents.list({ limit: "10" });
151
+ } finally {
152
+ await inherited.revoke?.();
153
+ }
154
+ ```
155
+
124
156
  ## Examples
125
157
 
126
158
  ### Read Runtime State