@coralai/sps-plugin-api 0.4.0 → 0.5.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/index.d.ts +41 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -94,6 +94,45 @@ export interface SpsPromptSection {
|
|
|
94
94
|
export interface SpsSystemPrompt {
|
|
95
95
|
section(section: SpsPromptSection): () => void;
|
|
96
96
|
}
|
|
97
|
+
/** 建一张卡。形状照 MCP 面上的 `add_card`,不另发明。 */
|
|
98
|
+
export interface SpsNewCard {
|
|
99
|
+
title: string;
|
|
100
|
+
description?: string;
|
|
101
|
+
skills?: string[];
|
|
102
|
+
/** `['AI-PIPELINE']` 让它走流水线;缺省不走。 */
|
|
103
|
+
labels?: string[];
|
|
104
|
+
/** 执行波次(正整数)。缺省 = seq(串行)。 */
|
|
105
|
+
order?: number;
|
|
106
|
+
/** 只接受 `'tool' | 'join'`;缺省即 worker。 */
|
|
107
|
+
kind?: 'tool' | 'join';
|
|
108
|
+
tool?: string;
|
|
109
|
+
input?: Record<string, unknown>;
|
|
110
|
+
checklist?: string[];
|
|
111
|
+
}
|
|
112
|
+
export interface SpsCardRef {
|
|
113
|
+
seq: number;
|
|
114
|
+
title: string;
|
|
115
|
+
state: string;
|
|
116
|
+
order: number;
|
|
117
|
+
labels: string[];
|
|
118
|
+
skills: string[];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* 卡片(**建 / 列**)。
|
|
122
|
+
*
|
|
123
|
+
* 🔴 它存在的理由是"知识住哪":按你自己的规则建卡(几张、什么内容),
|
|
124
|
+
* 而 sps **不必认识那些规则**。你在进程内,读工作区文件直接用 fs,
|
|
125
|
+
* 不需要 sps 开 HTTP 读口、也不需要一张越长越长的文件白名单。
|
|
126
|
+
*
|
|
127
|
+
* ⚠️ **幂等归你**:建卡天然不幂等(建两次就是两张),而"什么算重复"只有你知道。
|
|
128
|
+
* 用 `list` 自己判 —— 别指望这一层替你去重。
|
|
129
|
+
* ⚠️ 不开 move / delete:那些是流水线在做的事,掺进来就有两个写入方。
|
|
130
|
+
*/
|
|
131
|
+
export interface SpsCards {
|
|
132
|
+
/** 失败**抛**(建卡没成功而静默返回,你会以为建好了)。 */
|
|
133
|
+
create(project: string, card: SpsNewCard): Promise<SpsCardRef>;
|
|
134
|
+
list(project: string): Promise<SpsCardRef[]>;
|
|
135
|
+
}
|
|
97
136
|
/**
|
|
98
137
|
* 一个项目的**身份**信息。
|
|
99
138
|
*
|
|
@@ -248,6 +287,7 @@ export declare const SPS_SERVICES: {
|
|
|
248
287
|
readonly llm: "sps.llm";
|
|
249
288
|
readonly events: "sps.events";
|
|
250
289
|
readonly projects: "sps.projects";
|
|
290
|
+
readonly cards: "sps.cards";
|
|
251
291
|
readonly subprocess: "sps.subprocess";
|
|
252
292
|
readonly attachments: "sps.attachments";
|
|
253
293
|
readonly media: "sps.media";
|
|
@@ -268,6 +308,7 @@ export interface SpsPluginContext {
|
|
|
268
308
|
'sps.llm': SpsLlm;
|
|
269
309
|
'sps.events': SpsEvents;
|
|
270
310
|
'sps.projects': SpsProjects;
|
|
311
|
+
'sps.cards': SpsCards;
|
|
271
312
|
'sps.subprocess': SpsSubprocess;
|
|
272
313
|
'sps.attachments': SpsAttachments;
|
|
273
314
|
}
|
package/dist/index.js
CHANGED