Official

terminal

Built-in integrated terminal (JavaScript UI plugin).

The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: dvg install divergence/terminal@0.2.1

Permissions in 0.2.1

Take care. This plugin asks for permissions that can do anything your account can. The app asks you to hold Enable for two seconds or to type the plugin's name before it turns on.
  • Terminals terminalDangerousCreates and controls terminals, which run a shell.Run shells in the integrated terminal
  • Read chats chats.readMediumReads your transcripts and chat lists.Start shells in the current workspace
  • Show panels ui.slotsAlways grantedShows views in the listed parts of the window.Show the terminal button and its windowSlots: railright

Files

main.ts2.2 KB
// Register terminal views synchronously; expose them only after the kernel support probe succeeds.
// Both listeners and session work belong to the activation scope.
import * as Effect from "effect/Effect";
import * as Stream from "effect/Stream";
import { Commands, Events, Services, Views, runPlugin } from "divergence/effect";
import { Terminal } from "./contract.ts";
import { controller } from "./controller.ts";
import { TerminalState } from "./state.ts";
import { renderFlyOut, renderRail } from "./view.ts";

const program = Effect.gen(function* () {
  const terminal = yield* controller();
  const views = yield* Views;
  const events = yield* Events;
  terminal.state.rail = yield* views.slot("rail", (ctx) => renderRail(terminal, ctx), {
    on: ["app_state", "terminal"],
    order: 100,
  });
  terminal.state.flyOut = yield* views.slot(
    "right",
    (ctx) => {
      // The baseline requests a missing session when this view renders, after registrations are published.
      ctx.run(terminal.ensureVisible());
      return renderFlyOut(terminal, ctx);
    },
    {
      on: ["app_state", "terminal"],
      order: 100,
      title: "Terminal",
      flyout: { width: 960, height: 560, align: "bottom" },
    },
  );
  yield* Effect.forkScoped(
    events
      .stream("terminal")
      .pipe(Stream.runForEach(() => Effect.forkIn(terminal.refresh(), terminal.scope, { startImmediately: true }))),
    { startImmediately: true },
  );
  const supported = yield* terminal.refresh().pipe(
    Effect.match({
      onSuccess: () => true,
      onFailure: (error) => {
        console.warn(`terminal: this build has no terminal support (${error.message})`);
        return false;
      },
    }),
  );
  if (!supported) return;
  const commands = yield* Commands;
  yield* commands.register("terminal.toggle", terminal.openInPane());
  yield* commands.register("terminal.new", terminal.openInPane(true));
  const services = yield* Services;
  yield* services.provide(Terminal, {
    run: ({ command, title }) => terminal.run(command, title).pipe(Effect.as(null)),
  });
  terminal.state.ready = true;
  terminal.update();
});

export const activate = runPlugin(TerminalState.layer, program);

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.5latestNov 21, 2026>=5 <612.9 KB3 permissionsListed
0.2.4Nov 16, 2026>=5 <612.6 KB3 permissionsListed
0.2.3Nov 11, 2026>=5 <612.4 KB3 permissionsListed
0.2.2Nov 9, 2026>=5 <611.5 KB3 permissionsListed
0.2.1Oct 27, 2026>=2 <49.5 KB3 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.