@cat-factory/server 0.323.0 → 0.324.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/app.d.ts.map +1 -1
- package/dist/app.js +5 -0
- package/dist/app.js.map +1 -1
- package/dist/modules/publicApi/PublicFragmentController.d.ts +4 -0
- package/dist/modules/publicApi/PublicFragmentController.d.ts.map +1 -0
- package/dist/modules/publicApi/PublicFragmentController.js +61 -0
- package/dist/modules/publicApi/PublicFragmentController.js.map +1 -0
- package/dist/modules/publicApi/boardProjection.d.ts.map +1 -1
- package/dist/modules/publicApi/boardProjection.js +4 -0
- package/dist/modules/publicApi/boardProjection.js.map +1 -1
- package/dist/modules/publicApi/fragmentCatalog.d.ts +47 -0
- package/dist/modules/publicApi/fragmentCatalog.d.ts.map +1 -0
- package/dist/modules/publicApi/fragmentCatalog.js +106 -0
- package/dist/modules/publicApi/fragmentCatalog.js.map +1 -0
- package/dist/modules/publicApi/openapiDocument.generated.d.ts +1 -1
- package/dist/modules/publicApi/openapiDocument.generated.d.ts.map +1 -1
- package/dist/modules/publicApi/openapiDocument.generated.js +1 -1
- package/dist/modules/publicApi/openapiDocument.generated.js.map +1 -1
- package/dist/modules/publicApi/taskCreation.d.ts +2 -0
- package/dist/modules/publicApi/taskCreation.d.ts.map +1 -1
- package/dist/modules/publicApi/taskCreation.js +20 -12
- package/dist/modules/publicApi/taskCreation.js.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapiDocument.generated.js","sourceRoot":"","sources":["../../../src/modules/publicApi/openapiDocument.generated.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,EAAE;AACF,0FAA0F;AAC1F,8FAA8F;AAC9F,8FAA8F;AAC9F,8EAA8E;AAE9E,MAAM,CAAC,MAAM,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"openapiDocument.generated.js","sourceRoot":"","sources":["../../../src/modules/publicApi/openapiDocument.generated.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,EAAE;AACF,0FAA0F;AAC1F,8FAA8F;AAC9F,8FAA8F;AAC9F,8EAA8E;AAE9E,MAAM,CAAC,MAAM,YAAY,GAAG,i+pwBAAi+pwB,CAAA"}
|
|
@@ -8,6 +8,8 @@ export interface PublicTaskCreationDeps {
|
|
|
8
8
|
taskTypeRegistry: ServerContainer['taskTypeRegistry'];
|
|
9
9
|
tasks: ServerContainer['tasks'];
|
|
10
10
|
documents: ServerContainer['documents'];
|
|
11
|
+
/** The merged best-practice catalog a named `fragmentIds` is checked against; absent ⇒ a 503. */
|
|
12
|
+
fragmentLibrary: ServerContainer['fragmentLibrary'];
|
|
11
13
|
logger: Logger;
|
|
12
14
|
}
|
|
13
15
|
/** Read the collaborators this module drives off the request's container. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskCreation.d.ts","sourceRoot":"","sources":["../../../src/modules/publicApi/taskCreation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"taskCreation.d.ts","sourceRoot":"","sources":["../../../src/modules/publicApi/taskCreation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAsCxD,4DAA4D;AAC5D,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IAC7C,iGAAiG;IACjG,gBAAgB,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAA;IACrD,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAA;IAC/B,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACvC,iGAAiG;IACjG,eAAe,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAA;IACnD,MAAM,EAAE,MAAM,CAAA;CACf;AAED,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,eAAe,GAAG,sBAAsB,CASnF;AAED;;;;;;;GAOG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,sBAAsB,EAC5B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,KAAK,CAAC,CAsDhB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UNATTRIBUTED_BLOCK_EDIT_AUTHORITY } from '@cat-factory/contracts';
|
|
2
2
|
import { releaseUnattachedTask, resolveDocuments } from './documentAttachment.js';
|
|
3
|
+
import { assertFragmentsResolvable } from './fragmentCatalog.js';
|
|
3
4
|
import { resolveTaskTypeFields } from './taskTypeFields.js';
|
|
4
5
|
import { resolveTicket } from './ticketLinkage.js';
|
|
5
6
|
/** Read the collaborators this module drives off the request's container. */
|
|
@@ -9,6 +10,7 @@ export function taskCreationDeps(container) {
|
|
|
9
10
|
taskTypeRegistry: container.taskTypeRegistry,
|
|
10
11
|
tasks: container.tasks,
|
|
11
12
|
documents: container.documents,
|
|
13
|
+
fragmentLibrary: container.fragmentLibrary,
|
|
12
14
|
logger: container.logger,
|
|
13
15
|
};
|
|
14
16
|
}
|
|
@@ -26,19 +28,25 @@ export async function createTaskWithAttachments(deps, workspaceId, serviceId, bo
|
|
|
26
28
|
// is a pure, deterministic refusal, so it must land ahead of the outbound ticket/document
|
|
27
29
|
// fetches, exactly like the container check below.
|
|
28
30
|
const taskTypeFields = resolveTaskTypeFields(body, deps.taskTypeRegistry);
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
31
|
+
// The container is checked before anything is fetched, read per workspace, or written, and
|
|
32
|
+
// UNCONDITIONALLY, not only when there is an outbound fetch to save. A `serviceId` that names
|
|
33
|
+
// nothing is the caller's most basic mistake, and every refusal that runs ahead of it answers a
|
|
34
|
+
// request about a service that does not exist by complaining about something else: a typo'd
|
|
35
|
+
// path carrying an unknown standard would come back `422 prompt_fragment_not_found`, telling the
|
|
36
|
+
// integrator its service was fine and sending it to fix the wrong end. `addServiceTask`
|
|
37
|
+
// re-applies the same rule (it is the one that must hold at the moment of the write); this moves
|
|
38
|
+
// the cheap, deterministic half of it in front of everything.
|
|
39
|
+
await deps.boardService.assertTaskContainer(workspaceId, serviceId);
|
|
40
|
+
// Then the standards: one the workspace does not resolve is refused before anything is fetched
|
|
41
|
+
// or written. See `fragmentCatalog.ts` for why the run path's "drop a stale id" is the wrong
|
|
42
|
+
// disposition for a list a caller just named.
|
|
43
|
+
await assertFragmentsResolvable(deps.fragmentLibrary, workspaceId, body.fragmentIds);
|
|
44
|
+
// `modelPresetId`, `riskPolicyId` and `fragmentIds` ride the spread because the public surface
|
|
45
|
+
// spells each exactly as `AddTaskInput` does, which is the ONE reason a spread is safe here and
|
|
46
|
+
// is pinned by `blockEditAuthority.coverage.spec.ts`. Whether the two PINS name a real row is
|
|
47
|
+
// `addServiceTask`'s to refuse, on the service where every other door reaches it too
|
|
48
|
+
// (`presetPinGuard.ts`); the standards were settled a few lines up, at this door.
|
|
33
49
|
const input = { ...rest, ...(taskTypeFields ? { taskTypeFields } : {}) };
|
|
34
|
-
if (ticket || documents?.length) {
|
|
35
|
-
// The container is checked FIRST because resolving a ticket or a source document is an
|
|
36
|
-
// outbound call to the workspace's own tracker/wiki: a bad `serviceId` should be answered by
|
|
37
|
-
// the 404 it could have had for free, not paid for with a live third-party fetch.
|
|
38
|
-
// `addServiceTask` re-applies the same rule (it is the one that must hold at the moment of the
|
|
39
|
-
// write); this only moves the cheap, deterministic half of it in front of the expensive work.
|
|
40
|
-
await deps.boardService.assertTaskContainer(workspaceId, serviceId);
|
|
41
|
-
}
|
|
42
50
|
const linkage = ticket ? await resolveTicket(deps, workspaceId, ticket) : null;
|
|
43
51
|
const attachment = documents?.length ? await resolveDocuments(deps, workspaceId, documents) : null;
|
|
44
52
|
// Unattributed by the same reading the headless RUN start gets (ADR 0037): an API key holds
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskCreation.js","sourceRoot":"","sources":["../../../src/modules/publicApi/taskCreation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAA;AAI1E,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"taskCreation.js","sourceRoot":"","sources":["../../../src/modules/publicApi/taskCreation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAA;AAI1E,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AA8ClD,6EAA6E;AAC7E,MAAM,UAAU,gBAAgB,CAAC,SAA0B;IACzD,OAAO;QACL,YAAY,EAAE,SAAS,CAAC,YAAY;QACpC,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;QAC5C,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,SAAS,EAAE,SAAS,CAAC,SAAS;QAC9B,eAAe,EAAE,SAAS,CAAC,eAAe;QAC1C,MAAM,EAAE,SA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4F;IAC5F,+FAA+F;IAC/F,qFAAqF;IACrF,qFAAqF;IACrF,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,cAAc,CAClD,WAAW,EACX,SAAS,EACT,KAAK,EACL,iCAAiC,CAClC,CAAA;IAED,IAAI,UAAU,EAAE,CAAC;QACf,0FAA0F;QAC1F,8FAA8F;QAC9F,gEAAgE;QAChE,IAAI,CAAC;YACH,MAAM,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QACnC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,qBAAqB,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,CAAA;YACxD,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;IACD,+FAA+F;IAC/F,wEAAwE;IACxE,IAAI,OAAO;QAAE,MAAM,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAC1C,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.324.0",
|
|
4
4
|
"description": "Runtime-neutral HTTP layer for the Agent Architecture Board: the Hono controllers, middleware (auth/authz/CORS/error), request helpers and the gateway seams shared by every deployment facade (Cloudflare Worker, Node service).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@cat-factory/agents": "0.
|
|
28
|
-
"@cat-factory/contracts": "0.
|
|
29
|
-
"@cat-factory/integrations": "0.173.
|
|
30
|
-
"@cat-factory/kernel": "0.346.
|
|
31
|
-
"@cat-factory/mcp-server": "0.
|
|
32
|
-
"@cat-factory/orchestration": "0.
|
|
33
|
-
"@cat-factory/spend": "0.21.
|
|
27
|
+
"@cat-factory/agents": "0.166.0",
|
|
28
|
+
"@cat-factory/contracts": "0.354.0",
|
|
29
|
+
"@cat-factory/integrations": "0.173.2",
|
|
30
|
+
"@cat-factory/kernel": "0.346.2",
|
|
31
|
+
"@cat-factory/mcp-server": "0.51.0",
|
|
32
|
+
"@cat-factory/orchestration": "0.312.0",
|
|
33
|
+
"@cat-factory/spend": "0.21.8",
|
|
34
34
|
"@toad-contracts/core": "0.4.0",
|
|
35
35
|
"@toad-contracts/hono": "0.3.2",
|
|
36
36
|
"@toad-contracts/valibot": "0.5.0",
|