@installagent/sdk 0.14.0 → 0.16.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/env-registry.js +19 -3
- package/dist/index.d.ts +6 -1
- package/dist/index.js +6 -1
- package/dist/portal-admin.d.ts +24 -0
- package/dist/portal-admin.js +12 -0
- package/dist/tech-call-agenda.d.ts +57 -0
- package/dist/tech-call-agenda.js +94 -0
- package/dist/tech-call-note-landed.d.ts +43 -0
- package/dist/tech-call-note-landed.js +93 -0
- package/dist/tech-call-prep.d.ts +94 -0
- package/dist/tech-call-prep.js +460 -0
- package/dist/tech-call-update-pass.d.ts +142 -0
- package/dist/tech-call-update-pass.js +707 -0
- package/dist/tech-call-verify.d.ts +191 -0
- package/dist/tech-call-verify.js +673 -0
- package/package.json +1 -1
- package/templates/env.example +3 -0
- package/templates/workspace-root/AGENT.md +2 -1
- package/templates/workspace-root/skills/engagement-spec/SKILL.md +27 -0
- package/templates/workspace-root/skills/ia-cli/SKILL.md +5 -0
- package/templates/workspace-root/skills/linear/SKILL.md +13 -0
- package/templates/workspace-root/skills/tech-call-prep/SKILL.md +48 -19
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
export declare const VERIFY_MODEL = "gemini-3.8-flash";
|
|
2
|
+
export declare const SLACK_BOT_TOKEN_ENV = "SLACK_BOT_TOKEN";
|
|
3
|
+
/** The docs the check reads. Marks go into these four; onboarding.html is list-only. */
|
|
4
|
+
export declare const VERIFY_DOCS: readonly ["docs/01-overview.md", "docs/02-tech-spec.md", "docs/03-client-onboarding.md", "docs/04-access-checklist.md"];
|
|
5
|
+
export type ClaimKind = "scope" | "stack" | "person" | "access" | "commitment" | "number" | "other";
|
|
6
|
+
export type ClaimVerdict = "supported" | "unverified" | "contradicted";
|
|
7
|
+
export interface VerifyClaim {
|
|
8
|
+
/** `c-01`, in document order. Stable for the same docs and the same model answer. */
|
|
9
|
+
id: string;
|
|
10
|
+
doc: string;
|
|
11
|
+
/** 1-based line in the doc; 0 for onboarding.html (its text has no stable lines). */
|
|
12
|
+
line: number;
|
|
13
|
+
text: string;
|
|
14
|
+
kind: ClaimKind;
|
|
15
|
+
verdict: ClaimVerdict;
|
|
16
|
+
source: "transcript" | "slack" | "none";
|
|
17
|
+
/** The quote the verdict rests on, as found in the source. Empty when unverified. */
|
|
18
|
+
quote: string;
|
|
19
|
+
/** `2026-11-18 [00:51:50]` for a transcript quote, else "". */
|
|
20
|
+
at: string;
|
|
21
|
+
/** Why the code overruled the model, when it did. */
|
|
22
|
+
note?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface VerifyPromise {
|
|
25
|
+
/** What Install Agent said it will do, in one sentence. */
|
|
26
|
+
text: string;
|
|
27
|
+
quote: string;
|
|
28
|
+
at: string;
|
|
29
|
+
/** The scope item in the docs that covers it; "" = a promise with no scope. */
|
|
30
|
+
scope: string;
|
|
31
|
+
}
|
|
32
|
+
/** One call's transcript: the date (and suffix) it is filed under, and its text. */
|
|
33
|
+
export interface CallTranscript {
|
|
34
|
+
call: string;
|
|
35
|
+
text: string;
|
|
36
|
+
}
|
|
37
|
+
export interface VerifySources {
|
|
38
|
+
transcripts: CallTranscript[];
|
|
39
|
+
/** Slack messages as `[YYYY-MM-DD] text`; null = Slack was not read. */
|
|
40
|
+
slack: string[] | null;
|
|
41
|
+
}
|
|
42
|
+
/** What the model must return. */
|
|
43
|
+
export interface RawVerifyAnswer {
|
|
44
|
+
claims: Array<{
|
|
45
|
+
doc?: string;
|
|
46
|
+
line?: number;
|
|
47
|
+
text?: string;
|
|
48
|
+
kind?: string;
|
|
49
|
+
verdict?: string;
|
|
50
|
+
source?: string;
|
|
51
|
+
quote?: string;
|
|
52
|
+
}>;
|
|
53
|
+
promises: Array<{
|
|
54
|
+
text?: string;
|
|
55
|
+
quote?: string;
|
|
56
|
+
scope?: string;
|
|
57
|
+
}>;
|
|
58
|
+
}
|
|
59
|
+
export declare class NoTranscriptError extends Error {
|
|
60
|
+
}
|
|
61
|
+
/** Lower case, letters and digits only, single spaces. What "the same words" means here. */
|
|
62
|
+
export declare function normalizeForMatch(text: string): string;
|
|
63
|
+
/** A quote must be at least this many words: "yes" or "the portal" proves nothing. */
|
|
64
|
+
export declare const MIN_QUOTE_WORDS = 4;
|
|
65
|
+
/** `[HH:MM:SS]` of the transcript line where the quote starts, or "". */
|
|
66
|
+
export declare function quoteTimestamp(transcript: string, quote: string): string;
|
|
67
|
+
/**
|
|
68
|
+
* Where a quote really is: the call (and timestamp) or Slack — or nothing.
|
|
69
|
+
* Literal containment after normalization, so a paraphrase does not count.
|
|
70
|
+
*/
|
|
71
|
+
export declare function findQuote(quote: string, sources: VerifySources): {
|
|
72
|
+
source: "transcript" | "slack";
|
|
73
|
+
at: string;
|
|
74
|
+
} | null;
|
|
75
|
+
/**
|
|
76
|
+
* The model's answer → the final claims. `supported` and `contradicted` both
|
|
77
|
+
* need a quote that is really in a source; without one the claim is
|
|
78
|
+
* UNVERIFIED and the note says why.
|
|
79
|
+
*/
|
|
80
|
+
export declare function checkClaims(raw: RawVerifyAnswer, sources: VerifySources): VerifyClaim[];
|
|
81
|
+
/** Promises: kept only when the quote is really in a source. */
|
|
82
|
+
export declare function checkPromises(raw: RawVerifyAnswer, sources: VerifySources): VerifyPromise[];
|
|
83
|
+
/** A doc with every mark of this command removed. */
|
|
84
|
+
export declare function stripMarks(text: string): string;
|
|
85
|
+
/**
|
|
86
|
+
* A doc with a mark on the line of each claim that is not supported. Marks
|
|
87
|
+
* are rebuilt from the claims on every run (old ones are stripped first), so a
|
|
88
|
+
* second run never stacks them. Never touched: the generated
|
|
89
|
+
* ACCESS_STATUS_TABLE block (ci/sync.mjs owns it) and lines the claim does not
|
|
90
|
+
* name. A table row keeps its closing pipe after the mark.
|
|
91
|
+
*/
|
|
92
|
+
export declare function applyMarks(doc: string, text: string, claims: VerifyClaim[]): string;
|
|
93
|
+
/** A doc as `<line number>| <text>` — what the model sees, so it can name a line. */
|
|
94
|
+
export declare function numberLines(text: string): string;
|
|
95
|
+
/** onboarding.html → its visible text, one block per line, scripts and styles dropped. */
|
|
96
|
+
export declare function htmlText(html: string): string;
|
|
97
|
+
export declare function buildVerifyPrompt(input: {
|
|
98
|
+
docs: Array<{
|
|
99
|
+
path: string;
|
|
100
|
+
text: string;
|
|
101
|
+
}>;
|
|
102
|
+
sources: VerifySources;
|
|
103
|
+
}): string;
|
|
104
|
+
/**
|
|
105
|
+
* The second pass: ONE transcript, promises only. The first call has every
|
|
106
|
+
* document and every transcript in front of it and spends its attention on the
|
|
107
|
+
* claims; asked in the same breath, it lists the sales promises and skips the
|
|
108
|
+
* ones a technician made an hour into the tech call. A promise nobody wrote
|
|
109
|
+
* down is the thing this pass exists to catch.
|
|
110
|
+
*/
|
|
111
|
+
export declare function buildPromisesPrompt(input: {
|
|
112
|
+
docs: Array<{
|
|
113
|
+
path: string;
|
|
114
|
+
text: string;
|
|
115
|
+
}>;
|
|
116
|
+
transcript: CallTranscript;
|
|
117
|
+
}): string;
|
|
118
|
+
/** Promises from several passes as one list: in call order, one per place in a call. */
|
|
119
|
+
export declare function mergePromises(lists: VerifyPromise[][]): VerifyPromise[];
|
|
120
|
+
/** The evidence file. Quotes are short and carry no email or phone. */
|
|
121
|
+
export declare function renderVerifyEvidence(result: {
|
|
122
|
+
slug: string;
|
|
123
|
+
date: string;
|
|
124
|
+
ref: string | null;
|
|
125
|
+
model: string;
|
|
126
|
+
claims: VerifyClaim[];
|
|
127
|
+
promises: VerifyPromise[];
|
|
128
|
+
sources: {
|
|
129
|
+
transcripts: string[];
|
|
130
|
+
slack: string;
|
|
131
|
+
};
|
|
132
|
+
}): string;
|
|
133
|
+
export interface TechCallVerifyOptions {
|
|
134
|
+
/** installagent/ workspace root. */
|
|
135
|
+
workspaceDir: string;
|
|
136
|
+
/**
|
|
137
|
+
* The client repo to check, when it is not `<workspace>/clients/client-<slug>`
|
|
138
|
+
* — the update pass checks its own scratch clone.
|
|
139
|
+
*/
|
|
140
|
+
repoDir?: string;
|
|
141
|
+
/** Check the docs at this git ref of the client repo instead of the working tree. */
|
|
142
|
+
ref?: string;
|
|
143
|
+
/** Read the registry at this git ref of team-clients instead of its working tree. */
|
|
144
|
+
registryRef?: string;
|
|
145
|
+
/** Use calls up to and including this date (YYYY-MM-DD). Default: every call. */
|
|
146
|
+
call?: string;
|
|
147
|
+
/** Write the marks and the evidence file into the working tree. Not allowed with `ref`. */
|
|
148
|
+
write?: boolean;
|
|
149
|
+
/** Skip the Slack channel. */
|
|
150
|
+
noSlack?: boolean;
|
|
151
|
+
/** Test seams and overrides. */
|
|
152
|
+
transcripts?: CallTranscript[];
|
|
153
|
+
slackMessages?: string[] | null;
|
|
154
|
+
askModel?: (prompt: string) => Promise<string>;
|
|
155
|
+
model?: string;
|
|
156
|
+
apiKey?: string;
|
|
157
|
+
fathomApiKey?: string;
|
|
158
|
+
slackToken?: string;
|
|
159
|
+
fetchImpl?: typeof fetch;
|
|
160
|
+
now?: Date;
|
|
161
|
+
}
|
|
162
|
+
export interface TechCallVerifyResult {
|
|
163
|
+
slug: string;
|
|
164
|
+
ref: string | null;
|
|
165
|
+
model: string;
|
|
166
|
+
docs: string[];
|
|
167
|
+
claims: VerifyClaim[];
|
|
168
|
+
promises: VerifyPromise[];
|
|
169
|
+
counts: {
|
|
170
|
+
supported: number;
|
|
171
|
+
unverified: number;
|
|
172
|
+
contradicted: number;
|
|
173
|
+
promisesWithoutScope: number;
|
|
174
|
+
};
|
|
175
|
+
sources: {
|
|
176
|
+
transcripts: string[];
|
|
177
|
+
slack: string;
|
|
178
|
+
};
|
|
179
|
+
/** Files written (repo-relative), or null on a read-only run. */
|
|
180
|
+
written: string[] | null;
|
|
181
|
+
/** The evidence file's text — on a read-only run this is where the list is. */
|
|
182
|
+
evidence: string;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Every call transcript on record for the client: the `<note>.transcript.md`
|
|
186
|
+
* files beside the notes, and for a note without one, Fathom by `fathom_id`.
|
|
187
|
+
*/
|
|
188
|
+
export declare function loadTranscripts(slug: string, options: TechCallVerifyOptions, fetchImpl: typeof fetch): Promise<CallTranscript[]>;
|
|
189
|
+
/** The model's text → the raw answer, or null when it is not the shape asked for. */
|
|
190
|
+
export declare function parseVerifyAnswer(text: string): RawVerifyAnswer | null;
|
|
191
|
+
export declare function techCallVerify(slug: string, options: TechCallVerifyOptions): Promise<TechCallVerifyResult>;
|