@wirecat/zoom-cli 0.10.0 → 0.12.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/answers.d.ts +129 -0
- package/dist/answers.d.ts.map +1 -0
- package/dist/answers.js +47 -0
- package/dist/answers.js.map +1 -0
- package/dist/commands.js +2 -1
- package/dist/commands.js.map +1 -1
- package/dist/execution.d.ts +3 -0
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +2 -0
- package/dist/execution.js.map +1 -1
- package/dist/mcp-server.d.ts +1 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +42 -13
- package/dist/mcp-server.js.map +1 -1
- package/dist/meeting-project-evidence-commands.d.ts +12 -0
- package/dist/meeting-project-evidence-commands.d.ts.map +1 -0
- package/dist/meeting-project-evidence-commands.js +15 -0
- package/dist/meeting-project-evidence-commands.js.map +1 -0
- package/dist/meeting-project-evidence-mcp.d.ts +138 -0
- package/dist/meeting-project-evidence-mcp.d.ts.map +1 -0
- package/dist/meeting-project-evidence-mcp.js +39 -0
- package/dist/meeting-project-evidence-mcp.js.map +1 -0
- package/dist/meeting-search-commands.d.ts.map +1 -1
- package/dist/meeting-search-commands.js +50 -50
- package/dist/meeting-search-commands.js.map +1 -1
- package/dist/program.d.ts +4 -2
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +31 -14
- package/dist/program.js.map +1 -1
- package/dist/store-connection.d.ts.map +1 -1
- package/dist/store-connection.js +15 -1
- package/dist/store-connection.js.map +1 -1
- package/package.json +4 -3
- package/skills/zoom-cli/SKILL.md +19 -6
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { StoreConnection } from "./program.js";
|
|
2
|
+
/** The shared adapter validates before this host opens a connection, and output follows cleanup. */
|
|
3
|
+
export declare const readProjectEvidenceTool: (deps: {
|
|
4
|
+
connectStore: () => Promise<StoreConnection>;
|
|
5
|
+
now?: () => number;
|
|
6
|
+
}, input: unknown, signal: AbortSignal) => Promise<{
|
|
7
|
+
content: {
|
|
8
|
+
type: "text";
|
|
9
|
+
text: string;
|
|
10
|
+
}[];
|
|
11
|
+
structuredContent: {
|
|
12
|
+
error: {
|
|
13
|
+
code: "authentication_error" | "cancelled" | "configuration_error" | "confirmation_required" | "internal_error" | "invalid_response" | "network_error" | "not_found" | "outcome_unknown" | "permission_error" | "provider_error" | "provider_unavailable" | "rate_limited" | "timeout" | "validation_error";
|
|
14
|
+
reason: string;
|
|
15
|
+
message: string;
|
|
16
|
+
param?: string | undefined;
|
|
17
|
+
details?: {
|
|
18
|
+
[x: string]: unknown;
|
|
19
|
+
} | undefined;
|
|
20
|
+
next?: {
|
|
21
|
+
step: string;
|
|
22
|
+
command: string;
|
|
23
|
+
args: {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
why: string;
|
|
27
|
+
}[] | undefined;
|
|
28
|
+
run_id?: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
isError: true;
|
|
32
|
+
} | {
|
|
33
|
+
content: {
|
|
34
|
+
type: "text";
|
|
35
|
+
text: string;
|
|
36
|
+
}[];
|
|
37
|
+
structuredContent: {
|
|
38
|
+
item: {
|
|
39
|
+
schema_version: 1;
|
|
40
|
+
kind: "meeting_project_evidence";
|
|
41
|
+
account_id: string;
|
|
42
|
+
query: string;
|
|
43
|
+
project: {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
key: string | null;
|
|
47
|
+
};
|
|
48
|
+
term: {
|
|
49
|
+
name: string;
|
|
50
|
+
kind: "alias" | "canonical" | "key";
|
|
51
|
+
alias_id?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
hits: {
|
|
54
|
+
ref: string;
|
|
55
|
+
meeting: string;
|
|
56
|
+
scope: "chat" | "summary" | "transcript";
|
|
57
|
+
id: string;
|
|
58
|
+
excerpt: string;
|
|
59
|
+
offset_ms: number | null;
|
|
60
|
+
}[];
|
|
61
|
+
association: "unconfirmed-word-evidence";
|
|
62
|
+
vocabulary_fingerprint: string;
|
|
63
|
+
selection: {
|
|
64
|
+
meeting_id?: string | undefined;
|
|
65
|
+
identity_id?: string | undefined;
|
|
66
|
+
person_id?: string | undefined;
|
|
67
|
+
tag_id?: string | undefined;
|
|
68
|
+
event_id?: string | undefined;
|
|
69
|
+
series_id?: string | undefined;
|
|
70
|
+
since?: string | undefined;
|
|
71
|
+
until?: string | undefined;
|
|
72
|
+
};
|
|
73
|
+
limits: {
|
|
74
|
+
limit: number;
|
|
75
|
+
max_read_bytes: number;
|
|
76
|
+
max_vocabulary_read_bytes: number;
|
|
77
|
+
max_terms: number;
|
|
78
|
+
};
|
|
79
|
+
page: {
|
|
80
|
+
limit: number;
|
|
81
|
+
has_more: boolean;
|
|
82
|
+
cursor?: string | undefined;
|
|
83
|
+
};
|
|
84
|
+
coverage: {
|
|
85
|
+
archive_completeness: "unknown";
|
|
86
|
+
current_revisions: true;
|
|
87
|
+
indexing: "pending" | "ready";
|
|
88
|
+
index_completeness: "unknown";
|
|
89
|
+
term_index: number;
|
|
90
|
+
terms_total: number;
|
|
91
|
+
remaining_terms: number;
|
|
92
|
+
duplicates: "may-repeat-between-terms";
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
next?: import("@wirecat/cli-base/standards").NextStep[];
|
|
96
|
+
missing?: import("@wirecat/cli-base/standards").Missing[];
|
|
97
|
+
meta: {
|
|
98
|
+
run_id: string;
|
|
99
|
+
duration_ms: number;
|
|
100
|
+
accounts?: string[] | undefined;
|
|
101
|
+
skipped?: {
|
|
102
|
+
account: string;
|
|
103
|
+
why: string;
|
|
104
|
+
}[] | undefined;
|
|
105
|
+
truncated?: boolean | undefined;
|
|
106
|
+
};
|
|
107
|
+
} | {
|
|
108
|
+
error: {
|
|
109
|
+
code: "authentication_error" | "cancelled" | "configuration_error" | "confirmation_required" | "internal_error" | "invalid_response" | "network_error" | "not_found" | "outcome_unknown" | "permission_error" | "provider_error" | "provider_unavailable" | "rate_limited" | "timeout" | "validation_error";
|
|
110
|
+
reason: string;
|
|
111
|
+
message: string;
|
|
112
|
+
param?: string | undefined;
|
|
113
|
+
details?: {
|
|
114
|
+
[x: string]: unknown;
|
|
115
|
+
} | undefined;
|
|
116
|
+
next?: {
|
|
117
|
+
step: string;
|
|
118
|
+
command: string;
|
|
119
|
+
args: {
|
|
120
|
+
[x: string]: unknown;
|
|
121
|
+
};
|
|
122
|
+
why: string;
|
|
123
|
+
}[] | undefined;
|
|
124
|
+
run_id?: string | undefined;
|
|
125
|
+
};
|
|
126
|
+
meta: {
|
|
127
|
+
run_id: string;
|
|
128
|
+
duration_ms: number;
|
|
129
|
+
accounts?: string[] | undefined;
|
|
130
|
+
skipped?: {
|
|
131
|
+
account: string;
|
|
132
|
+
why: string;
|
|
133
|
+
}[] | undefined;
|
|
134
|
+
truncated?: boolean | undefined;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
}>;
|
|
138
|
+
//# sourceMappingURL=meeting-project-evidence-mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meeting-project-evidence-mcp.d.ts","sourceRoot":"","sources":["../src/meeting-project-evidence-mcp.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,oGAAoG;AACpG,eAAO,MAAM,uBAAuB,SAC5B;IAAE,YAAY,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAAE,SACnE,OAAO,UACN,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkCQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAClC,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CliError, errorObjectOf, mcpErrorResult } from "@wirecat/cli-base";
|
|
2
|
+
import { failureContext } from "@wirecat/cli-core";
|
|
3
|
+
import { callMeetingProjectEvidenceTool } from "@wirecat/cli-core/meetings/mcp";
|
|
4
|
+
import { readMetadata } from "./answers.js";
|
|
5
|
+
/** The shared adapter validates before this host opens a connection, and output follows cleanup. */
|
|
6
|
+
export const readProjectEvidenceTool = async (deps, input, signal) => {
|
|
7
|
+
const meta = readMetadata(deps.now);
|
|
8
|
+
let connection;
|
|
9
|
+
let closeFailed = false;
|
|
10
|
+
let result;
|
|
11
|
+
try {
|
|
12
|
+
result = await callMeetingProjectEvidenceTool(async (project, request) => {
|
|
13
|
+
connection = await deps.connectStore();
|
|
14
|
+
request.signal?.throwIfAborted();
|
|
15
|
+
if (!Number.isSafeInteger(connection.accountId) || connection.accountId < 1)
|
|
16
|
+
throw new CliError("configuration_error", "selected meeting account is unavailable");
|
|
17
|
+
if (!connection.meetingProjectEvidence)
|
|
18
|
+
throw new CliError("configuration_error", "project evidence capability is unavailable");
|
|
19
|
+
return connection.meetingProjectEvidence(project, request);
|
|
20
|
+
}, input, signal, failureContext(), deps.now?.());
|
|
21
|
+
}
|
|
22
|
+
finally {
|
|
23
|
+
try {
|
|
24
|
+
await connection?.close();
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
closeFailed = true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (closeFailed)
|
|
31
|
+
return mcpErrorResult(errorObjectOf(undefined, failureContext()));
|
|
32
|
+
if (signal.aborted)
|
|
33
|
+
return mcpErrorResult(errorObjectOf(new CliError("cancelled", "meeting read was cancelled"), failureContext()));
|
|
34
|
+
if ("isError" in result && result.isError)
|
|
35
|
+
return result;
|
|
36
|
+
const answer = { ...result.structuredContent, meta: meta() };
|
|
37
|
+
return { content: [{ type: "text", text: JSON.stringify(answer) }], structuredContent: answer };
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=meeting-project-evidence-mcp.js.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,GAAG,EAAE,EAAE,CACb,CAAA;IACH,CAAC;YAAS,CAAC;QACT,IAAI,CAAC;YACH,MAAM,UAAU,EAAE,KAAK,EAAE,CAAA;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,WAAW,GAAG,IAAI,CAAA;QACpB,CAAC;IACH,CAAC;IACD,IAAI,WAAW;QAAE,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC,CAAA;IAClF,IAAI,MAAM,CAAC,OAAO;QAChB,OAAO,cAAc,CAAC,aAAa,CAAC,IAAI,QAAQ,CAAC,WAAW,EAAE,4BAA4B,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,CAAA;IACjH,IAAI,SAAS,IAAI,MAAM,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,MAAM,CAAA;IACxD,MAAM,MAAM,GAAG,EAAE,GAAG,MAAM,CAAC,iBAAiB,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAA;IAC5D,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAA;AAC1G,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meeting-search-commands.d.ts","sourceRoot":"","sources":["../src/meeting-search-commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meeting-search-commands.d.ts","sourceRoot":"","sources":["../src/meeting-search-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,gBAAgB,EAKtB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAGrE,OAAO,EAAE,KAAK,2BAA2B,EAA2B,MAAM,gCAAgC,CAAA;AAE1G,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,wBAAwB,GACzB,MAAM,gCAAgC,CAAA;AA4DvC,2GAA2G;AAC3G,eAAO,MAAM,wBAAwB,YAC1B,OAAO,QACV;IACJ,KAAK,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAA;IACtC,OAAO,EAAE,MAAM,OAAO,CAAC,2BAA2B,CAAC,CAAA;IACnD,OAAO,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CAAA;IAC3C,OAAO,EAAE,MAAM,OAAO,CAAA;IACtB,MAAM,EAAE,MAAM,WAAW,GAAG,SAAS,CAAA;IACrC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACjC,KACA,IAgFF,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { annotate } from "@wirecat/cli-base/commands";
|
|
2
|
-
import {
|
|
2
|
+
import { meetingHitsList } from "@wirecat/cli-core/meetings";
|
|
3
|
+
import { createMeetingSearchCommand, meetingHitSearchRequest, meetingSearchArguments, } from "@wirecat/cli-core/meetings/cli";
|
|
3
4
|
import { ZoomError } from "./errors.js";
|
|
4
5
|
import { bytes } from "./execution.js";
|
|
5
6
|
import { validateMeetingSemantic } from "./meeting-semantic-commands.js";
|
|
@@ -53,55 +54,54 @@ const chunkCursor = (cursor) => {
|
|
|
53
54
|
};
|
|
54
55
|
/** One meeting search: stored words by default, meaning with --model, an archive folder with --archive. */
|
|
55
56
|
export const addMeetingSearchCommands = (program, deps) => {
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
},
|
|
57
|
+
const execute = async (query, request, options) => {
|
|
58
|
+
if (options.archive !== undefined) {
|
|
59
|
+
refuse(options, [
|
|
60
|
+
...STORE_FILTERS,
|
|
61
|
+
"cursor",
|
|
62
|
+
"maxReadBytes",
|
|
63
|
+
"model",
|
|
64
|
+
"baseUrl",
|
|
65
|
+
"dims",
|
|
66
|
+
"maxChunks",
|
|
67
|
+
"maxRows",
|
|
68
|
+
"maxTextBytes",
|
|
69
|
+
], "to an archive folder");
|
|
70
|
+
return deps.archive(options.archive, query, {
|
|
71
|
+
uuid: options.uuid,
|
|
72
|
+
fileIds: options.fileIds?.split(",").map((id) => id.trim()),
|
|
73
|
+
maxBytes: options.maxBytes,
|
|
74
|
+
limit: options.limit,
|
|
75
|
+
signal: deps.signal(),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
refuse(options, ["uuid", "fileIds", "maxBytes"], "without --archive");
|
|
79
|
+
if (options.model !== undefined) {
|
|
80
|
+
refuse(options, [...STORE_FILTERS, "maxReadBytes"], "to a search by meaning");
|
|
81
|
+
const meaning = {
|
|
82
|
+
model: options.model,
|
|
83
|
+
baseUrl: options.baseUrl,
|
|
84
|
+
dims: options.dims,
|
|
85
|
+
limit: options.limit,
|
|
86
|
+
maxChunks: options.maxChunks,
|
|
87
|
+
afterChunkId: chunkCursor(options.cursor),
|
|
88
|
+
maxRows: options.maxRows,
|
|
89
|
+
maxTextBytes: options.maxTextBytes,
|
|
90
|
+
buildMissing: true,
|
|
91
|
+
signal: deps.signal(),
|
|
92
|
+
};
|
|
93
|
+
validateMeetingSemantic(query, meaning);
|
|
94
|
+
if (meaning.baseUrl !== undefined && deps.offline())
|
|
95
|
+
throw new ZoomError("configuration_error", "remote embeddings require network access; remove --offline");
|
|
96
|
+
const found = (await (await deps.meaning()).search(query, meaning));
|
|
97
|
+
return { ...found, nextCursor: found.nextChunkId === undefined ? null : String(found.nextChunkId) };
|
|
98
|
+
}
|
|
99
|
+
refuse(options, ["baseUrl", "dims", "maxChunks", "maxRows", "maxTextBytes"], "without --model");
|
|
100
|
+
return meetingHitsList(await (await deps.words())(query, request), request.limit ?? 100, "search meetings", meetingSearchArguments(query, options));
|
|
101
|
+
};
|
|
102
|
+
const command = createMeetingSearchCommand(program).action(async (query, options) => {
|
|
103
|
+
const request = meetingHitSearchRequest(query, options, deps.signal());
|
|
104
|
+
deps.output(await execute(query, request, options));
|
|
105
105
|
});
|
|
106
106
|
command
|
|
107
107
|
.description("find words in stored meetings, by meaning with --model, or in an archive folder")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meeting-search-commands.js","sourceRoot":"","sources":["../src/meeting-search-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"meeting-search-commands.js","sourceRoot":"","sources":["../src/meeting-search-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EACL,0BAA0B,EAI1B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAoC,uB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YAClE,2DAA2D;YAC3D,6EAA6E;SAC9E;KACF,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
package/dist/program.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SleepLike } from "@wirecat/cli-base";
|
|
2
|
-
import { type MeetingSource, type MeetingStore, type MeetingTranscriptReceiptStore, type MeetingTranscriptStore } from "@wirecat/cli-core/meetings";
|
|
2
|
+
import { type MeetingProjectDiscoveryReader, type MeetingSource, type MeetingStore, type MeetingTranscriptReceiptStore, type MeetingTranscriptStore } from "@wirecat/cli-core/meetings";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import { type ArchiveService, type ArchiveTranscriptService, type RecordingsService, type RemoteMeetingsService } from "./archive-commands.js";
|
|
5
5
|
import { readDownloadedFiles } from "./files.js";
|
|
@@ -19,6 +19,7 @@ export interface StoreConnection {
|
|
|
19
19
|
appendTranscriptsWithReceipt?: MeetingTranscriptReceiptStore["appendTranscriptsWithReceipt"];
|
|
20
20
|
meetingIntegration?: MeetingIntegrationCapabilities;
|
|
21
21
|
meetingSearch?: MeetingHitSearch;
|
|
22
|
+
meetingProjectEvidence?: MeetingProjectDiscoveryReader;
|
|
22
23
|
meetingTranscription?: LocalTranscriptionCapabilities;
|
|
23
24
|
unifiedSearch?: UnifiedSearch;
|
|
24
25
|
meetingContext?: MeetingContextCapabilities;
|
|
@@ -28,7 +29,7 @@ export interface StoreConnectRequest {
|
|
|
28
29
|
profile: string;
|
|
29
30
|
externalId: string;
|
|
30
31
|
intent: "read" | "ingestion";
|
|
31
|
-
capability?: "transcript-append" | "meeting-integration" | "meeting-search";
|
|
32
|
+
capability?: "transcript-append" | "meeting-integration" | "meeting-search" | "meeting-project-evidence";
|
|
32
33
|
}
|
|
33
34
|
export interface ProgramDeps {
|
|
34
35
|
configPath: string;
|
|
@@ -43,6 +44,7 @@ export interface ProgramDeps {
|
|
|
43
44
|
meetingSemantic?: MeetingSemanticCapabilities;
|
|
44
45
|
meetingIntegration?: MeetingIntegrationCapabilities;
|
|
45
46
|
meetingSearch?: MeetingHitSearch;
|
|
47
|
+
meetingProjectEvidence?: MeetingProjectDiscoveryReader;
|
|
46
48
|
meetingTranscription?: LocalTranscriptionCapabilities;
|
|
47
49
|
source?: MeetingSource;
|
|
48
50
|
recordings?: RecordingsService;
|
package/dist/program.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAEA,OAAO,EAYL,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAEA,OAAO,EAYL,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAIL,KAAK,6BAA6B,EAClC,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAE5B,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,OAAO,EAAkB,MAAM,WAAW,CAAA;AAInD,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAE7B,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAA;AAO9B,OAAO,EAA2B,mBAAmB,EAA2B,MAAM,YAAY,CAAA;AAGlG,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAA;AAG9E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAA;AAEtE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAA;AAG9E,OAAO,EAA4B,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC9F,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAEjC,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAkC,KAAK,wBAAwB,EAAE,M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AA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;IACvB,YAAY,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IACvE,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE;QACnB,MAAM,EAAE,WAAW,CAAA;QACnB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,oBAAoB,CAAC,EAAE,OAAO,CAAA;QAC9B,qBAAqB,CAAC,EAAE,OAAO,CAAA;QAC/B,aAAa,CAAC,EAAE,mBAAmB,CAAA;KACpC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACnB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAClE;AAuDD,eAAO,MAAM,aAAa,SAAU,WAAW,KAAG,OAu5BjD,CAAA;AACD,eAAO,MAAM,GAAG,SAAgB,MAAM,EAAE,QAAQ,WAAW,KAAG,OAAO,CAAC,MAAM,CAuB3E,CAAA;AAED,eAAO,MAAM,aAAa,YACf,OAAO,QACV,SAAS,MAAM,EAAE,QACjB,IAAI,CAAC,WAAW,EAAE,YAAY,GAAG,aAAa,CAAC,uBAEpD,MAWF,CAAA"}
|
package/dist/program.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { homedir } from "node:os";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { createDeadline, createRenderer, errorObjectOf, errorRecordOf, exitCodeOfError, fieldsOf, isCliError, projectFields, realSleep, renderError, } from "@wirecat/cli-base";
|
|
4
|
+
import { failureContext } from "@wirecat/cli-core";
|
|
4
5
|
import { importFiles, listed, MeetingError, pull, } from "@wirecat/cli-core/meetings";
|
|
5
6
|
import { addMeetingCommands, addMeetingPassageCommand } from "@wirecat/cli-core/meetings/cli";
|
|
6
7
|
import { Command, CommanderError } from "commander";
|
|
7
8
|
import { addZoomSkillCommands } from "./agent-skill.js";
|
|
9
|
+
import { meetingAnswer } from "./answers.js";
|
|
8
10
|
import { ZoomApiSource } from "./api.js";
|
|
9
11
|
import { addArchiveCommands, } from "./archive-commands.js";
|
|
10
12
|
import { applyArchiveImport, preflightArchiveImport } from "./archive-import.js";
|
|
@@ -20,6 +22,7 @@ import { addLocalTranscriptionCommands } from "./local-transcription-commands.js
|
|
|
20
22
|
import { login } from "./login.js";
|
|
21
23
|
import { addMeetingContextCommands } from "./meeting-context-commands.js";
|
|
22
24
|
import { addMeetingIntegrationCommands } from "./meeting-integration-commands.js";
|
|
25
|
+
import { addProjectEvidenceCommand } from "./meeting-project-evidence-commands.js";
|
|
23
26
|
import { addMeetingSearchCommands } from "./meeting-search-commands.js";
|
|
24
27
|
import { addMeetingEmbeddingCommand, validateMeetingModel, } from "./meeting-semantic-commands.js";
|
|
25
28
|
import { createRecordingScheduleService } from "./recording-schedule.js";
|
|
@@ -52,11 +55,17 @@ const unavailableStore = {
|
|
|
52
55
|
cursor: unavailable,
|
|
53
56
|
setCursor: unavailable,
|
|
54
57
|
};
|
|
55
|
-
const render = (value, format, deps, fields, preserveEnvelope = false, providerKeys = false) => {
|
|
58
|
+
const render = (value, format, deps, fields, preserveEnvelope = false, providerKeys = false, seal) => {
|
|
56
59
|
if (!providerKeys)
|
|
57
60
|
value = snakeKeys(value);
|
|
58
|
-
if (
|
|
59
|
-
value =
|
|
61
|
+
if (seal)
|
|
62
|
+
value = meetingAnswer(value, seal());
|
|
63
|
+
if (fields) {
|
|
64
|
+
if (seal && value && typeof value === "object" && "item" in value)
|
|
65
|
+
value = { ...value, item: projectFields(value.item, fields) };
|
|
66
|
+
else
|
|
67
|
+
value = projectFields(value, fields);
|
|
68
|
+
}
|
|
60
69
|
const chunks = [];
|
|
61
70
|
const renderer = createRenderer({
|
|
62
71
|
format: format === "text" ? (deps.outputIsTTY ? "pretty" : "json") : format,
|
|
@@ -64,6 +73,7 @@ const render = (value, format, deps, fields, preserveEnvelope = false, providerK
|
|
|
64
73
|
streams: { data: (text) => chunks.push(`${text}\n`), diagnostic: deps.diagnostic },
|
|
65
74
|
});
|
|
66
75
|
if (!preserveEnvelope &&
|
|
76
|
+
!seal &&
|
|
67
77
|
format === "jsonl" &&
|
|
68
78
|
typeof value === "object" &&
|
|
69
79
|
value !== null &&
|
|
@@ -147,7 +157,7 @@ export const createProgram = (deps) => {
|
|
|
147
157
|
if (opts.json && opts.jsonl)
|
|
148
158
|
throw new ZoomError("validation_error", "choose --json or --jsonl");
|
|
149
159
|
fields = opts.fields === undefined ? undefined : fieldsOf(opts.fields);
|
|
150
|
-
execution = startExecution(action, { signal: deps.signal, sleep: deps.sleep });
|
|
160
|
+
execution = startExecution(action, { signal: deps.signal, sleep: deps.sleep, now: deps.now });
|
|
151
161
|
checkCancelled(signal());
|
|
152
162
|
let family = action;
|
|
153
163
|
while (family.parent && family.parent !== program)
|
|
@@ -194,7 +204,7 @@ export const createProgram = (deps) => {
|
|
|
194
204
|
}
|
|
195
205
|
requireAccount();
|
|
196
206
|
});
|
|
197
|
-
const output = (value) => buffer(render(value, program.opts().json ? "json" : program.opts().jsonl ? "jsonl" : "text", deps, fields));
|
|
207
|
+
const output = (value) => buffer(render(value, program.opts().json ? "json" : program.opts().jsonl ? "jsonl" : "text", deps, fields, true, false, execution?.meta));
|
|
198
208
|
const outputItems = async (values) => {
|
|
199
209
|
const format = program.opts().jsonl ? "jsonl" : program.opts().json || !deps.outputIsTTY ? "json" : "text";
|
|
200
210
|
const metadata = listed([]);
|
|
@@ -212,12 +222,12 @@ export const createProgram = (deps) => {
|
|
|
212
222
|
buffer(render(projected, "json", deps).trimEnd());
|
|
213
223
|
}
|
|
214
224
|
else
|
|
215
|
-
buffer(render(projected, format, deps));
|
|
225
|
+
buffer(render(projected, format, deps, undefined, true, false, execution?.meta));
|
|
216
226
|
count++;
|
|
217
227
|
}
|
|
218
228
|
metadata.limit = count;
|
|
219
229
|
if (format === "json")
|
|
220
|
-
buffer(`]
|
|
230
|
+
buffer(`],"page":${JSON.stringify({ limit: Math.max(1, count), has_more: false })},"meta":${JSON.stringify(execution?.meta())}}\n`);
|
|
221
231
|
else if (format === "text")
|
|
222
232
|
buffer(render(count ? metadata : listed([]), "text", deps));
|
|
223
233
|
};
|
|
@@ -294,7 +304,7 @@ export const createProgram = (deps) => {
|
|
|
294
304
|
now: deps.now,
|
|
295
305
|
write: (value, format) => {
|
|
296
306
|
const paged = typeof value === "object" && value !== null && "page" in value && typeof value.page === "object";
|
|
297
|
-
buffer(render(value, format, deps, fields, paged, true));
|
|
307
|
+
buffer(render(value, format, deps, fields, paged, true, execution?.meta));
|
|
298
308
|
},
|
|
299
309
|
writeFile: deps.writeFile
|
|
300
310
|
? async (path, content) => {
|
|
@@ -385,7 +395,7 @@ export const createProgram = (deps) => {
|
|
|
385
395
|
let watchSince;
|
|
386
396
|
const watchSleep = deps.sleep;
|
|
387
397
|
const receipt = async (value) => {
|
|
388
|
-
const text = render(value, program.opts().jsonl ? "jsonl" : program.opts().json ? "json" : "text", deps, fields);
|
|
398
|
+
const text = render(value, program.opts().jsonl ? "jsonl" : program.opts().json ? "json" : "text", deps, fields, true, false, execution?.meta);
|
|
389
399
|
const operation = signal();
|
|
390
400
|
const grace = operation.aborted ? createDeadline({ timeoutMs: 1000 }) : undefined;
|
|
391
401
|
try {
|
|
@@ -677,7 +687,7 @@ export const createProgram = (deps) => {
|
|
|
677
687
|
});
|
|
678
688
|
addIngestionSearchCommands(program, {
|
|
679
689
|
signal,
|
|
680
|
-
output: (value) => buffer(render(value, program.opts().jsonl ? "jsonl" : program.opts().json ? "json" : "text", deps, fields, true)),
|
|
690
|
+
output: (value) => buffer(render(value, program.opts().jsonl ? "jsonl" : program.opts().json ? "json" : "text", deps, fields, true, false, execution?.meta)),
|
|
681
691
|
outputItems,
|
|
682
692
|
receipt,
|
|
683
693
|
preflight: preflightArchiveImport,
|
|
@@ -739,7 +749,14 @@ export const createProgram = (deps) => {
|
|
|
739
749
|
});
|
|
740
750
|
return connection;
|
|
741
751
|
};
|
|
742
|
-
const integrationOutput = (value) => buffer(render(value, program.opts().jsonl ? "jsonl" : program.opts().json ? "json" : "text", deps, fields, true));
|
|
752
|
+
const integrationOutput = (value) => buffer(render(value, program.opts().jsonl ? "jsonl" : program.opts().json ? "json" : "text", deps, fields, true, false, execution?.meta));
|
|
753
|
+
addProjectEvidenceCommand(program, {
|
|
754
|
+
read: deps.meetingProjectEvidence,
|
|
755
|
+
connect: () => integrationConnection("meeting-project-evidence"),
|
|
756
|
+
signal,
|
|
757
|
+
now: deps.now,
|
|
758
|
+
output: integrationOutput,
|
|
759
|
+
});
|
|
743
760
|
addMeetingIntegrationCommands(program, {
|
|
744
761
|
signal,
|
|
745
762
|
output: integrationOutput,
|
|
@@ -791,7 +808,7 @@ export const createProgram = (deps) => {
|
|
|
791
808
|
};
|
|
792
809
|
addMeetingContextCommands(program, {
|
|
793
810
|
signal,
|
|
794
|
-
output: (value) => buffer(render(value, program.opts().jsonl ? "jsonl" : program.opts().json ? "json" : "text", deps, fields, true)),
|
|
811
|
+
output: (value) => buffer(render(value, program.opts().jsonl ? "jsonl" : program.opts().json ? "json" : "text", deps, fields, true, false, execution?.meta)),
|
|
795
812
|
context: meetingContext,
|
|
796
813
|
});
|
|
797
814
|
addMeetingPassageCommand(program, {
|
|
@@ -806,7 +823,7 @@ export const createProgram = (deps) => {
|
|
|
806
823
|
},
|
|
807
824
|
output: (result, format) => {
|
|
808
825
|
if (format === "json")
|
|
809
|
-
buffer(render(result.packet, program.opts().jsonl ? "jsonl" : "json", deps, fields, true));
|
|
826
|
+
buffer(render(result.packet, program.opts().jsonl ? "jsonl" : "json", deps, fields, true, false, execution?.meta));
|
|
810
827
|
else
|
|
811
828
|
buffer(result.content);
|
|
812
829
|
},
|
|
@@ -941,7 +958,7 @@ export const reportFailure = (failure, args, deps, command = "zm") => {
|
|
|
941
958
|
const end = args.indexOf("--");
|
|
942
959
|
const flags = args.slice(0, end < 0 ? undefined : end);
|
|
943
960
|
const machine = flags.some((word) => word === "--json" || word === "--jsonl");
|
|
944
|
-
const object = errorObjectOf(failure);
|
|
961
|
+
const object = errorObjectOf(failure, failureContext());
|
|
945
962
|
const record = flags.includes("--debug")
|
|
946
963
|
? errorRecordOf(failure, object, { command, service: "zm", version: VERSION })
|
|
947
964
|
: undefined;
|