Selaa lähdekoodia

chore: publish to npm as @actalk/inkos, update install instructions

- Rename @inkos/core to @actalk/inkos-core
- Rename inkos CLI to @actalk/inkos (npm rejected unscoped name)
- Update all imports from @inkos/core to @actalk/inkos-core
- Update README install: npm i -g @actalk/inkos
- Add .npmrc to .gitignore
- Published @actalk/inkos-core@0.1.0 and @actalk/inkos@0.1.0
majx_mac 8 kuukautta sitten
vanhempi
commit
e2294b6551

+ 1 - 0
.gitignore

@@ -2,6 +2,7 @@ node_modules/
 dist/
 .env
 .env.local
+.npmrc
 *.tgz
 .DS_Store
 coverage/

+ 3 - 18
README.en.md

@@ -78,34 +78,19 @@ The Continuity Auditor checks every draft against these files. If a character "r
 ### Install
 
 ```bash
-git clone https://github.com/Narcooo/inkos.git
-cd inkos
-pnpm install
-pnpm build
+npm i -g @actalk/inkos
 ```
 
 ### Configure
 
 ```bash
-cp .env.example .env
-```
-
-```env
-OPENAI_API_KEY=sk-your-key-here
-OPENAI_BASE_URL=https://api.openai.com/v1   # or any compatible endpoint
-OPENAI_MODEL=gpt-4o
-
-# Optional: notifications
-TELEGRAM_BOT_TOKEN=
-TELEGRAM_CHAT_ID=
-FEISHU_WEBHOOK_URL=
-WECOM_WEBHOOK_URL=
+inkos init              # Initialize project, generates .env template
+# Edit .env with your API key (any OpenAI-compatible endpoint)
 ```
 
 ### Create Your First Book
 
 ```bash
-inkos init              # Initialize project
 inkos book create       # Create a new book (interactive)
 inkos write next        # Write next chapter (full agent pipeline)
 inkos review            # Review the latest draft

+ 3 - 18
README.md

@@ -85,34 +85,19 @@ InkOS 为每一章运行多智能体管线:
 ### 安装
 
 ```bash
-git clone https://github.com/Narcooo/inkos.git
-cd inkos
-pnpm install
-pnpm build
+npm i -g @actalk/inkos
 ```
 
 ### 配置
 
 ```bash
-cp .env.example .env
-```
-
-```env
-OPENAI_API_KEY=sk-your-key-here
-OPENAI_BASE_URL=https://api.openai.com/v1   # 或任何兼容端点
-OPENAI_MODEL=gpt-4o
-
-# 可选:通知推送
-TELEGRAM_BOT_TOKEN=
-TELEGRAM_CHAT_ID=
-FEISHU_WEBHOOK_URL=
-WECOM_WEBHOOK_URL=
+inkos init              # 初始化项目,生成 .env 模板
+# 编辑 .env,填入你的 API Key(支持所有 OpenAI 兼容接口)
 ```
 
 ### 使用
 
 ```bash
-inkos init              # 初始化项目
 inkos book create       # 创建新书(交互式,生成世界观+卷纲+文风指南)
 inkos write next        # 写下一章(完整五 agent 管线)
 inkos write rewrite <n> # 重写第 N 章(恢复状态快照后重新生成)

+ 9 - 2
packages/cli/package.json

