@company-semantics/contracts 22.1.0 → 22.2.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
CHANGED
package/src/index.ts
CHANGED
|
@@ -44,6 +44,7 @@ Canonical vocabulary for structured assistant message output. Defines the type s
|
|
|
44
44
|
- `InteractiveFieldType` _(type)_ — The input shape of an editable field. - `member-ref`: a workspace member id (backed by a member picker). -…
|
|
45
45
|
- `InteractiveTaskData` _(type)_ — Interactive task surface data payload.
|
|
46
46
|
- `InteractiveTaskDataPart` _(type)_ — Interactive task data part (wire format).
|
|
47
|
+
- `InteractiveTaskDestination` _(type)_ — Read-only destination the task attaches to (e.g. the agent-resolved company-md page a context doc import…
|
|
47
48
|
- `InteractiveTaskKind` _(type)_ — The set of editable tasks the assistant can present inline.
|
|
48
49
|
- `InteractiveTaskPart` _(type)_ — Interactive task message part (semantic type).
|
|
49
50
|
- `InteractiveTaskSubject` _(type)_ — Read-only subject the task acts upon (e.g. the member being edited).
|
|
@@ -17,8 +17,13 @@
|
|
|
17
17
|
* then runs the governance engine (create execution → execute), so the change
|
|
18
18
|
* is audited and reversible like every other chat action.
|
|
19
19
|
* - At most one GOVERNED surface (preview ∪ interactive) is active per turn.
|
|
20
|
+
* - A task acts upon either a member `subject` (e.g. member.changeManager) OR a
|
|
21
|
+
* `destination` (e.g. companyMd.importContextDoc, where the import attaches a
|
|
22
|
+
* context doc to an agent-resolved company-md page instead of editing a member).
|
|
23
|
+
* Both are optional on InteractiveTaskData; the active taskKind selects which.
|
|
20
24
|
*
|
|
21
25
|
* @see decisions/ADR-CONTRACTS-068.md for design rationale
|
|
26
|
+
* @see decisions/ADR-CONTRACTS-070-interactive-context-doc-import-surface.md for the import destination surface
|
|
22
27
|
*/
|
|
23
28
|
|
|
24
29
|
import type { ConfirmationRiskLevel } from "./confirmation";
|
|
@@ -27,7 +32,9 @@ import type { ConfirmationRiskLevel } from "./confirmation";
|
|
|
27
32
|
* The set of editable tasks the assistant can present inline.
|
|
28
33
|
* Mirrors the `{domain}.{verb}` naming of ExecutionKind. Extensible union.
|
|
29
34
|
*/
|
|
30
|
-
export type InteractiveTaskKind =
|
|
35
|
+
export type InteractiveTaskKind =
|
|
36
|
+
| "member.changeManager"
|
|
37
|
+
| "companyMd.importContextDoc";
|
|
31
38
|
|
|
32
39
|
/**
|
|
33
40
|
* How the frontend sources candidate values for an editable field.
|
|
@@ -83,6 +90,18 @@ export interface InteractiveTaskSubject {
|
|
|
83
90
|
context?: Record<string, string>;
|
|
84
91
|
}
|
|
85
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Read-only destination the task attaches to (e.g. the agent-resolved company-md
|
|
95
|
+
* page a context doc import lands on). Used by tasks that act on a document
|
|
96
|
+
* target rather than a member subject (e.g. companyMd.importContextDoc).
|
|
97
|
+
*/
|
|
98
|
+
export interface InteractiveTaskDestination {
|
|
99
|
+
/** Company-md page id the context doc attaches to. */
|
|
100
|
+
docId: string;
|
|
101
|
+
/** Display title of the destination page for the surface header. */
|
|
102
|
+
docTitle: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
86
105
|
/**
|
|
87
106
|
* Interactive task surface data payload.
|
|
88
107
|
*/
|
|
@@ -95,8 +114,10 @@ export interface InteractiveTaskData {
|
|
|
95
114
|
title: string;
|
|
96
115
|
/** Optional detail. */
|
|
97
116
|
description?: string;
|
|
98
|
-
/**
|
|
99
|
-
subject
|
|
117
|
+
/** The member the task acts upon; set by member tasks (e.g. member.changeManager). */
|
|
118
|
+
subject?: InteractiveTaskSubject;
|
|
119
|
+
/** The company-md page the task attaches to; set by import tasks (e.g. companyMd.importContextDoc). */
|
|
120
|
+
destination?: InteractiveTaskDestination;
|
|
100
121
|
/** The editable fields. */
|
|
101
122
|
fields: InteractiveFieldDescriptor[];
|
|
102
123
|
/** Endpoint the frontend POSTs the filled form to. */
|