@artflo-ai/artflo-openclaw-plugin 0.0.7 → 0.0.8
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.
|
@@ -457,7 +457,15 @@ export function registerArtfloTools(api, context) {
|
|
|
457
457
|
api.registerTool({
|
|
458
458
|
name: ARTFLO_TOOL_NAMES.listModels,
|
|
459
459
|
label: 'Artflo Canvas List Models',
|
|
460
|
-
description: 'List all available AI models
|
|
460
|
+
description: 'List all available AI models. When presenting results to the user, you MUST show ALL of these fields in a table: ' +
|
|
461
|
+
'1) Model name (use model_name, NEVER expose model_key to user) ' +
|
|
462
|
+
'2) Credits (base price; if resolutionPricing exists, show per-resolution prices) ' +
|
|
463
|
+
'3) Supported resolutions ' +
|
|
464
|
+
'4) Supported ratios ' +
|
|
465
|
+
'5) Subscription required (if only certain resolutions require subscription via multi_subscribe, specify which ones) ' +
|
|
466
|
+
'6) Default model marker ' +
|
|
467
|
+
'7) Supported durations (video models only). ' +
|
|
468
|
+
'Do NOT omit any of these fields. Video model credits are per-second.',
|
|
461
469
|
parameters: Type.Object({
|
|
462
470
|
canvasId: Type.String({ minLength: 1 }),
|
|
463
471
|
category: Type.Optional(Type.String({
|
|
@@ -508,7 +516,7 @@ export function registerArtfloTools(api, context) {
|
|
|
508
516
|
return [
|
|
509
517
|
label,
|
|
510
518
|
{
|
|
511
|
-
credits:
|
|
519
|
+
credits: `${price} credits`,
|
|
512
520
|
...(needsSub ? { requiresSubscription: true } : {}),
|
|
513
521
|
},
|
|
514
522
|
];
|
|
@@ -520,9 +528,7 @@ export function registerArtfloTools(api, context) {
|
|
|
520
528
|
isDefault: m.is_default,
|
|
521
529
|
requiresSubscription: m.subscribe_available,
|
|
522
530
|
available: modelAvailable,
|
|
523
|
-
|
|
524
|
-
? `${m.price} credits/sec`
|
|
525
|
-
: `${m.price} credits`,
|
|
531
|
+
maxCredits: `${m.price} credits`,
|
|
526
532
|
};
|
|
527
533
|
if (m.support_resolution?.length) {
|
|
528
534
|
item.supportedResolutions = m.support_resolution;
|
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@ metadata:
|
|
|
34
34
|
> 请登录 [artflo.ai](https://artflo.ai),在设置页面获取 API Key,然后直接发给我,我帮你配置好。
|
|
35
35
|
|
|
36
36
|
3. 当用户发来 API Key 后,调用 `artflo_set_api_key` 工具保存到配置中。
|
|
37
|
-
4. 保存成功后,gateway
|
|
37
|
+
4. 保存成功后,gateway 会自动重新加载配置。**告诉用户配置已保存,需要等待约 10 秒让 gateway 重载完成,然后开始新会话(/new)再继续操作。** 不要在当前会话中立即调用其他 Artflo 工具,因为 gateway 重载期间旧的 config(没有 API Key)仍在内存中。
|
|
38
38
|
|
|
39
39
|
## 操作策略
|
|
40
40
|
|
|
@@ -50,6 +50,16 @@ metadata:
|
|
|
50
50
|
- **禁止编造 API URL**:不要自行拼接或猜测 Artflo API 路径。所有 API 交互必须通过插件提供的 tool 完成(如 `artflo_canvas_get_last`、`artflo_canvas_create`、`artflo_upload_file` 等)。不要使用 `fetch` 或 `curl` 直接调用 Artflo API。
|
|
51
51
|
- **model_key 保密**:`model_key`(如 `Praline_2`、`ToffeeV1-Lite`)是内部标识,仅供构建 plan 使用。向用户展示模型时只使用 `model_name`(显示名称),绝不向用户暴露 `model_key`。
|
|
52
52
|
- **资源保存路径**:画布生成完成后需要下载保存的资源(图片、视频等),必须保存到 `/artflo/outbound` 目录。不要使用 `/tmp` 或其他临时目录。
|
|
53
|
+
- **环境设置保密**:不要主动向用户提及或暴露环境切换功能(release/test)。只有当用户明确提到要切换环境、设置 test 环境时,才使用 `artflo_set_api_key` 的 `env` 参数。
|
|
54
|
+
- **品牌名称规范**:产品名称是 **Artflo**(A 大写,其余小写)。不要写成 ArtFlo、ARTFLO、artFlo 或其他变体。所有面向用户的文字中必须使用正确的大小写。
|
|
55
|
+
- **模型列表展示规范**:当用户查看模型列表时,必须展示以下字段,不要省略:
|
|
56
|
+
- 模型名(model_name,不是 model_key)
|
|
57
|
+
- 积分消耗(基础价格;如有按分辨率差异化价格则展示各分辨率价格)
|
|
58
|
+
- 支持的分辨率
|
|
59
|
+
- 支持的比例
|
|
60
|
+
- 是否需要订阅(如果只有部分分辨率需要订阅,要明确标注哪些分辨率需要订阅)
|
|
61
|
+
- 是否默认模型
|
|
62
|
+
- 支持的时长(仅视频模型)
|
|
53
63
|
- 当插件布局引擎可用时,不要手工编造节点坐标。
|
|
54
64
|
|
|
55
65
|
## 默认编辑规则
|