@anscribe/opentui 0.1.0 → 1.0.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
@@ -105,14 +105,14 @@ import { installCapture } from "@anscribe/opentui";
105
105
  // ...installCapture as usual; the sink is already wired.
106
106
  ```
107
107
 
108
- The side-effect module registers the sink with `@anscribe/opentui`'s internal registry. `installCapture` snapshots the registry at host install time, so the import must run before the first `installCapture` call.
108
+ The side-effect module registers the sink in `@anscribe/core`'s shared registry. `installCapture` snapshots the registry at host install time, so the import must run before the first `installCapture` call.
109
109
 
110
110
  ### Custom and programmatic sinks
111
111
 
112
- For dynamic registration (tests, multi-tenant runners, custom destinations) reach for `@anscribe/opentui/sinks`:
112
+ For dynamic registration (tests, multi-tenant runners, custom destinations) reach for the helpers in `@anscribe/core`:
113
113
 
114
114
  ```ts
115
- import { registerCaptureSink, type CaptureSink } from "@anscribe/opentui/sinks";
115
+ import { registerCaptureSink, type CaptureSink } from "@anscribe/core";
116
116
 
117
117
  const webhookSink: CaptureSink = {
118
118
  name: "webhook",
@@ -127,7 +127,7 @@ const webhookSink: CaptureSink = {
127
127
  registerCaptureSink(webhookSink);
128
128
  ```
129
129
 
130
- `CaptureSink` lives in `@anscribe/core`; the subpath here re-exports it for ergonomics. `resetCaptureSinks()` is also exported for test isolation production code should not use it.
130
+ `CaptureSink`, `registerCaptureSink`, `readRegisteredCaptureSinks`, and `resetCaptureSinks` all live in `@anscribe/core` — a peer dependency of this package, so a single core instance owns the registry that every adapter shares. `resetCaptureSinks()` is provided for test isolation; production code should not use it.
131
131
 
132
132
  If a sink fails, the host's failure reporter logs the error tagged with the sink's name. The clipboard handoff has already happened, so the user-visible state stays consistent. The capture state machine has already committed the Capture; sink failures don't roll it back.
133
133
 
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as InstallCaptureOptions, t as CaptureInstallation } from "./install-Bbw_EVFu.mjs";
1
+ import { n as InstallCaptureOptions, t as CaptureInstallation } from "./install-C5_zhytL.mjs";
2
2
  import { Capture, CaptureId, CaptureMetadata, CaptureSink, CaptureStatus, CapturedTarget, CapturedTargetId, IsoTimestamp, SourceReference, TerminalCellBounds } from "@anscribe/core";
3
3
  import { CliRenderer } from "@opentui/core";
4
4
 
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as installCaptureWithEnrichment } from "./install-DYrt2HTN.mjs";
1
+ import { t as installCaptureWithEnrichment } from "./install-COZ6o6qT.mjs";
2
2
  import { CaptureMetadataEnrichment } from "@anscribe/core";
3
3
  //#region src/index.ts
4
4
  function installCapture(renderer, options = {}) {
@@ -1,5 +1,4 @@
1
- import { t as readRegisteredCaptureSinks } from "./sink-registry-DAlYVk2U.mjs";
2
- import { CaptureHostFailureReporter, CaptureMetadataEnrichment, CaptureMode, CaptureModeIntent, CapturePersistence, CapturePersistenceError, CapturedTarget, decodeAnscribeDataEffect, formatCaptureForClipboard, generateCapturedTargetId, isAnscribeOverlay, markAsOverlay, noCaptureEnrichment, resolveTargetAtCell, selectCurrentTarget } from "@anscribe/core";
1
+ import { CaptureHostFailureReporter, CaptureMetadataEnrichment, CaptureMode, CaptureModeIntent, CapturePersistence, CapturePersistenceError, CapturedTarget, decodeAnscribeDataEffect, formatCaptureForClipboard, generateCapturedTargetId, isAnscribeOverlay, markAsOverlay, noCaptureEnrichment, readRegisteredCaptureSinks, resolveTargetAtCell, selectCurrentTarget } from "@anscribe/core";
3
2
  import { Effect, Fiber, Layer, ManagedRuntime } from "effect";
4
3
  import { BoxRenderable, InputRenderable, InputRenderableEvents, RGBA, TextRenderable } from "@opentui/core";
5
4
  import { customAlphabet } from "nanoid";
package/dist/react.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as InstallCaptureOptions } from "./install-Bbw_EVFu.mjs";
1
+ import { n as InstallCaptureOptions } from "./install-C5_zhytL.mjs";
2
2
 
3
3
  //#region src/react/index.d.ts
4
4
  declare function Anscribe(props: InstallCaptureOptions): null;
package/dist/react.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as installCaptureWithEnrichment } from "./install-DYrt2HTN.mjs";
1
+ import { t as installCaptureWithEnrichment } from "./install-COZ6o6qT.mjs";
2
2
  import { CaptureMetadataEnrichment } from "@anscribe/core";
3
3
  import { isReactRuntimeEnrichmentAvailable, reactMetadataEnricher } from "@anscribe/react";
4
4
  import { useRenderer } from "@opentui/react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anscribe/opentui",
3
- "version": "0.1.0",
3
+ "version": "1.0.1",
4
4
  "description": "Anscribe OpenTUI adapter: install capture mode in OpenTUI apps and stream captures to an agent via MCP.",
5
5
  "keywords": [
6
6
  "agent",
@@ -38,10 +38,6 @@
38
38
  "./react/preload": {
39
39
  "types": "./dist/react/preload.d.mts",
40
40
  "import": "./dist/react/preload.mjs"
41
- },
42
- "./sinks": {
43
- "types": "./dist/sinks.d.mts",
44
- "import": "./dist/sinks.mjs"
45
41
  }
46
42
  },
47
43
  "publishConfig": {
@@ -51,14 +47,14 @@
51
47
  },
52
48
  "dependencies": {
53
49
  "effect": "^4.0.0-beta.65",
54
- "nanoid": "^5.1.6",
55
- "@anscribe/core": "0.1.0",
56
- "@anscribe/react": "0.1.0"
50
+ "nanoid": "^5.1.6"
57
51
  },
58
52
  "peerDependencies": {
59
53
  "@opentui/core": "^0.2.8",
60
54
  "@opentui/react": "0.2.8",
61
- "react": ">=19.2.0"
55
+ "react": ">=19.2.0",
56
+ "@anscribe/react": "1.0.1",
57
+ "@anscribe/core": "1.0.1"
62
58
  },
63
59
  "peerDependenciesMeta": {
64
60
  "@opentui/react": {
@@ -1,16 +0,0 @@
1
- //#region src/internal/sink-registry.ts
2
- const registeredSinks = /* @__PURE__ */ new Map();
3
- const registerCaptureSink = (sink) => {
4
- registeredSinks.set(sink.name, sink);
5
- };
6
- const readRegisteredCaptureSinks = () => Array.from(registeredSinks.values());
7
- /**
8
- * Test-only escape hatch. Production code should never call this — the
9
- * registry is process-global so a stray reset between two consumers in the
10
- * same process would silently break the second one.
11
- */
12
- const resetCaptureSinks = () => {
13
- registeredSinks.clear();
14
- };
15
- //#endregion
16
- export { registerCaptureSink as n, resetCaptureSinks as r, readRegisteredCaptureSinks as t };
package/dist/sinks.d.mts DELETED
@@ -1,13 +0,0 @@
1
- import { CaptureSink, CaptureSink as CaptureSink$1 } from "@anscribe/core";
2
-
3
- //#region src/internal/sink-registry.d.ts
4
- declare const registerCaptureSink: (sink: CaptureSink$1) => void;
5
- declare const readRegisteredCaptureSinks: () => ReadonlyArray<CaptureSink$1>;
6
- /**
7
- * Test-only escape hatch. Production code should never call this — the
8
- * registry is process-global so a stray reset between two consumers in the
9
- * same process would silently break the second one.
10
- */
11
- declare const resetCaptureSinks: () => void;
12
- //#endregion
13
- export { type CaptureSink, readRegisteredCaptureSinks, registerCaptureSink, resetCaptureSinks };
package/dist/sinks.mjs DELETED
@@ -1,2 +0,0 @@
1
- import { n as registerCaptureSink, r as resetCaptureSinks, t as readRegisteredCaptureSinks } from "./sink-registry-DAlYVk2U.mjs";
2
- export { readRegisteredCaptureSinks, registerCaptureSink, resetCaptureSinks };