@bike4mind/cli 0.2.20-feat-cli-skill-tool.18038 → 0.2.20-feat-openai-video-generation.18038

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-2ETI3GBK.js";
4
+ } from "./chunk-PNNNV22R.js";
5
5
 
6
6
  // ../../b4m-core/packages/services/dist/src/notebookCurationService/artifactExtractor.js
7
7
  var ARTIFACT_TAG_REGEX = /<artifact\s+(.*?)>([\s\S]*?)<\/artifact>/gi;
@@ -40,8 +40,7 @@ var CliConfigSchema = z.object({
40
40
  autoSave: z.boolean(),
41
41
  theme: z.enum(["light", "dark"]),
42
42
  exportFormat: z.enum(["markdown", "json"]),
43
- maxIterations: z.number().nullable().default(10),
44
- enableSkillTool: z.boolean().optional().default(true)
43
+ maxIterations: z.number().nullable().default(10)
45
44
  }),
46
45
  tools: z.object({
47
46
  enabled: z.array(z.string()),
@@ -71,8 +70,7 @@ var ProjectConfigSchema = z.object({
71
70
  temperature: z.number().optional(),
72
71
  autoSave: z.boolean().optional(),
73
72
  theme: z.enum(["light", "dark"]).optional(),
74
- exportFormat: z.enum(["markdown", "json"]).optional(),
75
- enableSkillTool: z.boolean().optional()
73
+ exportFormat: z.enum(["markdown", "json"]).optional()
76
74
  }).optional()
77
75
  });
78
76
  var ProjectLocalConfigSchema = z.object({
@@ -86,8 +84,7 @@ var ProjectLocalConfigSchema = z.object({
86
84
  temperature: z.number().optional(),
87
85
  autoSave: z.boolean().optional(),
88
86
  theme: z.enum(["light", "dark"]).optional(),
89
- exportFormat: z.enum(["markdown", "json"]).optional(),
90
- enableSkillTool: z.boolean().optional()
87
+ exportFormat: z.enum(["markdown", "json"]).optional()
91
88
  }).optional(),
92
89
  mcpServers: z.array(
93
90
  z.object({
@@ -114,8 +111,7 @@ var DEFAULT_CONFIG = {
114
111
  autoSave: true,
115
112
  theme: "dark",
116
113
  exportFormat: "markdown",
117
- maxIterations: 10,
118
- enableSkillTool: true
114
+ maxIterations: 10
119
115
  },
120
116
  tools: {
121
117
  enabled: [],
@@ -6,12 +6,12 @@ import {
6
6
  getSettingsByNames,
7
7
  obfuscateApiKey,
8
8
  secureParameters
9
- } from "./chunk-YVPQAC2Z.js";
9
+ } from "./chunk-WB2XWAIO.js";
10
10
  import {
11
11
  ApiKeyType,
12
12
  MementoTier,
13
13
  isSupportedEmbeddingModel
14
- } from "./chunk-2ETI3GBK.js";
14
+ } from "./chunk-PNNNV22R.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
17
17
  import { z } from "zod";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BadRequestError,
4
4
  secureParameters
5
- } from "./chunk-YVPQAC2Z.js";
5
+ } from "./chunk-WB2XWAIO.js";
6
6
  import {
7
7
  CompletionApiUsageTransaction,
8
8
  GenericCreditDeductTransaction,
@@ -10,8 +10,9 @@ import {
10
10
  ImageGenerationUsageTransaction,
11
11
  RealtimeVoiceUsageTransaction,
12
12
  TextGenerationUsageTransaction,
13
- TransferCreditTransaction
14
- } from "./chunk-2ETI3GBK.js";
13
+ TransferCreditTransaction,
14
+ VideoGenerationUsageTransaction
15
+ } from "./chunk-PNNNV22R.js";
15
16
 
16
17
  // ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
17
18
  import { z } from "zod";
@@ -19,6 +20,7 @@ var SubtractCreditsSchema = z.discriminatedUnion("type", [
19
20
  GenericCreditDeductTransaction.omit({ createdAt: true, updatedAt: true }),
20
21
  TextGenerationUsageTransaction.omit({ createdAt: true, updatedAt: true }),
21
22
  ImageGenerationUsageTransaction.omit({ createdAt: true, updatedAt: true }),
23
+ VideoGenerationUsageTransaction.omit({ createdAt: true, updatedAt: true }),
22
24
  RealtimeVoiceUsageTransaction.omit({ createdAt: true, updatedAt: true }),
23
25
  ImageEditUsageTransaction.omit({ createdAt: true, updatedAt: true }),
24
26
  CompletionApiUsageTransaction.omit({ createdAt: true, updatedAt: true }),
@@ -103,6 +105,18 @@ async function subtractCredits(parameters, { db, creditHolderMethods, skipBalanc
103
105
  questId: params.questId,
104
106
  sessionId: params.sessionId
105
107
  });
108
+ } else if (type === "video_generation_usage") {
109
+ await db.creditTransactions.createTransaction("video_generation_usage", {
110
+ ownerId,
111
+ ownerType,
112
+ credits: -Math.abs(credits),
113
+ // Negative for usage
114
+ description: description || "Video generation usage",
115
+ metadata,
116
+ model: params.model,
117
+ questId: params.questId,
118
+ sessionId: params.sessionId
119
+ });
106
120
  } else if (type === "transfer_credit") {
107
121
  await db.creditTransactions.createTransaction("transfer_credit", {
108
122
  ownerId,