coxpit 5.11.0 → 5.12.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/LICENSE.md +717 -0
- package/README.md +5 -1
- package/package.json +2 -2
- package/src/cockpit.ts +333 -144
- package/src/server.ts +14 -0
- package/LICENSE +0 -21
package/src/server.ts
CHANGED
|
@@ -846,6 +846,20 @@ export async function buildServer(): Promise<FastifyInstance> {
|
|
|
846
846
|
return { task: tr[0], runs };
|
|
847
847
|
});
|
|
848
848
|
|
|
849
|
+
// 태스크 이름 변경(=세션 이름 변경). title 만 갱신.
|
|
850
|
+
app.patch('/api/tasks/:id', async (req, reply) => {
|
|
851
|
+
const id = Number((req.params as { id: string }).id);
|
|
852
|
+
const b = (req.body ?? {}) as { title?: string };
|
|
853
|
+
const title = (b.title ?? '').trim();
|
|
854
|
+
if (!title) return reply.code(400).send({ error: 'title required' });
|
|
855
|
+
if (title.length > 140) return reply.code(400).send({ error: 'title too long (max 140)' });
|
|
856
|
+
const tr = await db.select().from(tasks).where(eq(tasks.id, id)).limit(1);
|
|
857
|
+
if (!tr[0]) return reply.code(404).send({ error: 'not found' });
|
|
858
|
+
await db.update(tasks).set({ title }).where(eq(tasks.id, id));
|
|
859
|
+
broadcast({ type: 'task', taskId: id, title });
|
|
860
|
+
return { ok: true, title };
|
|
861
|
+
});
|
|
862
|
+
|
|
849
863
|
// N개의 에이전트 run 을 만들고 각자 오케스트레이션 시작(fire-and-forget).
|
|
850
864
|
app.post('/api/tasks/:id/run', async (req, reply) => {
|
|
851
865
|
const id = Number((req.params as { id: string }).id);
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 gc.yang
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|