@company-semantics/contracts 22.0.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
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
|
|
2
|
-
export const SPEC_HASH = '
|
|
3
|
-
export const SPEC_HASH_FULL = '
|
|
2
|
+
export const SPEC_HASH = '151972b62216' as const;
|
|
3
|
+
export const SPEC_HASH_FULL = '151972b622165a687006fbe1047eb84210072a2c2be50fd1c7651312e5266e1f' as const;
|
package/src/api/generated.ts
CHANGED
|
@@ -2959,6 +2959,23 @@ export interface paths {
|
|
|
2959
2959
|
patch?: never;
|
|
2960
2960
|
trace?: never;
|
|
2961
2961
|
};
|
|
2962
|
+
"/api/factory/kpis": {
|
|
2963
|
+
parameters: {
|
|
2964
|
+
query?: never;
|
|
2965
|
+
header?: never;
|
|
2966
|
+
path?: never;
|
|
2967
|
+
cookie?: never;
|
|
2968
|
+
};
|
|
2969
|
+
/** Read the factory KPI rollup (navigability over traversal_cost events) */
|
|
2970
|
+
get: operations["factoryKpis"];
|
|
2971
|
+
put?: never;
|
|
2972
|
+
post?: never;
|
|
2973
|
+
delete?: never;
|
|
2974
|
+
options?: never;
|
|
2975
|
+
head?: never;
|
|
2976
|
+
patch?: never;
|
|
2977
|
+
trace?: never;
|
|
2978
|
+
};
|
|
2962
2979
|
"/api/internal-admin/impersonate/start": {
|
|
2963
2980
|
parameters: {
|
|
2964
2981
|
query?: never;
|
|
@@ -3805,6 +3822,19 @@ export interface components {
|
|
|
3805
3822
|
homeUnitId?: string;
|
|
3806
3823
|
/** @enum {string} */
|
|
3807
3824
|
homeUnitRole?: "member" | "unit_owner";
|
|
3825
|
+
stagedPlacement?: {
|
|
3826
|
+
title?: string;
|
|
3827
|
+
/** Format: uuid */
|
|
3828
|
+
managerUserId?: string;
|
|
3829
|
+
/** Format: uuid */
|
|
3830
|
+
homeUnitId?: string;
|
|
3831
|
+
/** @enum {string} */
|
|
3832
|
+
homeUnitRole?: "member" | "unit_owner";
|
|
3833
|
+
/** @default [] */
|
|
3834
|
+
unitOwnerOf: string[];
|
|
3835
|
+
/** @default [] */
|
|
3836
|
+
contributesTo: string[];
|
|
3837
|
+
};
|
|
3808
3838
|
};
|
|
3809
3839
|
InviteListResponse: {
|
|
3810
3840
|
id: string;
|
|
@@ -4811,8 +4841,6 @@ export interface components {
|
|
|
4811
4841
|
/** Format: uuid */
|
|
4812
4842
|
id: string;
|
|
4813
4843
|
name: string;
|
|
4814
|
-
/** @enum {string} */
|
|
4815
|
-
mutability: "derived" | "user_managed";
|
|
4816
4844
|
}[];
|
|
4817
4845
|
}[];
|
|
4818
4846
|
edges: {
|
|
@@ -5394,6 +5422,95 @@ export interface components {
|
|
|
5394
5422
|
} | null;
|
|
5395
5423
|
receivedAt: string | null;
|
|
5396
5424
|
};
|
|
5425
|
+
SoftwareFactoryKpis: {
|
|
5426
|
+
generatedFrom: {
|
|
5427
|
+
events: number;
|
|
5428
|
+
sessions: number;
|
|
5429
|
+
};
|
|
5430
|
+
navigability: {
|
|
5431
|
+
overall: {
|
|
5432
|
+
p95Reads: number;
|
|
5433
|
+
p50Reads: number;
|
|
5434
|
+
p95ContextTokens: number;
|
|
5435
|
+
p50ContextTokens: number;
|
|
5436
|
+
reachedEditRate: number;
|
|
5437
|
+
searchEscapeRate: number;
|
|
5438
|
+
medianReadsAfterFirstEdit: number;
|
|
5439
|
+
p95ReadsAfterFirstEdit: number;
|
|
5440
|
+
navMapUsageBySource: {
|
|
5441
|
+
[key: string]: number;
|
|
5442
|
+
};
|
|
5443
|
+
};
|
|
5444
|
+
mapRoi: {
|
|
5445
|
+
withMap: {
|
|
5446
|
+
p95Reads: number;
|
|
5447
|
+
p95ContextTokens: number;
|
|
5448
|
+
n: number;
|
|
5449
|
+
};
|
|
5450
|
+
withoutMap: {
|
|
5451
|
+
p95Reads: number;
|
|
5452
|
+
p95ContextTokens: number;
|
|
5453
|
+
n: number;
|
|
5454
|
+
};
|
|
5455
|
+
};
|
|
5456
|
+
entropyLeaders: {
|
|
5457
|
+
prdId: string;
|
|
5458
|
+
p95Reads: number;
|
|
5459
|
+
p95ContextTokens: number;
|
|
5460
|
+
medianReadsAfterFirstEdit: number;
|
|
5461
|
+
}[];
|
|
5462
|
+
bySource: ({
|
|
5463
|
+
source: string;
|
|
5464
|
+
} & {
|
|
5465
|
+
p95Reads?: number;
|
|
5466
|
+
p50Reads?: number;
|
|
5467
|
+
p95ContextTokens?: number;
|
|
5468
|
+
p50ContextTokens?: number;
|
|
5469
|
+
reachedEditRate?: number;
|
|
5470
|
+
searchEscapeRate?: number;
|
|
5471
|
+
medianReadsAfterFirstEdit?: number;
|
|
5472
|
+
p95ReadsAfterFirstEdit?: number;
|
|
5473
|
+
navMapUsageBySource?: {
|
|
5474
|
+
[key: string]: number;
|
|
5475
|
+
};
|
|
5476
|
+
})[];
|
|
5477
|
+
trend: {
|
|
5478
|
+
recent: {
|
|
5479
|
+
p95Reads?: number;
|
|
5480
|
+
p50Reads?: number;
|
|
5481
|
+
p95ContextTokens?: number;
|
|
5482
|
+
p50ContextTokens?: number;
|
|
5483
|
+
reachedEditRate?: number;
|
|
5484
|
+
searchEscapeRate?: number;
|
|
5485
|
+
medianReadsAfterFirstEdit?: number;
|
|
5486
|
+
p95ReadsAfterFirstEdit?: number;
|
|
5487
|
+
navMapUsageBySource?: {
|
|
5488
|
+
[key: string]: number;
|
|
5489
|
+
};
|
|
5490
|
+
};
|
|
5491
|
+
prior: {
|
|
5492
|
+
p95Reads?: number;
|
|
5493
|
+
p50Reads?: number;
|
|
5494
|
+
p95ContextTokens?: number;
|
|
5495
|
+
p50ContextTokens?: number;
|
|
5496
|
+
reachedEditRate?: number;
|
|
5497
|
+
searchEscapeRate?: number;
|
|
5498
|
+
medianReadsAfterFirstEdit?: number;
|
|
5499
|
+
p95ReadsAfterFirstEdit?: number;
|
|
5500
|
+
navMapUsageBySource?: {
|
|
5501
|
+
[key: string]: number;
|
|
5502
|
+
};
|
|
5503
|
+
};
|
|
5504
|
+
deltaP95Reads: number | null;
|
|
5505
|
+
};
|
|
5506
|
+
};
|
|
5507
|
+
throughput: {
|
|
5508
|
+
[key: string]: unknown;
|
|
5509
|
+
} | null;
|
|
5510
|
+
quality: {
|
|
5511
|
+
[key: string]: unknown;
|
|
5512
|
+
} | null;
|
|
5513
|
+
};
|
|
5397
5514
|
ImpersonationSessionResponse: {
|
|
5398
5515
|
session: {
|
|
5399
5516
|
impersonationSessionId: string;
|
|
@@ -10388,6 +10505,40 @@ export interface operations {
|
|
|
10388
10505
|
};
|
|
10389
10506
|
};
|
|
10390
10507
|
};
|
|
10508
|
+
factoryKpis: {
|
|
10509
|
+
parameters: {
|
|
10510
|
+
query?: never;
|
|
10511
|
+
header?: never;
|
|
10512
|
+
path?: never;
|
|
10513
|
+
cookie?: never;
|
|
10514
|
+
};
|
|
10515
|
+
requestBody?: never;
|
|
10516
|
+
responses: {
|
|
10517
|
+
/** @description Factory KPI rollup (navigability populated; throughput/quality null) */
|
|
10518
|
+
200: {
|
|
10519
|
+
headers: {
|
|
10520
|
+
[name: string]: unknown;
|
|
10521
|
+
};
|
|
10522
|
+
content: {
|
|
10523
|
+
"application/json": components["schemas"]["SoftwareFactoryKpis"];
|
|
10524
|
+
};
|
|
10525
|
+
};
|
|
10526
|
+
/** @description Not authenticated */
|
|
10527
|
+
401: {
|
|
10528
|
+
headers: {
|
|
10529
|
+
[name: string]: unknown;
|
|
10530
|
+
};
|
|
10531
|
+
content?: never;
|
|
10532
|
+
};
|
|
10533
|
+
/** @description Not an internal admin */
|
|
10534
|
+
403: {
|
|
10535
|
+
headers: {
|
|
10536
|
+
[name: string]: unknown;
|
|
10537
|
+
};
|
|
10538
|
+
content?: never;
|
|
10539
|
+
};
|
|
10540
|
+
};
|
|
10541
|
+
};
|
|
10391
10542
|
startImpersonation: {
|
|
10392
10543
|
parameters: {
|
|
10393
10544
|
query?: never;
|
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. */
|