@dsh-enhanced/assistant-delivery 0.1.65 → 0.1.67
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/README.md +128 -4
- package/lib/agent-runtime.d.ts +6 -2
- package/lib/agent-runtime.d.ts.map +1 -1
- package/lib/agent-runtime.js +60 -14
- package/lib/agent-runtime.js.map +1 -1
- package/lib/attention-audit-store.d.ts +54 -0
- package/lib/attention-audit-store.d.ts.map +1 -0
- package/lib/attention-audit-store.js +213 -0
- package/lib/attention-audit-store.js.map +1 -0
- package/lib/attention-enforcement.d.ts +75 -0
- package/lib/attention-enforcement.d.ts.map +1 -0
- package/lib/attention-enforcement.js +84 -0
- package/lib/attention-enforcement.js.map +1 -0
- package/lib/attention.d.ts +203 -0
- package/lib/attention.d.ts.map +1 -0
- package/lib/attention.js +288 -0
- package/lib/attention.js.map +1 -0
- package/lib/coordinator.d.ts.map +1 -1
- package/lib/coordinator.js +6 -0
- package/lib/coordinator.js.map +1 -1
- package/lib/feedback-command.d.ts +23 -0
- package/lib/feedback-command.d.ts.map +1 -1
- package/lib/feedback-command.js +176 -0
- package/lib/feedback-command.js.map +1 -1
- package/lib/foreground-observation.d.ts +21 -0
- package/lib/foreground-observation.d.ts.map +1 -1
- package/lib/foreground-observation.js.map +1 -1
- package/lib/foreground-termination.d.ts +31 -0
- package/lib/foreground-termination.d.ts.map +1 -0
- package/lib/foreground-termination.js +42 -0
- package/lib/foreground-termination.js.map +1 -0
- package/lib/in-process-reload-runtime.d.ts +87 -0
- package/lib/in-process-reload-runtime.d.ts.map +1 -0
- package/lib/in-process-reload-runtime.js +319 -0
- package/lib/in-process-reload-runtime.js.map +1 -0
- package/lib/index.d.ts +20 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +9 -3
- package/lib/index.js.map +1 -1
- package/lib/native-termination.d.ts +12 -0
- package/lib/native-termination.d.ts.map +1 -0
- package/lib/native-termination.js +57 -0
- package/lib/native-termination.js.map +1 -0
- package/lib/native-web-owner.d.ts +7 -0
- package/lib/native-web-owner.d.ts.map +1 -1
- package/lib/native-web-owner.js +40 -10
- package/lib/native-web-owner.js.map +1 -1
- package/lib/operator-snapshot.d.ts +31 -3
- package/lib/operator-snapshot.d.ts.map +1 -1
- package/lib/operator-snapshot.js +120 -47
- package/lib/operator-snapshot.js.map +1 -1
- package/lib/progress-attention.d.ts +55 -0
- package/lib/progress-attention.d.ts.map +1 -0
- package/lib/progress-attention.js +128 -0
- package/lib/progress-attention.js.map +1 -0
- package/lib/service.d.ts +515 -4
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +2183 -130
- package/lib/service.js.map +1 -1
- package/lib/sqlite.d.ts +1 -1
- package/lib/sqlite.d.ts.map +1 -1
- package/lib/sqlite.js +102 -2
- package/lib/sqlite.js.map +1 -1
- package/lib/store.d.ts +113 -2
- package/lib/store.d.ts.map +1 -1
- package/lib/store.js +450 -39
- package/lib/store.js.map +1 -1
- package/lib/types.d.ts +175 -0
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/work-item-engineering-context.d.ts +127 -0
- package/lib/work-item-engineering-context.d.ts.map +1 -0
- package/lib/work-item-engineering-context.js +151 -0
- package/lib/work-item-engineering-context.js.map +1 -0
- package/lib/work-item-feedback-schema.d.ts +2 -0
- package/lib/work-item-feedback-schema.d.ts.map +1 -0
- package/lib/work-item-feedback-schema.js +29 -0
- package/lib/work-item-feedback-schema.js.map +1 -0
- package/lib/work-item-feedback-store.d.ts +29 -0
- package/lib/work-item-feedback-store.d.ts.map +1 -0
- package/lib/work-item-feedback-store.js +111 -0
- package/lib/work-item-feedback-store.js.map +1 -0
- package/lib/work-item-feedback.d.ts +157 -0
- package/lib/work-item-feedback.d.ts.map +1 -0
- package/lib/work-item-feedback.js +2 -0
- package/lib/work-item-feedback.js.map +1 -0
- package/lib/work-item-replies-schema.d.ts +3 -0
- package/lib/work-item-replies-schema.d.ts.map +1 -0
- package/lib/work-item-replies-schema.js +45 -0
- package/lib/work-item-replies-schema.js.map +1 -0
- package/lib/work-item-replies-store.d.ts +43 -0
- package/lib/work-item-replies-store.d.ts.map +1 -0
- package/lib/work-item-replies-store.js +203 -0
- package/lib/work-item-replies-store.js.map +1 -0
- package/lib/work-item-replies.d.ts +93 -0
- package/lib/work-item-replies.d.ts.map +1 -0
- package/lib/work-item-replies.js +15 -0
- package/lib/work-item-replies.js.map +1 -0
- package/package.json +24 -24
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WP19 attention contract. Stage 1 (always on, audit only): Delivery evaluates
|
|
3
|
+
* every background/owner notification against a Host-side envelope and
|
|
4
|
+
* records the verdict. Stage 2b (opt-in `attentionAttachOverCap`, default off):
|
|
5
|
+
* over-cap notices become a short body plus a text attachment and split bursts
|
|
6
|
+
* are rejected; see `convertOverCapAttention` and `assessAttentionSplit`.
|
|
7
|
+
*/
|
|
8
|
+
import type { OutboundTextAttachment } from './types.js';
|
|
9
|
+
export type AttentionPurpose = 'result' | 'attention' | 'answer';
|
|
10
|
+
/** Exactly one structured question per attention notice. */
|
|
11
|
+
export interface AttentionQuestion {
|
|
12
|
+
id: string;
|
|
13
|
+
prompt: string;
|
|
14
|
+
choices?: readonly string[];
|
|
15
|
+
}
|
|
16
|
+
export type AttentionEnvelope = Readonly<{
|
|
17
|
+
purpose: 'result';
|
|
18
|
+
workItemId?: string;
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
purpose: 'attention';
|
|
21
|
+
workItemId: string;
|
|
22
|
+
question: Readonly<AttentionQuestion>;
|
|
23
|
+
}> | Readonly<{
|
|
24
|
+
purpose: 'answer';
|
|
25
|
+
questionId: string;
|
|
26
|
+
workItemId?: string;
|
|
27
|
+
}>;
|
|
28
|
+
export type AttentionLane = 'background' | 'background-route' | 'owner-notification' | 'automation-result' | 'work-item-report' | 'scheduled-goal-result';
|
|
29
|
+
/** `declared` by the caller, derived from a typed Host `lane`, or the legacy `default`. */
|
|
30
|
+
export type AttentionPurposeSource = 'declared' | 'lane' | 'default';
|
|
31
|
+
export type AttentionVerdict = 'would-accept' | 'would-attach' | 'would-reject';
|
|
32
|
+
export declare const attentionAuditReasons: readonly ["missing-purpose", "invalid-envelope", "attention-missing-work-item", "attention-question-invalid", "attention-question-not-current", "attention-question-already-answered", "answer-missing-question", "answer-unknown-question", "answer-already-used", "answer-work-item-mismatch", "attention-question-reused", "over-word-cap", "over-grapheme-cap", "text-exposes-estimate", "text-exposes-identifier"];
|
|
33
|
+
export type AttentionAuditReason = typeof attentionAuditReasons[number];
|
|
34
|
+
/**
|
|
35
|
+
* Hard word caps per purpose. A result may carry a short summary; attention is
|
|
36
|
+
* one question with its minimum context; an answer settles one question.
|
|
37
|
+
* With stage 2b enabled, over-cap text moves to an attachment.
|
|
38
|
+
*/
|
|
39
|
+
export declare const attentionWordCaps: Readonly<Record<AttentionPurpose, number>>;
|
|
40
|
+
/**
|
|
41
|
+
* Secondary length guard: non-whitespace graphemes, about six per capped word.
|
|
42
|
+
* It catches content the word segmenter undercounts, such as one unbroken
|
|
43
|
+
* multi-kilobyte token (one word-like segment) or long emoji runs.
|
|
44
|
+
*/
|
|
45
|
+
export declare const attentionGraphemeCaps: Readonly<Record<AttentionPurpose, number>>;
|
|
46
|
+
/** Legacy callers that declare nothing are audited as `result`, the least restrictive purpose. */
|
|
47
|
+
export declare const defaultAttentionPurpose: AttentionPurpose;
|
|
48
|
+
export interface AttentionTextMeasure {
|
|
49
|
+
/** `isWordLike` word segments. */
|
|
50
|
+
words: number;
|
|
51
|
+
/** Non-word graphemes other than whitespace, punctuation and ASCII, e.g. emoji or pictographs. */
|
|
52
|
+
symbols: number;
|
|
53
|
+
/** All non-whitespace graphemes. */
|
|
54
|
+
graphemes: number;
|
|
55
|
+
}
|
|
56
|
+
export declare function measureAttentionText(text: string): AttentionTextMeasure;
|
|
57
|
+
/** Audited word count: word-like segments plus symbol graphemes, so an emoji wall cannot count as zero. */
|
|
58
|
+
export declare function countAttentionWords(text: string): number;
|
|
59
|
+
/** Prior audited state needed for single-question and single-use checks, scoped to one binding. */
|
|
60
|
+
export interface AttentionLedgerView {
|
|
61
|
+
/** An accepted attention notice asked this question on this binding. */
|
|
62
|
+
questionAsked(questionId: string): boolean;
|
|
63
|
+
/** An accepted answer already settled this question on this binding. */
|
|
64
|
+
questionAnswered(questionId: string): boolean;
|
|
65
|
+
/** Accepted, still unanswered question ids open for this work item on this binding. */
|
|
66
|
+
openQuestions(workItemId: string): readonly string[];
|
|
67
|
+
/** Work item of the first accepted attention notice that asked this question on this binding. */
|
|
68
|
+
questionWorkItem(questionId: string): string | undefined;
|
|
69
|
+
}
|
|
70
|
+
export interface AttentionAssessment {
|
|
71
|
+
purpose: AttentionPurpose;
|
|
72
|
+
purposeSource: AttentionPurposeSource;
|
|
73
|
+
workItemId?: string;
|
|
74
|
+
questionId?: string;
|
|
75
|
+
answersQuestionId?: string;
|
|
76
|
+
wordCount: number;
|
|
77
|
+
wordCap: number;
|
|
78
|
+
verdict: AttentionVerdict;
|
|
79
|
+
reasons: readonly AttentionAuditReason[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Pure and deterministic for one (input, ledger) pair. Reasons are emitted in
|
|
83
|
+
* the fixed `attentionAuditReasons` order.
|
|
84
|
+
*/
|
|
85
|
+
export declare function assessAttention(input: Readonly<{
|
|
86
|
+
text: string;
|
|
87
|
+
envelope?: unknown;
|
|
88
|
+
lanePurpose?: Readonly<{
|
|
89
|
+
purpose: AttentionPurpose;
|
|
90
|
+
workItemId?: string;
|
|
91
|
+
}>;
|
|
92
|
+
ledger: AttentionLedgerView;
|
|
93
|
+
}>): AttentionAssessment;
|
|
94
|
+
/**
|
|
95
|
+
* WP19 stage 2b (opt-in, Delivery config `attentionAttachOverCap`): an
|
|
96
|
+
* over-cap background/owner notification is sent as a short inline body plus
|
|
97
|
+
* one text attachment carrying the full original text, never as several
|
|
98
|
+
* messages. Everything below is pure and deterministic.
|
|
99
|
+
*/
|
|
100
|
+
/** Inline body budget for a converted notice, before the fixed attachment notice. */
|
|
101
|
+
export declare const attentionAttachmentSummaryWords = 60;
|
|
102
|
+
export declare const attentionAttachmentSummaryGraphemes = 360;
|
|
103
|
+
/** True when the text exceeds the word or grapheme cap of its purpose. */
|
|
104
|
+
export declare function attentionOverCap(text: string, purpose: AttentionPurpose): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Convert one over-cap notice to a short plain body plus a text attachment.
|
|
107
|
+
* The attachment name derives from the content digest only, so a replay of the
|
|
108
|
+
* same notice converts byte-identically. Callers decide whether to convert.
|
|
109
|
+
*/
|
|
110
|
+
export declare function convertOverCapAttention(input: Readonly<{
|
|
111
|
+
text: string;
|
|
112
|
+
format: 'markdown' | 'plain';
|
|
113
|
+
digest: (text: string) => string;
|
|
114
|
+
}>): {
|
|
115
|
+
text: string;
|
|
116
|
+
format: 'plain';
|
|
117
|
+
attachment: OutboundTextAttachment;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Split-evasion window. Inline notices queued by the same source on the same
|
|
121
|
+
* binding and lane within this window are measured together; when their sum
|
|
122
|
+
* exceeds the cap of the new notice's purpose the new notice is rejected. The
|
|
123
|
+
* remedy is one notice, which the over-cap path converts to an attachment.
|
|
124
|
+
*/
|
|
125
|
+
export declare const attentionSplitWindowMs = 300000;
|
|
126
|
+
export type AttentionSplitVerdict = Readonly<{
|
|
127
|
+
split: false;
|
|
128
|
+
} | {
|
|
129
|
+
split: true;
|
|
130
|
+
words: number;
|
|
131
|
+
graphemes: number;
|
|
132
|
+
priorNotices: number;
|
|
133
|
+
}>;
|
|
134
|
+
/** Pure: `priorInlineTexts` are the inline bodies already queued in the window, current excluded. */
|
|
135
|
+
export declare function assessAttentionSplit(input: Readonly<{
|
|
136
|
+
text: string;
|
|
137
|
+
purpose: AttentionPurpose;
|
|
138
|
+
priorInlineTexts: readonly string[];
|
|
139
|
+
}>): AttentionSplitVerdict;
|
|
140
|
+
/** One durable audit row; `sequence` is the read cursor. */
|
|
141
|
+
export interface AttentionAuditEntry extends AttentionAssessment {
|
|
142
|
+
sequence: number;
|
|
143
|
+
outboxId: string;
|
|
144
|
+
bindingId: string;
|
|
145
|
+
lane: AttentionLane;
|
|
146
|
+
sourceId: string;
|
|
147
|
+
recordedAt: number;
|
|
148
|
+
}
|
|
149
|
+
/** Reserved metadata of a work-item report the Host routed to a linked alias channel. */
|
|
150
|
+
export declare const linkedReportMetadataPrefix = "dsh.linked-report";
|
|
151
|
+
/** Reserved idempotency-key prefix of a Host-routed linked report. */
|
|
152
|
+
export declare const linkedReportKeyPrefix = "linked-report:";
|
|
153
|
+
export declare const NOTIFICATION_OUTCOME_FACTS_PROTOCOL: "assistant-delivery/notification-outcome-facts/v1";
|
|
154
|
+
/**
|
|
155
|
+
* WP22 read model: durable Delivery facts about one audited notification.
|
|
156
|
+
* It never carries message or reply text; Evaluation classifies the outcome.
|
|
157
|
+
*/
|
|
158
|
+
export interface NotificationOutcomeFact {
|
|
159
|
+
auditSequence: number;
|
|
160
|
+
outboxId: string;
|
|
161
|
+
bindingId: string;
|
|
162
|
+
scope: Readonly<{
|
|
163
|
+
workspace: string;
|
|
164
|
+
preset: string;
|
|
165
|
+
}>;
|
|
166
|
+
lane: AttentionLane;
|
|
167
|
+
sourceId: string;
|
|
168
|
+
purpose: AttentionPurpose;
|
|
169
|
+
purposeSource: AttentionPurposeSource;
|
|
170
|
+
workItemId?: string;
|
|
171
|
+
questionId?: string;
|
|
172
|
+
answersQuestionId?: string;
|
|
173
|
+
verdict: AttentionVerdict;
|
|
174
|
+
reasons: readonly AttentionAuditReason[];
|
|
175
|
+
auditedAt: number;
|
|
176
|
+
transport: Readonly<{
|
|
177
|
+
status: 'pending' | 'attempting' | 'accepted' | 'delivered' | 'read' | 'retry_wait' | 'dead' | 'unknown_after_send';
|
|
178
|
+
acceptedAt?: number;
|
|
179
|
+
deliveredAt?: number;
|
|
180
|
+
readAt?: number;
|
|
181
|
+
}>;
|
|
182
|
+
/** Earliest owner Inbox message on the same binding that replies to this notification. */
|
|
183
|
+
reaction?: Readonly<{
|
|
184
|
+
firstAt: number;
|
|
185
|
+
count: number;
|
|
186
|
+
}>;
|
|
187
|
+
/** Current Host-recorded owner judgement; `unknown` means withdrawn. */
|
|
188
|
+
judgement?: Readonly<{
|
|
189
|
+
source: 'owner-objective' | 'work-item-feedback';
|
|
190
|
+
version: number;
|
|
191
|
+
objectiveStatus: 'achieved' | 'partial' | 'not-achieved' | 'unknown';
|
|
192
|
+
}>;
|
|
193
|
+
/**
|
|
194
|
+
* Present only for a Host-routed linked work-item report (cross-channel
|
|
195
|
+
* fallback to an owner alias); `originBindingId` is the unavailable origin.
|
|
196
|
+
* Absent means the notification went to its own binding.
|
|
197
|
+
*/
|
|
198
|
+
route?: Readonly<{
|
|
199
|
+
kind: 'linked';
|
|
200
|
+
originBindingId: string;
|
|
201
|
+
}>;
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=attention.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attention.d.ts","sourceRoot":"","sources":["../src/attention.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAExD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAA;AAEhE,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC5B;AAED,MAAM,MAAM,iBAAiB,GACzB,QAAQ,CAAC;IAAE,OAAO,EAAE,QAAQ,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GACpD,QAAQ,CAAC;IAAE,OAAO,EAAE,WAAW,CAAC;IAA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AE,IAAI,EAAE,QAAQ,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC9D"}
|
package/lib/attention.js
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
export const attentionAuditReasons = [
|
|
2
|
+
'missing-purpose',
|
|
3
|
+
'invalid-envelope',
|
|
4
|
+
'attention-missing-work-item',
|
|
5
|
+
'attention-question-invalid',
|
|
6
|
+
'attention-question-not-current',
|
|
7
|
+
'attention-question-already-answered',
|
|
8
|
+
'answer-missing-question',
|
|
9
|
+
'answer-unknown-question',
|
|
10
|
+
'answer-already-used',
|
|
11
|
+
'answer-work-item-mismatch',
|
|
12
|
+
'attention-question-reused',
|
|
13
|
+
'over-word-cap',
|
|
14
|
+
'over-grapheme-cap',
|
|
15
|
+
'text-exposes-estimate',
|
|
16
|
+
'text-exposes-identifier',
|
|
17
|
+
];
|
|
18
|
+
const rejectReasons = new Set([
|
|
19
|
+
'invalid-envelope', 'attention-missing-work-item', 'attention-question-invalid', 'attention-question-not-current',
|
|
20
|
+
'attention-question-already-answered', 'answer-missing-question', 'answer-unknown-question', 'answer-already-used',
|
|
21
|
+
'answer-work-item-mismatch', 'attention-question-reused',
|
|
22
|
+
]);
|
|
23
|
+
/**
|
|
24
|
+
* Hard word caps per purpose. A result may carry a short summary; attention is
|
|
25
|
+
* one question with its minimum context; an answer settles one question.
|
|
26
|
+
* With stage 2b enabled, over-cap text moves to an attachment.
|
|
27
|
+
*/
|
|
28
|
+
export const attentionWordCaps = Object.freeze({
|
|
29
|
+
result: 400,
|
|
30
|
+
attention: 120,
|
|
31
|
+
answer: 200,
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Secondary length guard: non-whitespace graphemes, about six per capped word.
|
|
35
|
+
* It catches content the word segmenter undercounts, such as one unbroken
|
|
36
|
+
* multi-kilobyte token (one word-like segment) or long emoji runs.
|
|
37
|
+
*/
|
|
38
|
+
export const attentionGraphemeCaps = Object.freeze({
|
|
39
|
+
result: 2400,
|
|
40
|
+
attention: 720,
|
|
41
|
+
answer: 1200,
|
|
42
|
+
});
|
|
43
|
+
/** Legacy callers that declare nothing are audited as `result`, the least restrictive purpose. */
|
|
44
|
+
export const defaultAttentionPurpose = 'result';
|
|
45
|
+
// Fixed locale keeps counts independent of Host locale. CJK runs use ICU
|
|
46
|
+
// dictionary segmentation; link text and URLs are part of the raw text, so a
|
|
47
|
+
// URL counts by its word-like parts and cannot be used to hide length.
|
|
48
|
+
// Segmentation follows the ICU data of the running Node.js, so counts may
|
|
49
|
+
// shift across Node/ICU upgrades; recorded verdicts are never recomputed.
|
|
50
|
+
const wordSegmenter = new Intl.Segmenter('und', { granularity: 'word' });
|
|
51
|
+
const graphemeSegmenter = new Intl.Segmenter('und', { granularity: 'grapheme' });
|
|
52
|
+
/** Whitespace, punctuation and ASCII separators (URL/code syntax) are not counted as symbols. */
|
|
53
|
+
const uncountedGrapheme = /^(?:\s|\p{P}|\p{ASCII})+$/u;
|
|
54
|
+
export function measureAttentionText(text) {
|
|
55
|
+
let words = 0;
|
|
56
|
+
let symbols = 0;
|
|
57
|
+
for (const segment of wordSegmenter.segment(text)) {
|
|
58
|
+
if (segment.isWordLike === true) {
|
|
59
|
+
words += 1;
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
for (const grapheme of graphemeSegmenter.segment(segment.segment))
|
|
63
|
+
if (!uncountedGrapheme.test(grapheme.segment))
|
|
64
|
+
symbols += 1;
|
|
65
|
+
}
|
|
66
|
+
let graphemes = 0;
|
|
67
|
+
for (const grapheme of graphemeSegmenter.segment(text))
|
|
68
|
+
if (!/^\s+$/u.test(grapheme.segment))
|
|
69
|
+
graphemes += 1;
|
|
70
|
+
return { words, symbols, graphemes };
|
|
71
|
+
}
|
|
72
|
+
/** Audited word count: word-like segments plus symbol graphemes, so an emoji wall cannot count as zero. */
|
|
73
|
+
export function countAttentionWords(text) {
|
|
74
|
+
const measure = measureAttentionText(text);
|
|
75
|
+
return measure.words + measure.symbols;
|
|
76
|
+
}
|
|
77
|
+
const identifierPattern = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u;
|
|
78
|
+
const estimatePattern = /配置估值|净收益|预期收益|成功系数|执行成本|打扰成本|潜在损失|\butility\b/iu;
|
|
79
|
+
const exposedIdPattern = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b|\b[0-9a-f]{32,}\b/iu;
|
|
80
|
+
function isIdentifier(value) {
|
|
81
|
+
return typeof value === 'string' && identifierPattern.test(value);
|
|
82
|
+
}
|
|
83
|
+
function validQuestion(value) {
|
|
84
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
85
|
+
return false;
|
|
86
|
+
const question = value;
|
|
87
|
+
if (!isIdentifier(question.id) || typeof question.prompt !== 'string' || question.prompt.trim().length === 0
|
|
88
|
+
|| question.prompt.length > 1000)
|
|
89
|
+
return false;
|
|
90
|
+
if (question.choices === undefined)
|
|
91
|
+
return true;
|
|
92
|
+
return Array.isArray(question.choices) && question.choices.length >= 2 && question.choices.length <= 8
|
|
93
|
+
&& question.choices.every(choice => typeof choice === 'string' && choice.trim().length > 0 && choice.length <= 200)
|
|
94
|
+
&& new Set(question.choices).size === question.choices.length;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Pure and deterministic for one (input, ledger) pair. Reasons are emitted in
|
|
98
|
+
* the fixed `attentionAuditReasons` order.
|
|
99
|
+
*/
|
|
100
|
+
export function assessAttention(input) {
|
|
101
|
+
const reasons = new Set();
|
|
102
|
+
let purpose = defaultAttentionPurpose;
|
|
103
|
+
let purposeSource = 'default';
|
|
104
|
+
let workItemId;
|
|
105
|
+
let questionId;
|
|
106
|
+
let answersQuestionId;
|
|
107
|
+
const envelope = input.envelope;
|
|
108
|
+
if (input.envelope === undefined) {
|
|
109
|
+
if (input.lanePurpose === undefined)
|
|
110
|
+
reasons.add('missing-purpose');
|
|
111
|
+
else {
|
|
112
|
+
purpose = input.lanePurpose.purpose;
|
|
113
|
+
purposeSource = 'lane';
|
|
114
|
+
if (isIdentifier(input.lanePurpose.workItemId))
|
|
115
|
+
workItemId = input.lanePurpose.workItemId;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
else if (typeof envelope !== 'object' || envelope === null || Array.isArray(envelope)
|
|
119
|
+
|| !['result', 'attention', 'answer'].includes(envelope.purpose)) {
|
|
120
|
+
reasons.add('invalid-envelope');
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
purpose = envelope.purpose;
|
|
124
|
+
purposeSource = 'declared';
|
|
125
|
+
if (envelope.workItemId !== undefined) {
|
|
126
|
+
if (isIdentifier(envelope.workItemId))
|
|
127
|
+
workItemId = envelope.workItemId;
|
|
128
|
+
else
|
|
129
|
+
reasons.add('invalid-envelope');
|
|
130
|
+
}
|
|
131
|
+
if (purpose === 'attention') {
|
|
132
|
+
if (workItemId === undefined)
|
|
133
|
+
reasons.add('attention-missing-work-item');
|
|
134
|
+
if (!validQuestion(envelope.question) || 'questions' in envelope)
|
|
135
|
+
reasons.add('attention-question-invalid');
|
|
136
|
+
else
|
|
137
|
+
questionId = envelope.question.id;
|
|
138
|
+
if (questionId !== undefined) {
|
|
139
|
+
if (input.ledger.questionAnswered(questionId))
|
|
140
|
+
reasons.add('attention-question-already-answered');
|
|
141
|
+
const askedFor = input.ledger.questionWorkItem(questionId);
|
|
142
|
+
if (askedFor !== undefined && askedFor !== workItemId)
|
|
143
|
+
reasons.add('attention-question-reused');
|
|
144
|
+
if (workItemId !== undefined && input.ledger.openQuestions(workItemId).some(open => open !== questionId)) {
|
|
145
|
+
reasons.add('attention-question-not-current');
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else if (purpose === 'answer') {
|
|
150
|
+
if (!isIdentifier(envelope.questionId))
|
|
151
|
+
reasons.add('answer-missing-question');
|
|
152
|
+
else {
|
|
153
|
+
answersQuestionId = envelope.questionId;
|
|
154
|
+
if (!input.ledger.questionAsked(answersQuestionId))
|
|
155
|
+
reasons.add('answer-unknown-question');
|
|
156
|
+
else {
|
|
157
|
+
if (input.ledger.questionAnswered(answersQuestionId))
|
|
158
|
+
reasons.add('answer-already-used');
|
|
159
|
+
// An answer belongs to its question's work item; an undeclared item is taken from the question.
|
|
160
|
+
const askedFor = input.ledger.questionWorkItem(answersQuestionId);
|
|
161
|
+
if (askedFor !== undefined) {
|
|
162
|
+
if (workItemId === undefined)
|
|
163
|
+
workItemId = askedFor;
|
|
164
|
+
else if (workItemId !== askedFor)
|
|
165
|
+
reasons.add('answer-work-item-mismatch');
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const measure = measureAttentionText(input.text);
|
|
172
|
+
const wordCount = measure.words + measure.symbols;
|
|
173
|
+
const wordCap = attentionWordCaps[purpose];
|
|
174
|
+
if (wordCount > wordCap)
|
|
175
|
+
reasons.add('over-word-cap');
|
|
176
|
+
if (measure.graphemes > attentionGraphemeCaps[purpose])
|
|
177
|
+
reasons.add('over-grapheme-cap');
|
|
178
|
+
if (estimatePattern.test(input.text))
|
|
179
|
+
reasons.add('text-exposes-estimate');
|
|
180
|
+
if (exposedIdPattern.test(input.text))
|
|
181
|
+
reasons.add('text-exposes-identifier');
|
|
182
|
+
const ordered = attentionAuditReasons.filter(reason => reasons.has(reason));
|
|
183
|
+
const verdict = ordered.some(reason => rejectReasons.has(reason)) ? 'would-reject'
|
|
184
|
+
: reasons.has('over-word-cap') || reasons.has('over-grapheme-cap') ? 'would-attach' : 'would-accept';
|
|
185
|
+
return {
|
|
186
|
+
purpose, purposeSource,
|
|
187
|
+
...(workItemId === undefined ? {} : { workItemId }),
|
|
188
|
+
...(questionId === undefined ? {} : { questionId }),
|
|
189
|
+
...(answersQuestionId === undefined ? {} : { answersQuestionId }),
|
|
190
|
+
wordCount, wordCap, verdict, reasons: Object.freeze(ordered),
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* WP19 stage 2b (opt-in, Delivery config `attentionAttachOverCap`): an
|
|
195
|
+
* over-cap background/owner notification is sent as a short inline body plus
|
|
196
|
+
* one text attachment carrying the full original text, never as several
|
|
197
|
+
* messages. Everything below is pure and deterministic.
|
|
198
|
+
*/
|
|
199
|
+
/** Inline body budget for a converted notice, before the fixed attachment notice. */
|
|
200
|
+
export const attentionAttachmentSummaryWords = 60;
|
|
201
|
+
export const attentionAttachmentSummaryGraphemes = 360;
|
|
202
|
+
/**
|
|
203
|
+
* Bodies that are cut keep URLs and Markdown links whole: a link is either
|
|
204
|
+
* entirely inline (and counted) or entirely left to the attachment.
|
|
205
|
+
*/
|
|
206
|
+
const atomicLinkPattern = /\[[^\]\n]*\]\([^)\s]*\)|\b[A-Za-z][A-Za-z0-9+.-]*:\/\/\S+/gu;
|
|
207
|
+
function overCap(measure, purpose) {
|
|
208
|
+
return measure.words + measure.symbols > attentionWordCaps[purpose] || measure.graphemes > attentionGraphemeCaps[purpose];
|
|
209
|
+
}
|
|
210
|
+
/** True when the text exceeds the word or grapheme cap of its purpose. */
|
|
211
|
+
export function attentionOverCap(text, purpose) {
|
|
212
|
+
return overCap(measureAttentionText(text), purpose);
|
|
213
|
+
}
|
|
214
|
+
function* attentionUnits(text) {
|
|
215
|
+
let offset = 0;
|
|
216
|
+
for (const match of text.matchAll(atomicLinkPattern)) {
|
|
217
|
+
if (match.index > offset)
|
|
218
|
+
for (const segment of wordSegmenter.segment(text.slice(offset, match.index)))
|
|
219
|
+
yield segment.segment;
|
|
220
|
+
yield match[0];
|
|
221
|
+
offset = match.index + match[0].length;
|
|
222
|
+
}
|
|
223
|
+
if (offset < text.length)
|
|
224
|
+
for (const segment of wordSegmenter.segment(text.slice(offset)))
|
|
225
|
+
yield segment.segment;
|
|
226
|
+
}
|
|
227
|
+
/** Longest prefix of whole units within the summary budget; links are atomic. */
|
|
228
|
+
function attentionSummaryPrefix(text) {
|
|
229
|
+
let prefix = '';
|
|
230
|
+
let words = 0;
|
|
231
|
+
let graphemes = 0;
|
|
232
|
+
for (const unit of attentionUnits(text)) {
|
|
233
|
+
const measure = measureAttentionText(unit);
|
|
234
|
+
if (words + measure.words + measure.symbols > attentionAttachmentSummaryWords
|
|
235
|
+
|| graphemes + measure.graphemes > attentionAttachmentSummaryGraphemes)
|
|
236
|
+
return prefix.trimEnd();
|
|
237
|
+
prefix += unit;
|
|
238
|
+
words += measure.words + measure.symbols;
|
|
239
|
+
graphemes += measure.graphemes;
|
|
240
|
+
}
|
|
241
|
+
return prefix.trimEnd();
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Convert one over-cap notice to a short plain body plus a text attachment.
|
|
245
|
+
* The attachment name derives from the content digest only, so a replay of the
|
|
246
|
+
* same notice converts byte-identically. Callers decide whether to convert.
|
|
247
|
+
*/
|
|
248
|
+
export function convertOverCapAttention(input) {
|
|
249
|
+
const sha256 = input.digest(input.text);
|
|
250
|
+
const markdown = input.format === 'markdown';
|
|
251
|
+
const name = `notice-${sha256.slice(0, 12)}.${markdown ? 'md' : 'txt'}`;
|
|
252
|
+
const prefix = attentionSummaryPrefix(input.text);
|
|
253
|
+
const measure = measureAttentionText(input.text);
|
|
254
|
+
const notice = `(全文较长,共 ${measure.words + measure.symbols} 词,已转为附件 ${name})`;
|
|
255
|
+
return {
|
|
256
|
+
text: prefix.length === 0 ? notice : `${prefix}…\n\n${notice}`,
|
|
257
|
+
format: 'plain',
|
|
258
|
+
attachment: Object.freeze({ kind: 'text', name, mediaType: markdown ? 'text/markdown' : 'text/plain', text: input.text, sha256 }),
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Split-evasion window. Inline notices queued by the same source on the same
|
|
263
|
+
* binding and lane within this window are measured together; when their sum
|
|
264
|
+
* exceeds the cap of the new notice's purpose the new notice is rejected. The
|
|
265
|
+
* remedy is one notice, which the over-cap path converts to an attachment.
|
|
266
|
+
*/
|
|
267
|
+
export const attentionSplitWindowMs = 300_000;
|
|
268
|
+
/** Pure: `priorInlineTexts` are the inline bodies already queued in the window, current excluded. */
|
|
269
|
+
export function assessAttentionSplit(input) {
|
|
270
|
+
if (input.priorInlineTexts.length === 0)
|
|
271
|
+
return { split: false };
|
|
272
|
+
let words = 0;
|
|
273
|
+
let graphemes = 0;
|
|
274
|
+
for (const text of [...input.priorInlineTexts, input.text]) {
|
|
275
|
+
const measure = measureAttentionText(text);
|
|
276
|
+
words += measure.words + measure.symbols;
|
|
277
|
+
graphemes += measure.graphemes;
|
|
278
|
+
}
|
|
279
|
+
return words > attentionWordCaps[input.purpose] || graphemes > attentionGraphemeCaps[input.purpose]
|
|
280
|
+
? { split: true, words, graphemes, priorNotices: input.priorInlineTexts.length }
|
|
281
|
+
: { split: false };
|
|
282
|
+
}
|
|
283
|
+
/** Reserved metadata of a work-item report the Host routed to a linked alias channel. */
|
|
284
|
+
export const linkedReportMetadataPrefix = 'dsh.linked-report';
|
|
285
|
+
/** Reserved idempotency-key prefix of a Host-routed linked report. */
|
|
286
|
+
export const linkedReportKeyPrefix = 'linked-report:';
|
|
287
|
+
export const NOTIFICATION_OUTCOME_FACTS_PROTOCOL = 'assistant-delivery/notification-outcome-facts/v1';
|
|
288
|
+
//# sourceMappingURL=attention.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attention.js","sourceRoot":"","sources":["../src/attention.ts"],"names":[],"mappings":"AAgCA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,iBAAiB;IACjB,kBAAkB;IAClB,6BAA6B;IAC7B,4BAA4B;IAC5B,gCAAgC;IAChC,qCAAqC;IACrC,yBAAyB;IACzB,yBAAyB;IACzB,qBAAqB;IACrB,2BAA2B;IAC3B,2BAA2B;IAC3B,eAAe;IACf,mBAAmB;IACnB,uBAAuB;IACvB,yBAAyB;CACjB,CAAA;AAGV,MAAM,aAAa,GAAsC,IAAI,GAAG,C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B,OAAO,CAAC,mBAAmB;YAwBb,OAAO;IA6MrB,OAAO,CAAC,aAAa;CAyBtB"}
|
package/lib/coordinator.js
CHANGED
|
@@ -288,6 +288,12 @@ export class DeliveryCoordinator {
|
|
|
288
288
|
this.finish(record, fencingToken, { outcome: 'not-sent', failureCode: 'unsupported-format', retryable: false });
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
|
+
// WP19 stage 2b: the inline body of a converted notice is only a summary; never send it without its attachment.
|
|
292
|
+
// Reconcile never resends, so an unknown send is still reconciled; a reconciled not-sent row lands here next.
|
|
293
|
+
if (mode === 'send' && record.intent.attachment !== undefined && adapter.capabilities.textAttachments !== true) {
|
|
294
|
+
this.finish(record, fencingToken, { outcome: 'not-sent', failureCode: 'attachment-unsupported', retryable: false });
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
291
297
|
if (mode === 'reconcile') {
|
|
292
298
|
if (!adapter.capabilities.reconcileUnknownSend || adapter.reconcileUnknownSend === undefined) {
|
|
293
299
|
this.finish(record, fencingToken, { outcome: 'unknown', failureCode: 'reconcile-unsupported' });
|