@actana/sdk 0.2.2

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.
Files changed (39) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +66 -0
  3. package/dist/core-client.d.ts +616 -0
  4. package/dist/core-client.d.ts.map +1 -0
  5. package/dist/core-client.js +1036 -0
  6. package/dist/core-client.js.map +1 -0
  7. package/dist/core-link-cursor-storage.d.ts +32 -0
  8. package/dist/core-link-cursor-storage.d.ts.map +1 -0
  9. package/dist/core-link-cursor-storage.js +66 -0
  10. package/dist/core-link-cursor-storage.js.map +1 -0
  11. package/dist/core-link-frames.d.ts +1123 -0
  12. package/dist/core-link-frames.d.ts.map +1 -0
  13. package/dist/core-link-frames.js +349 -0
  14. package/dist/core-link-frames.js.map +1 -0
  15. package/dist/core-link-socket.d.ts +54 -0
  16. package/dist/core-link-socket.d.ts.map +1 -0
  17. package/dist/core-link-socket.js +74 -0
  18. package/dist/core-link-socket.js.map +1 -0
  19. package/dist/core-link-transport.d.ts +177 -0
  20. package/dist/core-link-transport.d.ts.map +1 -0
  21. package/dist/core-link-transport.js +432 -0
  22. package/dist/core-link-transport.js.map +1 -0
  23. package/dist/core-registration-blob.d.ts +52 -0
  24. package/dist/core-registration-blob.d.ts.map +1 -0
  25. package/dist/core-registration-blob.js +61 -0
  26. package/dist/core-registration-blob.js.map +1 -0
  27. package/dist/core-session.d.ts +321 -0
  28. package/dist/core-session.d.ts.map +1 -0
  29. package/dist/core-session.js +660 -0
  30. package/dist/core-session.js.map +1 -0
  31. package/dist/durable-core-client.d.ts +172 -0
  32. package/dist/durable-core-client.d.ts.map +1 -0
  33. package/dist/durable-core-client.js +264 -0
  34. package/dist/durable-core-client.js.map +1 -0
  35. package/dist/terminal-screen.d.ts +139 -0
  36. package/dist/terminal-screen.d.ts.map +1 -0
  37. package/dist/terminal-screen.js +807 -0
  38. package/dist/terminal-screen.js.map +1 -0
  39. package/package.json +51 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AgentSystem Labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # @actana/sdk
2
+
3
+ The Core client for [Actana Control](https://github.com/actana/control), and the
4
+ `core-link` wire protocol it speaks: frame schema, protocol version, codec,
5
+ transport.
6
+
7
+ A **Core** is a machine that runs AI coding sessions. This package is what talks
8
+ to one — over mutual TLS and a bearer token read from a registration blob. The
9
+ protocol ships with the client rather than beside it
10
+ ([ADR 0025](https://github.com/actana/control/blob/main/docs/adr/0025-the-protocol-ships-with-the-client.md)):
11
+ there is one definition of a frame, and it is here.
12
+
13
+ ```sh
14
+ npm install @actana/sdk
15
+ ```
16
+
17
+ Node **22 or newer**. Published as compiled JavaScript with type declarations
18
+ beside it, with
19
+ [provenance](https://docs.npmjs.com/generating-provenance-statements) — every
20
+ release is attested to the workflow and the commit that built it.
21
+
22
+ ## Two layers, one socket
23
+
24
+ ```js
25
+ import { CoreClient } from "@actana/sdk/core-client";
26
+ import { CoreSession } from "@actana/sdk/core-session";
27
+
28
+ const client = CoreClient.fromRegistrationBlob(blob, { connectTimeoutMs: 15_000 });
29
+ const info = await client.connect();
30
+
31
+ const session = await CoreSession.start(client, {
32
+ projectId,
33
+ cwd,
34
+ harness: "claude-code",
35
+ prompt: "summarise this repo",
36
+ });
37
+ await session.waitForIdle({ timeoutMs: 300_000 });
38
+ console.log(session.screen());
39
+ ```
40
+
41
+ - **Transport** — `@actana/sdk/core-client` connects, authenticates, correlates
42
+ requests to responses, and surfaces the unsolicited streams. `@actana/sdk/durable-core-client`
43
+ is the same surface with heartbeats, reconnection with backoff, and an event
44
+ cursor, for a long-lived consumer.
45
+ - **Session** — `@actana/sdk/core-session` starts a session, waits for its
46
+ Harness to come up, delivers a prompt, and reads the result.
47
+
48
+ I/O is programmatic and never a TTY: `send(text)`, `onData(…)`, `screen()`.
49
+ Raw mode and terminal handling belong to a terminal program — see `@actana/cli`.
50
+
51
+ `packages/sdk/examples/start-a-session.mjs` in the repository is a complete
52
+ plain-Node script, start to finish.
53
+
54
+ ## Versioning
55
+
56
+ One version line across the Core, the Panel, this SDK and the CLI, published on
57
+ the same tag that builds the container images. Pre-1.0, **each minor is the
58
+ breaking-change unit** — a patch never changes a shape.
59
+
60
+ `CORE_LINK_PROTOCOL_VERSION` is a separate number with its own compatibility
61
+ rule, exported from `@actana/sdk/core-link-frames`. A Core and a client
62
+ negotiate on it at connect time; it does not move with the package version.
63
+
64
+ ## License
65
+
66
+ MIT — see [LICENSE](https://github.com/actana/control/blob/main/LICENSE).