@fungi.computer/oyster 0.19.6 → 0.19.8

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/agents.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { AppSetup } from "@fungi.computer/agar";
1
2
  import type { TenantPrincipal } from "./tenant.js";
2
3
  import type { ModelKeyRecord, ModelKeyRefusal, ModelKeySealInput } from "./standalone/model-key-vault.js";
3
4
  export type { ModelKeyRefusal, ModelKeySealInput, } from "./standalone/model-key-vault.js";
@@ -215,7 +216,7 @@ export declare function agentApprovalRoutes(agents: OysterAgents): Routes<Oyster
215
216
  * Host-owned model-key custody for the owner directly. A key goes in once and
216
217
  * never comes back out; listings carry provider, label and times only.
217
218
  */
218
- export declare function modelKeyRoutes(agents: OysterAgents): Routes<OysterEnv>;
219
+ export declare function modelKeyRoutes(agents: OysterAgents, computerSetup?: () => Promise<Pick<AppSetup, "terminal" | "terminalReason">>): Routes<OysterEnv>;
219
220
  /**
220
221
  * Host-owned connection custody for the owner directly; never an App
221
222
  * capability. Tokens go in and never come back out.
package/dist/agents.js CHANGED
@@ -429,7 +429,7 @@ const modelKeyRefusalStatus = {
429
429
  * Host-owned model-key custody for the owner directly. A key goes in once and
430
430
  * never comes back out; listings carry provider, label and times only.
431
431
  */
432
- export function modelKeyRoutes(agents) {
432
+ export function modelKeyRoutes(agents, computerSetup) {
433
433
  return routes()
434
434
  .get("/api/model-keys", owner("direct"), async () => Response.json({ keys: await agents.modelKeys() }))
435
435
  .get("/api/setup", owner("direct"), async () => Response.json({
@@ -437,6 +437,7 @@ export function modelKeyRoutes(agents) {
437
437
  // Git and the terminal are read from the Computer, which reports them.
438
438
  git: "unknown",
439
439
  terminal: "unknown",
440
+ ...(await computerSetup?.()),
440
441
  }))
441
442
  .post("/api/model-keys", owner("direct"), async (context) => {
442
443
  const length = Number(context.req.header("content-length") ?? "0");