@kevisual/cnb 0.0.36 → 0.0.39
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/agent/app.ts +30 -12
- package/agent/main.ts +18 -0
- package/agent/modules/cnb-manager.ts +115 -0
- package/agent/opencode.ts +1 -1
- package/agent/routes/cnb-board/cnb-dev-env.ts +5 -15
- package/agent/routes/cnb-board/index.ts +3 -2
- package/agent/routes/cnb-env/check.ts +3 -2
- package/agent/routes/cnb-env/env.ts +5 -3
- package/agent/routes/cnb-env/vscode.ts +5 -3
- package/agent/routes/cnb-manager/index.ts +48 -0
- package/agent/routes/index.ts +8 -0
- package/agent/routes/issues/issue.ts +5 -3
- package/agent/routes/issues/list.ts +3 -2
- package/agent/routes/knowledge/ai.ts +5 -3
- package/agent/routes/repo/list.ts +3 -2
- package/agent/routes/repo/repo.ts +8 -5
- package/agent/routes/share/index.ts +2 -2
- package/agent/routes/workspace/index.ts +12 -6
- package/agent/routes/workspace/keep.ts +20 -17
- package/agent/routes/workspace/skills.ts +3 -2
- package/dist/cli.js +16393 -3873
- package/dist/keep.js +34 -16
- package/dist/opencode.js +19053 -6534
- package/dist/routes.d.ts +29 -54
- package/dist/routes.js +16350 -3830
- package/package.json +14 -6
- package/mod.ts +0 -1
- /package/agent/{command.ts → commander.ts} +0 -0
package/dist/routes.d.ts
CHANGED
|
@@ -741,63 +741,38 @@ declare class CNB extends CNBCore {
|
|
|
741
741
|
setCookie(cookie: string): void;
|
|
742
742
|
}
|
|
743
743
|
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
REDIS_USER?: string;
|
|
752
|
-
POSTGRES_HOST?: string;
|
|
753
|
-
POSTGRES_PORT?: string;
|
|
754
|
-
POSTGRES_PASSWORD?: string;
|
|
755
|
-
POSTGRES_USER?: string;
|
|
756
|
-
POSTGRES_DB?: string;
|
|
757
|
-
MONGO_URI?: string;
|
|
758
|
-
DATABASE_URL?: string;
|
|
759
|
-
MINIO_ENDPOINT?: string;
|
|
760
|
-
MINIO_BUCKET_NAME?: string;
|
|
761
|
-
MINIO_ACCESS_KEY?: string;
|
|
762
|
-
MINIO_SECRET_KEY?: string;
|
|
763
|
-
MINIO_USE_SSL?: string;
|
|
764
|
-
S3_ACCESS_KEY_ID?: string;
|
|
765
|
-
S3_SECRET_ACCESS_KEY?: string;
|
|
766
|
-
S3_REGION?: string;
|
|
767
|
-
S3_BUCKET_NAME?: string;
|
|
768
|
-
S3_ENDPOINT?: string;
|
|
769
|
-
S3_FORCE_PATH_STYLE?: string;
|
|
770
|
-
KEVISUAL_TOKEN?: string;
|
|
771
|
-
KEVISUAL_API_URL?: string;
|
|
772
|
-
KEVISUAL_NEW_API_KEY?: string;
|
|
773
|
-
BAILIAN_API_KEY?: string;
|
|
774
|
-
ZHIPU_API_KEY?: string;
|
|
775
|
-
MINIMAX_API_KEY?: string;
|
|
776
|
-
VOLCENGINE_API_KEY?: string;
|
|
777
|
-
BAILIAN_CODE_API_KEY?: string;
|
|
778
|
-
JIMENG_API_URL?: string;
|
|
779
|
-
JIMENG_API_KEY?: string;
|
|
780
|
-
JIMENG_TIMEOUT?: string;
|
|
781
|
-
OPENCODE_URL?: string;
|
|
782
|
-
OPENCODE_API_KEY?: string;
|
|
783
|
-
OPENCODE_SERVER_PASSWORD?: string;
|
|
784
|
-
OPENCODE_SERVER_USERNAME?: string;
|
|
785
|
-
FEISHU_NOTIFY_WEBHOOK_URL?: string;
|
|
786
|
-
NOCODB_URL?: string;
|
|
787
|
-
NOCODB_API_KEY?: string;
|
|
788
|
-
MEILISEARCH_URL?: string;
|
|
789
|
-
MEILISEARCH_API_KEY?: string;
|
|
790
|
-
POCKETBASE_URL?: string;
|
|
791
|
-
POCKETBASE_TOKEN?: string;
|
|
792
|
-
CNB_TOKEN?: string;
|
|
793
|
-
CNB_API_KEY?: string;
|
|
794
|
-
CNB_COOKIE?: string;
|
|
795
|
-
CNB_REPO_SLUG?: string;
|
|
796
|
-
KUBECONFIG_DATA?: string;
|
|
744
|
+
type CNBItem = {
|
|
745
|
+
username: string;
|
|
746
|
+
token: string;
|
|
747
|
+
cookie?: string;
|
|
748
|
+
runAt?: number;
|
|
749
|
+
owner?: boolean;
|
|
750
|
+
cnb: CNB;
|
|
797
751
|
};
|
|
752
|
+
declare class CNBManager {
|
|
753
|
+
cnbMap: Map<string, CNBItem>;
|
|
754
|
+
constructor();
|
|
755
|
+
getDefaultCNB(): CNBItem;
|
|
756
|
+
getCNB(opts?: {
|
|
757
|
+
username?: string;
|
|
758
|
+
kevisualToken?: string;
|
|
759
|
+
}): Promise<CNBItem | null>;
|
|
760
|
+
/**
|
|
761
|
+
* 通过上下文获取 CNB 实例(直接返回 cnb 对象)
|
|
762
|
+
* @param ctx
|
|
763
|
+
* @returns CNB 实例
|
|
764
|
+
*/
|
|
765
|
+
getContext(ctx: any): Promise<CNB>;
|
|
766
|
+
addCNB(opts: Partial<CNBItem>): CNBItem;
|
|
767
|
+
clearExpiredCNB(expireTime?: number): void;
|
|
768
|
+
clearUsername(username: string): void;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
declare const cnbManager: CNBManager;
|
|
798
772
|
declare const cnb: CNB;
|
|
799
773
|
declare const app: QueryRouterServer<{
|
|
800
774
|
[x: string]: any;
|
|
801
775
|
}>;
|
|
776
|
+
declare const notCNBCheck: (ctx: any) => boolean;
|
|
802
777
|
|
|
803
|
-
export { app, cnb,
|
|
778
|
+
export { app, cnb, cnbManager, notCNBCheck };
|