Archetype
English 콘솔

Archetype SDK

npm i @pairful/archetype-sdk

v0.9.204 · TypeScript · Node · Bun · 브라우저 · npm

app.ts

import {
  ClientConnectionService,
  ConnectorAdapter,
} from "@pairful/archetype-sdk";

const client = await ClientConnectionService.connect(
  ConnectorAdapter.webSocketConnector(url),
  { client: "my-app" },
);
const turn = await client.startTurn("main", "run the tests");
for await (const { event } of client.events(turn)) {
  if (event.type === "approval.requested")
    await client.respond(turn, event.requestId, { action: "allow" });
}

출력