@company-semantics/contracts 41.0.0 → 42.0.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/package.json +5 -5
- package/src/chat/README.md +1 -1
- package/src/chat/schemas.ts +18 -2
- package/src/security/token-policy.ts +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@company-semantics/contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "42.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -129,17 +129,17 @@
|
|
|
129
129
|
"zod": "^4.4.3"
|
|
130
130
|
},
|
|
131
131
|
"devDependencies": {
|
|
132
|
-
"@types/node": "^
|
|
132
|
+
"@types/node": "^26.1.2",
|
|
133
133
|
"amphtml-validator": "^1.0.38",
|
|
134
134
|
"culori": "^4.0.2",
|
|
135
135
|
"husky": "^9.1.7",
|
|
136
|
-
"lint-staged": "^17.
|
|
137
|
-
"markdownlint-cli2": "^0.23.
|
|
136
|
+
"lint-staged": "^17.2.0",
|
|
137
|
+
"markdownlint-cli2": "^0.23.2",
|
|
138
138
|
"openapi-typescript": "^7.13.0",
|
|
139
139
|
"prettier": "^3.9.6",
|
|
140
140
|
"tsx": "^4.23.1",
|
|
141
141
|
"typescript": "^5.8.3",
|
|
142
|
-
"vite": "^
|
|
142
|
+
"vite": "^8.2.0",
|
|
143
143
|
"vitest": "^4.1.10",
|
|
144
144
|
"yaml": "^2.9.0"
|
|
145
145
|
},
|
package/src/chat/README.md
CHANGED
|
@@ -42,7 +42,7 @@ Shared types for chat persistence, sharing, real-time events, and runtime profil
|
|
|
42
42
|
- `ChatRuntimeProfile` _(type)_ — Chat runtime profile — user-selectable orchestration strategy.
|
|
43
43
|
- `ChatRuntimeProfileInfo` _(type)_ — Runtime profile metadata for UI rendering.
|
|
44
44
|
- `ChatShareInfo` _(type)_ — Chat share record with snapshot metadata.
|
|
45
|
-
- `ChatShareInfoSchema`
|
|
45
|
+
- `ChatShareInfoSchema` — A chat share, as returned by the share APIs.
|
|
46
46
|
- `ChatSseEvent` _(type)_ — SSE event types for chat updates.
|
|
47
47
|
- `ChatSseEventSchema`
|
|
48
48
|
- `ChatSuccessResponse` _(type)_ — Generic mutation success confirmation.
|
package/src/chat/schemas.ts
CHANGED
|
@@ -58,12 +58,28 @@ export const SharedChatMessageSchema = z.object({
|
|
|
58
58
|
parts: z.array(z.unknown()).optional(),
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* A chat share, as returned by the share APIs.
|
|
63
|
+
*
|
|
64
|
+
* SHOW-ONCE (ADR-BE-460). `token` and `shareUrl` are present ONLY on the
|
|
65
|
+
* response that creates the share. Share tokens are stored as a digest, so the
|
|
66
|
+
* server cannot redisplay one afterwards — listing or updating a share returns
|
|
67
|
+
* the record without them, and re-obtaining a link means revoke-and-reshare.
|
|
68
|
+
*
|
|
69
|
+
* This is the industry norm for capability links, and it is what removes the
|
|
70
|
+
* last reason to keep a recoverable copy of the token: a share list that can
|
|
71
|
+
* still show you the URL is a share list that can leak every live link at once.
|
|
72
|
+
* Consumers must treat both fields as optional and drive their copy-link
|
|
73
|
+
* affordance off creation, not off a fetched share.
|
|
74
|
+
*/
|
|
61
75
|
export const ChatShareInfoSchema = z.object({
|
|
62
76
|
id: z.string(),
|
|
63
77
|
chatId: z.string(),
|
|
64
|
-
|
|
78
|
+
/** Create-time only — never returned by list or update (show-once). */
|
|
79
|
+
token: z.string().optional(),
|
|
65
80
|
visibility: ChatVisibilitySchema,
|
|
66
|
-
|
|
81
|
+
/** Create-time only — never returned by list or update (show-once). */
|
|
82
|
+
shareUrl: z.string().optional(),
|
|
67
83
|
messageCountAtShare: z.number().int(),
|
|
68
84
|
titleAtShare: z.string(),
|
|
69
85
|
createdAt: IsoDateString,
|
|
@@ -64,8 +64,12 @@ export const AUTH_TOKEN_POLICY_REQUIREMENTS = {
|
|
|
64
64
|
conformance: {
|
|
65
65
|
status: "unmet",
|
|
66
66
|
gap:
|
|
67
|
-
"
|
|
68
|
-
"
|
|
67
|
+
"Issuance now conforms: minted by issueCapabilityToken at 256 bits and " +
|
|
68
|
+
"stored as a sha256:v1: digest (ADR-BE-460 deploy B). Still UNMET because " +
|
|
69
|
+
"the dual-read window is open — sessions.token retains the raw value so a " +
|
|
70
|
+
"rollback keeps working, and every lookup carries a plaintext fallback arm. " +
|
|
71
|
+
"Conformance is reached when migration C retires the column and deploy D " +
|
|
72
|
+
"removes the fallbacks.",
|
|
69
73
|
},
|
|
70
74
|
},
|
|
71
75
|
ChatShareToken: {
|