@@ -1,11 +1,18 @@
 {
-  "name": "inkos",
+  "name": "@actalk/inkos",
   "version": "0.1.0",
   "description": "InkOS CLI — multi-agent novel production system",
   "type": "module",
   "bin": {
     "inkos": "dist/index.js"
   },
+  "files": ["dist"],
+  "license": "MIT",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/Narcooo/inkos.git",
+    "directory": "packages/cli"
+  },
   "scripts": {
     "build": "tsc",
     "dev": "tsc --watch",
@@ -13,7 +20,7 @@
     "typecheck": "tsc --noEmit"
   },
   "dependencies": {
-    "@inkos/core": "workspace:*",
+    "@actalk/inkos-core": "workspace:*",
     "commander": "^13.0.0",
     "chalk": "^5.4.0",
     "ora": "^8.2.0",

+ 1 - 1
packages/cli/src/commands/book.ts

@@ -1,5 +1,5 @@
 import { Command } from "commander";
-import { PipelineRunner, StateManager, type BookConfig } from "@inkos/core";
+import { PipelineRunner, StateManager, type BookConfig } from "@actalk/inkos-core";
 import { loadConfig, createClient, findProjectRoot, log, logError } from "../utils.js";
 
 export const bookCommand = new Command("book")

+ 1 - 1
packages/cli/src/commands/daemon.ts

@@ -1,5 +1,5 @@
 import { Command } from "commander";
-import { Scheduler, createLLMClient } from "@inkos/core";
+import { Scheduler, createLLMClient } from "@actalk/inkos-core";
 import { loadConfig, findProjectRoot, log, logError } from "../utils.js";
 import { writeFile, readFile, unlink } from "node:fs/promises";
 import { join } from "node:path";

+ 1 - 1
packages/cli/src/commands/doctor.ts

@@ -50,7 +50,7 @@ export const doctorCommand = new Command("doctor")
 
     // 5. Check books directory
     try {
-      const { StateManager } = await import("@inkos/core");
+      const { StateManager } = await import("@actalk/inkos-core");
       const state = new StateManager(root);
       const books = await state.listBooks();
       checks.push({

+ 1 - 1
packages/cli/src/commands/export.ts

@@ -1,5 +1,5 @@
 import { Command } from "commander";
-import { StateManager } from "@inkos/core";
+import { StateManager } from "@actalk/inkos-core";
 import { readFile, writeFile } from "node:fs/promises";
 import { join } from "node:path";
 import { findProjectRoot, log, logError } from "../utils.js";

+ 1 - 1
packages/cli/src/commands/radar.ts

@@ -1,5 +1,5 @@
 import { Command } from "commander";
-import { PipelineRunner } from "@inkos/core";
+import { PipelineRunner } from "@actalk/inkos-core";
 import { loadConfig, createClient, findProjectRoot, log, logError } from "../utils.js";
 import { writeFile, mkdir } from "node:fs/promises";
 import { join } from "node:path";

+ 1 - 1
packages/cli/src/commands/review.ts

@@ -1,5 +1,5 @@
 import { Command } from "commander";
-import { StateManager } from "@inkos/core";
+import { StateManager } from "@actalk/inkos-core";
 import { findProjectRoot, log, logError } from "../utils.js";
 
 export const reviewCommand = new Command("review")

+ 1 - 1
packages/cli/src/commands/status.ts

@@ -1,5 +1,5 @@
 import { Command } from "commander";
-import { StateManager } from "@inkos/core";
+import { StateManager } from "@actalk/inkos-core";
 import { findProjectRoot, log, logError } from "../utils.js";
 
 export const statusCommand = new Command("status")

+ 1 - 1
packages/cli/src/commands/write.ts

@@ -1,5 +1,5 @@
 import { Command } from "commander";
-import { PipelineRunner, StateManager } from "@inkos/core";
+import { PipelineRunner, StateManager } from "@actalk/inkos-core";
 import { readdir, unlink } from "node:fs/promises";
 import { join } from "node:path";
 import { loadConfig, createClient, findProjectRoot, log, logError } from "../utils.js";

+ 1 - 1
packages/cli/src/utils.ts

@@ -1,7 +1,7 @@
 import { readFile } from "node:fs/promises";
 import { join, resolve } from "node:path";
 import { config as loadEnv } from "dotenv";
-import { createLLMClient, type ProjectConfig, ProjectConfigSchema } from "@inkos/core";
+import { createLLMClient, type ProjectConfig, ProjectConfigSchema } from "@actalk/inkos-core";
 
 export function findProjectRoot(): string {
   return process.cwd();

+ 8 - 1
packages/core/package.json

@@ -1,5 +1,5 @@
 {
-  "name": "@inkos/core",
+  "name": "@actalk/inkos-core",
   "version": "0.1.0",
   "description": "InkOS core: models, agents, pipeline, LLM integration",
   "type": "module",
@@ -11,6 +11,13 @@
       "import": "./dist/index.js"
     }
   },
+  "files": ["dist"],
+  "license": "MIT",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/Narcooo/inkos.git",
+    "directory": "packages/core"
+  },
   "scripts": {
     "build": "tsc",
     "dev": "tsc --watch",

+ 1 - 1
pnpm-lock.yaml

@@ -10,7 +10,7 @@ importers:
 
   packages/cli:
     dependencies:
-      '@inkos/core':
+      '@actalk/inkos-core':
         specifier: workspace:*
         version: link:../core
       chalk: