@nikcli-ai/sdk 1.280.0 → 1.282.0

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/server.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { spawn } from "node:child_process";
2
+ import { createNikcliClient } from "./httpapi/client.js";
2
3
  export async function createNikcliServer(options) {
3
4
  options = Object.assign({
4
5
  hostname: "127.0.0.1",
@@ -64,6 +65,14 @@ export async function createNikcliServer(options) {
64
65
  },
65
66
  };
66
67
  }
68
+ /** Starts a local `nikcli serve` and returns a client bound to it. */
69
+ export async function createNikcli(options) {
70
+ const server = await createNikcliServer(options);
71
+ return {
72
+ client: createNikcliClient({ baseUrl: server.url }),
73
+ server,
74
+ };
75
+ }
67
76
  export function createNikcliTui(options) {
68
77
  const args = [];
69
78
  if (options?.project) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@nikcli-ai/sdk",
4
- "version": "1.280.0",
4
+ "version": "1.282.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {