@deksden-com/cpa-kit 0.1.5 → 0.1.6
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/CHANGELOG.md +6 -0
- package/README.md +5 -0
- package/dist/contracts/index.d.ts +6 -6
- package/package.json +2 -1
- package/skills/cpa-kit/SKILL.md +20 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -21,6 +21,11 @@ const status = await client.status();
|
|
|
21
21
|
backend и authorization. Import не запускает процесс, worker или таймеры.
|
|
22
22
|
Секреты, маршруты, supervised worker и maintenance/drain принадлежат приложению.
|
|
23
23
|
|
|
24
|
+
Skill интеграции для Codex и совместимых агентов включён в пакет:
|
|
25
|
+
скопируйте `node_modules/@deksden-com/cpa-kit/skills/cpa-kit` в
|
|
26
|
+
`.agents/skills/cpa-kit` проекта. Установку с фиксацией ревизии и обновление
|
|
27
|
+
описано в [README репозитория](https://github.com/deksden-com/dd-cpa-kit#с-чего-начать).
|
|
28
|
+
|
|
24
29
|
- [Индекс документации](https://github.com/deksden-com/dd-cpa-kit/blob/main/docs/index.md): рецепты интеграции и API.
|
|
25
30
|
- [Обновления и соединения](https://github.com/deksden-com/dd-cpa-kit/blob/main/docs/operations.md): безопасная остановка, drain, rollback и cleanup.
|
|
26
31
|
|
|
@@ -360,10 +360,10 @@ declare const acceptSchema: z.ZodObject<{
|
|
|
360
360
|
apiVersion: z.ZodLiteral<1>;
|
|
361
361
|
operationId: z.ZodString;
|
|
362
362
|
state: z.ZodEnum<{
|
|
363
|
-
queued: "queued";
|
|
364
363
|
running: "running";
|
|
365
|
-
succeeded: "succeeded";
|
|
366
364
|
failed: "failed";
|
|
365
|
+
queued: "queued";
|
|
366
|
+
succeeded: "succeeded";
|
|
367
367
|
cancelled: "cancelled";
|
|
368
368
|
partially_applied: "partially_applied";
|
|
369
369
|
recovery_required: "recovery_required";
|
|
@@ -390,10 +390,10 @@ declare const operationSchema: z.ZodObject<{
|
|
|
390
390
|
}>;
|
|
391
391
|
actorId: z.ZodString;
|
|
392
392
|
state: z.ZodEnum<{
|
|
393
|
-
queued: "queued";
|
|
394
393
|
running: "running";
|
|
395
|
-
succeeded: "succeeded";
|
|
396
394
|
failed: "failed";
|
|
395
|
+
queued: "queued";
|
|
396
|
+
succeeded: "succeeded";
|
|
397
397
|
cancelled: "cancelled";
|
|
398
398
|
partially_applied: "partially_applied";
|
|
399
399
|
recovery_required: "recovery_required";
|
|
@@ -504,8 +504,8 @@ declare const statusSchema: z.ZodObject<{
|
|
|
504
504
|
}>;
|
|
505
505
|
version: z.ZodNullable<z.ZodString>;
|
|
506
506
|
state: z.ZodEnum<{
|
|
507
|
-
running: "running";
|
|
508
507
|
unknown: "unknown";
|
|
508
|
+
running: "running";
|
|
509
509
|
stopped: "stopped";
|
|
510
510
|
}>;
|
|
511
511
|
}, z.core.$strict>;
|
|
@@ -525,9 +525,9 @@ declare const statusSchema: z.ZodObject<{
|
|
|
525
525
|
stale: "stale";
|
|
526
526
|
}>;
|
|
527
527
|
probeState: z.ZodEnum<{
|
|
528
|
-
failed: "failed";
|
|
529
528
|
unknown: "unknown";
|
|
530
529
|
passed: "passed";
|
|
530
|
+
failed: "failed";
|
|
531
531
|
}>;
|
|
532
532
|
checkedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
533
533
|
}, z.core.$strict>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deksden-com/cpa-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Embeddable CPA administration mechanisms",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
39
|
"dist",
|
|
40
|
+
"skills",
|
|
40
41
|
"README.md",
|
|
41
42
|
"CHANGELOG.md",
|
|
42
43
|
"NOTICE"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cpa-kit
|
|
3
|
+
description: Integrate or operate CPA Kit in a Node.js application, including its protected admin API, supervised worker, credential import and optional React console. Use when working with @deksden-com/cpa-kit or its host integration; not for ordinary inference API calls.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CPA Kit integration
|
|
7
|
+
|
|
8
|
+
CPA Kit embeds CLIProxyAPI administration into a host application. It is not a CPA server, login system, or inference SDK. Inspect the host's existing integration, deployment, and installed package versions before changing it; preserve its authentication, settings and operational contracts.
|
|
9
|
+
|
|
10
|
+
- Install `@deksden-com/cpa-kit` from public npm. Add `@deksden-com/cpa-kit-react` only for UI, with matching exact core peer and React / React DOM 19.2.x. The host runs Node >=22.23.2. Import browser-safe types from the package root or `/contracts`, the host HTTP client from `/client`, and server-only adapters from `/server`; never bundle server exports or secrets into the browser.
|
|
11
|
+
- Select only capabilities the host can actually provide. The read-only backend is suitable for a remote inference endpoint; file authorization management and core switching require the documented lifecycle, durable stores, authorization and maintenance adapters. Kit never installs or starts CPA as an import side effect.
|
|
12
|
+
- Expose the documented host-owned HTTP routes behind authentication, per-instance authorization and CSRF/origin and rate-limit protection for mutations. Actor identity comes from the server session. Sanitize errors and logs. HTTP 202 means queued, not completed; the UI polls operation state.
|
|
13
|
+
- Run a supervised worker per instance with shared durable journal, staging and model cache. Recover operations before consuming the queue, execute accepted operations outside the request, and run staging cleanup periodically. For multi-process or multi-host deployments use compatible shared coordination; local POSIX file locks are not a distributed lock.
|
|
14
|
+
- For imports, enforce matching request and staging upload limits. Keep entry, decompression and parsing limits independently bounded; allow multipart overhead at the HTTP layer and account for memory if buffering. Use upload → stage → preview → confirmed apply, preserve the intended merge/replace semantics, and reap temporary data. Never log credentials or retry an uncertain partial apply blindly.
|
|
15
|
+
- Before stopping or switching CPA or its managed auth files, close admission to all inference users and drain active requests including streams; verify health and rollback/recovery according to host capabilities. If drain or recovery cannot be assured, expose those capabilities as unavailable.
|
|
16
|
+
- The host creates its own AI SDK or HTTP inference client using the CPA endpoint and server-side secrets. The administrative `/client` is not the inference client.
|
|
17
|
+
|
|
18
|
+
Consult the maintained [integration guide](https://github.com/deksden-com/dd-cpa-kit/blob/main/docs/integration.md) for route mappings and examples, the [operations guide](https://github.com/deksden-com/dd-cpa-kit/blob/main/docs/operations.md) for safety and recovery, and the [contract](https://github.com/deksden-com/dd-cpa-kit/blob/main/docs/contract-v1.md) for schemas and limits. For host-specific behavior, installed package types and host configuration are authoritative; guides on `main` can describe a newer release.
|
|
19
|
+
|
|
20
|
+
After changes, test authentication and capability boundaries, worker recovery, temporary-file cleanup and the affected UI/API paths using synthetic data. Follow the host's deployment and test-isolation rules; do not run paid probes or change live credentials unless requested.
|