teamshare-bridge 0.26.25 → 0.27.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/cli/commands/build.js +48 -22
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/plan.js +40 -2
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/planner.js +3 -1
- package/dist/cli/commands/planner.js.map +1 -1
- package/dist/cli/commands/research.js +38 -1
- package/dist/cli/commands/research.js.map +1 -1
- package/dist/cli/commands/run.js +54 -3
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/worker.js +52 -59
- package/dist/cli/commands/worker.js.map +1 -1
- package/dist/cli/commands/workflow.js +36 -2
- package/dist/cli/commands/workflow.js.map +1 -1
- package/dist/lib/api-content.d.ts +38 -0
- package/dist/lib/api-content.js +14 -0
- package/dist/lib/api-content.js.map +1 -1
- package/dist/lib/brief.d.ts +12 -0
- package/dist/lib/brief.js +10 -7
- package/dist/lib/brief.js.map +1 -1
- package/dist/lib/git/git-finalize.d.ts +2 -0
- package/dist/lib/git/git-finalize.js +32 -5
- package/dist/lib/git/git-finalize.js.map +1 -1
- package/dist/lib/git/git-pipeline.d.ts +3 -2
- package/dist/lib/git/git-pipeline.js.map +1 -1
- package/dist/lib/git/git-presence.js +1 -1
- package/dist/lib/git/git-presence.js.map +1 -1
- package/dist/lib/git/index.d.ts +2 -2
- package/dist/lib/git/index.js +4 -1
- package/dist/lib/git/index.js.map +1 -1
- package/dist/lib/git/pr-token.d.ts +74 -16
- package/dist/lib/git/pr-token.js +160 -16
- package/dist/lib/git/pr-token.js.map +1 -1
- package/dist/lib/run-report.d.ts +38 -11
- package/dist/lib/run-report.js +137 -88
- package/dist/lib/run-report.js.map +1 -1
- package/dist/lib/tools/pptx-deck.d.ts +90 -0
- package/dist/lib/tools/pptx-deck.js +1302 -147
- package/dist/lib/tools/pptx-deck.js.map +1 -1
- package/package.json +1 -1
- package/skills/teamshare-cdd/SKILL.md +219 -215
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-token.js","sourceRoot":"","sources":["../../../src/lib/git/pr-token.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"pr-token.js","sourceRoot":"","sources":["../../../src/lib/git/pr-token.ts"],"names":[],"mappings":";;AA6EA,kCAcC;AAYD,oDAKC;AAiBD,kDAgCC;AAYD,0CAiDC;AAiBD,wCAoBC;AAOD,sCAaC;AAnRD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,2DAA6D;AAC7D,8CAAqD;AACrD,yCAAyC;AAEzC;;;;;;;GAOG;AACH,MAAM,oBAAoB,GACxB,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,+BAA+B,CAAC;AA+BnE,gFAAgF;AAChF,SAAgB,WAAW;IACzB,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAA,iCAAY,EAAC,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;YAChD,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;YACnC,WAAW,EAAE,IAAI;YACjB,GAAG,EAAE,IAAA,uBAAe,GAAE;YACtB,OAAO,EAAE,MAAM;SAChB,CAAC,CAAC;QACH,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;QACzB,OAAO,KAAK,IAAI,IAAI,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,oBAAoB,CAAC,KAAa;IAChD,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IACvB,IAAI,oCAAoC,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9D,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,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B,OAAO,sEAAsE,CAAC;QAC3G;YACE,OAAO,oBAAoB,IAAI,KAAK,OAAO,yBAAyB,CAAC;IACzE,CAAC;AACH,CAAC"}
|
package/dist/lib/run-report.d.ts
CHANGED
|
@@ -1,37 +1,64 @@
|
|
|
1
1
|
import { TeamshareApi } from './api';
|
|
2
2
|
import type { StashResult } from './git/git-runner';
|
|
3
|
+
export type RunReportKind = 'run' | 'build' | 'orchestrator' | 'plan' | 'tool' | 'workflow';
|
|
3
4
|
export interface RunReportInput {
|
|
4
5
|
api: TeamshareApi;
|
|
5
6
|
projectId: string;
|
|
6
|
-
|
|
7
|
+
/** Task-bound reports (every kind except a detached tool run). */
|
|
8
|
+
taskId?: string;
|
|
9
|
+
toolRunId?: string;
|
|
10
|
+
workflowRunId?: string;
|
|
7
11
|
agentId: string;
|
|
8
12
|
taskTitle: string;
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
kind: RunReportKind;
|
|
14
|
+
/** Per-run identity (`<taskId>-<session8>`, tool `runId`, …). */
|
|
15
|
+
runKey: string;
|
|
11
16
|
status: string;
|
|
17
|
+
/** Fallback narrative when the agent wrote no report file. */
|
|
12
18
|
summary: string;
|
|
13
|
-
/**
|
|
19
|
+
/** Per-run agent file (`~/.teamshare/reports/<runKey>.md`). */
|
|
20
|
+
reportPath: string;
|
|
21
|
+
/** Fact lines about the work (branch, worktree, attempts, git outcome). */
|
|
14
22
|
details?: string[];
|
|
23
|
+
/** Verification lines (checklist/subtask counts, finalize outcome). */
|
|
24
|
+
verification?: string[];
|
|
25
|
+
notes?: string[];
|
|
15
26
|
gitLine?: string;
|
|
16
|
-
|
|
27
|
+
branch?: string;
|
|
28
|
+
sha?: string;
|
|
29
|
+
prUrl?: string;
|
|
30
|
+
changedPaths?: string[];
|
|
31
|
+
workingDir?: string;
|
|
32
|
+
startedAt?: string;
|
|
33
|
+
finishedAt?: string;
|
|
34
|
+
/** Stash results from git-runner — surfaced in verification. */
|
|
17
35
|
stashResults?: StashResult[];
|
|
18
36
|
log?: (text: string, level?: 'stdout' | 'stderr') => void;
|
|
19
37
|
}
|
|
20
|
-
/**
|
|
21
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Per-run report path: `~/.teamshare/reports/<runKey>.md`. Per RUN, not per
|
|
40
|
+
* task — a stale file from a previous run must never read as this run's
|
|
41
|
+
* narrative.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getReportPath(runKey: string): string;
|
|
44
|
+
/** One block every run prompt carries, so all harnesses file the same way. */
|
|
45
|
+
export declare function runReportBlock(reportPath: string): string;
|
|
22
46
|
/** Success, or the final sanitized error so callers can surface WHY the
|
|
23
|
-
* report never landed
|
|
47
|
+
* report never landed (previously console-only). */
|
|
24
48
|
export type RunReportResult = {
|
|
25
49
|
ok: true;
|
|
26
50
|
id: string;
|
|
27
51
|
name: string;
|
|
52
|
+
documentUrl: string;
|
|
28
53
|
} | {
|
|
29
54
|
ok: false;
|
|
30
55
|
error: string;
|
|
31
56
|
};
|
|
32
57
|
/**
|
|
33
|
-
* Reads
|
|
34
|
-
*
|
|
35
|
-
* `{ ok: false }`
|
|
58
|
+
* Reads this run's narrative file and saves the composed report via
|
|
59
|
+
* `POST /run-reports` (falls back to a direct note on older backends).
|
|
60
|
+
* Never throws; `{ ok: false }` is advisory — completed work stays complete.
|
|
36
61
|
*/
|
|
37
62
|
export declare function saveRunReport(input: RunReportInput): Promise<RunReportResult>;
|
|
63
|
+
/** Best-effort cleanup of this run's narrative file (never throws). */
|
|
64
|
+
export declare function clearReportFile(reportPath: string): void;
|
package/dist/lib/run-report.js
CHANGED
|
@@ -1,57 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getReportPath = getReportPath;
|
|
4
|
+
exports.runReportBlock = runReportBlock;
|
|
4
5
|
exports.saveRunReport = saveRunReport;
|
|
6
|
+
exports.clearReportFile = clearReportFile;
|
|
5
7
|
/**
|
|
6
|
-
*
|
|
7
|
-
* ORCHESTRATOR run the agent writes a report to `~/.teamshare/reports/<taskId>.md`
|
|
8
|
-
* and this module uploads it to the project's Documents tab as a note via
|
|
9
|
-
* POST /documents/note - virtual folder `agents/<agent>/tasks/<taskId>`,
|
|
10
|
-
* one note per run. Build-mode sessions use the same helper best-effort
|
|
11
|
-
* (advised, never fatal).
|
|
8
|
+
* Per-run reports (2026-10): EVERY completed run lands ONE detailed report.
|
|
12
9
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* Coverage: task (`run`), build queue (`build`), orchestrator worker
|
|
11
|
+
* (`orchestrator`), plan passes (`plan`), tool/research runs incl. QA
|
|
12
|
+
* (`tool`) and workflow runs (`workflow`). Chat / doc-reply / board-reply
|
|
13
|
+
* sessions are conversations, not runs, and file no report.
|
|
15
14
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* One report per run: the caller passes a per-run `runKey`
|
|
16
|
+
* (`<taskId>-<session8>` or the run id) and a per-run `reportPath`. The
|
|
17
|
+
* backend names the document with a hash of `runKey`, so a retry writes a
|
|
18
|
+
* NEW document instead of overwriting the previous run's report. Only
|
|
19
|
+
* COMPLETED runs call this — paused, failed and stopped runs file nothing.
|
|
18
20
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
+
* The agent writes its narrative during the session (no separate LLM call);
|
|
22
|
+
* when the file is missing the caller's summary is the narrative. The
|
|
23
|
+
* backend composes the full report (Summary, What changed, Where to find
|
|
24
|
+
* it, Verification, Notes & risks, Run facts) and attaches it to the task.
|
|
25
|
+
*
|
|
26
|
+
* Guarantees: this function NEVER throws — a report must never fail a run.
|
|
21
27
|
*/
|
|
22
28
|
const node_fs_1 = require("node:fs");
|
|
23
29
|
const node_path_1 = require("node:path");
|
|
24
30
|
const node_os_1 = require("node:os");
|
|
25
31
|
const config_1 = require("./config");
|
|
26
32
|
const git_runner_1 = require("./git/git-runner");
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const clean = taskTitle
|
|
34
|
-
.replace(/[\\/:*?"<>|]+/g, '-')
|
|
35
|
-
.replace(/\s+/g, ' ')
|
|
36
|
-
.trim()
|
|
37
|
-
.slice(0, 80);
|
|
38
|
-
return `${date} ${clean} — run report.md`;
|
|
39
|
-
}
|
|
40
|
-
function ensureMdExtension(name) {
|
|
41
|
-
return /\.(md|markdown|txt)$/i.test(name) ? name : `${name}.md`;
|
|
42
|
-
}
|
|
43
|
-
/** Per-task report path: ~/.teamshare/reports/<taskId>.md */
|
|
44
|
-
function getReportPath(taskId) {
|
|
33
|
+
/**
|
|
34
|
+
* Per-run report path: `~/.teamshare/reports/<runKey>.md`. Per RUN, not per
|
|
35
|
+
* task — a stale file from a previous run must never read as this run's
|
|
36
|
+
* narrative.
|
|
37
|
+
*/
|
|
38
|
+
function getReportPath(runKey) {
|
|
45
39
|
const dir = (0, node_path_1.join)((0, node_os_1.homedir)(), '.teamshare', 'reports');
|
|
46
40
|
(0, node_fs_1.mkdirSync)(dir, { recursive: true });
|
|
47
|
-
|
|
41
|
+
const safe = runKey.replace(/[^a-zA-Z0-9-_]/g, '-').slice(0, 120);
|
|
42
|
+
return (0, node_path_1.join)(dir, `${safe || 'run'}.md`);
|
|
48
43
|
}
|
|
49
|
-
/**
|
|
50
|
-
function
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
/** One block every run prompt carries, so all harnesses file the same way. */
|
|
45
|
+
function runReportBlock(reportPath) {
|
|
46
|
+
return (`When done, write a run report narrative to \`${reportPath}\` with sections: ` +
|
|
47
|
+
`Summary, What Changed, Verification, Notes & Risks. Use markdown headings and short bullets. ` +
|
|
48
|
+
`Say WHERE the work went: files/areas touched, branch, and the documents/boards you created or updated. ` +
|
|
49
|
+
`The runner uploads it as the run report — do not create the report document yourself.`);
|
|
50
|
+
}
|
|
51
|
+
/** Read the agent-written narrative for THIS run, or return null. */
|
|
52
|
+
function readAgentReport(reportPath) {
|
|
54
53
|
try {
|
|
54
|
+
if (!(0, node_fs_1.existsSync)(reportPath))
|
|
55
|
+
return null;
|
|
55
56
|
const content = (0, node_fs_1.readFileSync)(reportPath, 'utf8').trim();
|
|
56
57
|
return content.length > 0 ? content : null;
|
|
57
58
|
}
|
|
@@ -59,67 +60,115 @@ function readAgentReport(taskId) {
|
|
|
59
60
|
return null;
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
'',
|
|
70
|
-
'## What Changed',
|
|
71
|
-
'_Session-level detail lives in the task comments and the live console._',
|
|
72
|
-
'',
|
|
73
|
-
'## Verification',
|
|
74
|
-
`- Final status: ${input.status}`,
|
|
75
|
-
...(input.details ?? []).map((d) => `- ${d}`),
|
|
76
|
-
'',
|
|
77
|
-
'## Git',
|
|
78
|
-
input.gitLine || '_No git operations recorded by the runner._',
|
|
79
|
-
'',
|
|
80
|
-
...(input.stashResults?.length
|
|
81
|
-
? [(0, git_runner_1.formatStashSummary)(input.stashResults), '']
|
|
82
|
-
: []),
|
|
83
|
-
'## Notes & Risks',
|
|
84
|
-
`_Auto-generated fallback report (${input.kind}); agent-written report not found._`,
|
|
85
|
-
'',
|
|
86
|
-
].join('\n');
|
|
63
|
+
function isNotFoundError(err) {
|
|
64
|
+
// ApiError carries the HTTP status; older fetch-style errors only have
|
|
65
|
+
// text ("Request failed 404 …", Nest's "Cannot POST /run-reports").
|
|
66
|
+
const status = err?.status;
|
|
67
|
+
if (status === 404)
|
|
68
|
+
return true;
|
|
69
|
+
return / 404\b|Not Found|Cannot POST \/run-reports/i.test((0, config_1.msg)(err));
|
|
87
70
|
}
|
|
88
71
|
/**
|
|
89
|
-
* Reads
|
|
90
|
-
*
|
|
91
|
-
* `{ ok: false }`
|
|
72
|
+
* Reads this run's narrative file and saves the composed report via
|
|
73
|
+
* `POST /run-reports` (falls back to a direct note on older backends).
|
|
74
|
+
* Never throws; `{ ok: false }` is advisory — completed work stays complete.
|
|
92
75
|
*/
|
|
93
76
|
async function saveRunReport(input) {
|
|
94
77
|
const log = input.log ?? (() => { });
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (
|
|
98
|
-
log('[report] using agent-written
|
|
78
|
+
const startedAt = input.startedAt ?? new Date().toISOString();
|
|
79
|
+
const narrative = readAgentReport(input.reportPath);
|
|
80
|
+
if (narrative) {
|
|
81
|
+
log('[report] using agent-written narrative for this run');
|
|
99
82
|
}
|
|
100
83
|
else {
|
|
101
|
-
log('[report] no
|
|
102
|
-
content = fallbackReport(input);
|
|
84
|
+
log('[report] no narrative file for this run, using session summary');
|
|
103
85
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
86
|
+
const workedOn = [...(input.details ?? [])];
|
|
87
|
+
if (input.workingDir)
|
|
88
|
+
workedOn.push(`Working folder: ${input.workingDir}`);
|
|
89
|
+
const verification = [...(input.verification ?? [])];
|
|
90
|
+
if (input.stashResults?.length) {
|
|
91
|
+
verification.push((0, git_runner_1.formatStashSummary)(input.stashResults));
|
|
92
|
+
}
|
|
93
|
+
const payload = {
|
|
94
|
+
taskId: input.taskId,
|
|
95
|
+
toolRunId: input.toolRunId,
|
|
96
|
+
workflowRunId: input.workflowRunId,
|
|
97
|
+
projectId: input.projectId,
|
|
98
|
+
mode: input.kind,
|
|
99
|
+
runKey: input.runKey,
|
|
100
|
+
status: input.status,
|
|
101
|
+
title: input.taskTitle,
|
|
102
|
+
summary: input.summary,
|
|
103
|
+
narrative: narrative ?? undefined,
|
|
104
|
+
workedOn: workedOn.length ? workedOn : undefined,
|
|
105
|
+
changedPaths: input.changedPaths?.length
|
|
106
|
+
? input.changedPaths.slice(0, 100)
|
|
107
|
+
: undefined,
|
|
108
|
+
verification: verification.length ? verification : undefined,
|
|
109
|
+
notes: input.notes?.length ? input.notes : undefined,
|
|
110
|
+
git: {
|
|
111
|
+
branch: input.branch,
|
|
112
|
+
sha: input.sha,
|
|
113
|
+
prUrl: input.prUrl,
|
|
114
|
+
gitLine: input.gitLine,
|
|
115
|
+
},
|
|
116
|
+
startedAt,
|
|
117
|
+
finishedAt: input.finishedAt ?? new Date().toISOString(),
|
|
118
|
+
};
|
|
119
|
+
try {
|
|
120
|
+
const doc = await input.api.createRunReport(payload);
|
|
121
|
+
log(`[report] saved "${doc.name}" (${doc.documentUrl})`);
|
|
122
|
+
return {
|
|
123
|
+
ok: true,
|
|
124
|
+
id: doc.id,
|
|
125
|
+
name: doc.name,
|
|
126
|
+
documentUrl: doc.documentUrl,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
if (!isNotFoundError(err)) {
|
|
131
|
+
const error = (0, config_1.msg)(err).slice(0, 300);
|
|
132
|
+
log(`[report] save failed: ${error}`, 'stderr');
|
|
133
|
+
return { ok: false, error };
|
|
121
134
|
}
|
|
122
135
|
}
|
|
123
|
-
|
|
136
|
+
// Older backend without POST /run-reports: write the note directly into the
|
|
137
|
+
// same per-task folder so the report still lands where humans look.
|
|
138
|
+
try {
|
|
139
|
+
const folderPath = input.taskId
|
|
140
|
+
? `agents/${input.agentId.slice(0, 8).toLowerCase()}/tasks/${input.taskId}`
|
|
141
|
+
: `agents/${input.agentId.slice(0, 8).toLowerCase()}`;
|
|
142
|
+
const date = new Date().toISOString().slice(0, 10);
|
|
143
|
+
const clean = input.taskTitle
|
|
144
|
+
.replace(/[\\/:*?"<>|]+/g, '-')
|
|
145
|
+
.replace(/\s+/g, ' ')
|
|
146
|
+
.trim()
|
|
147
|
+
.slice(0, 70);
|
|
148
|
+
const doc = await input.api.createNoteDocument({
|
|
149
|
+
projectId: input.projectId,
|
|
150
|
+
name: `${date} ${clean} — ${input.kind} run report.md`,
|
|
151
|
+
content: [narrative ?? input.summary, '', ...(verification ?? [])].join('\n'),
|
|
152
|
+
folderPath,
|
|
153
|
+
});
|
|
154
|
+
log(`[report] saved "${doc.name}" via legacy note path`);
|
|
155
|
+
return { ok: true, id: doc.id, name: doc.name, documentUrl: '' };
|
|
156
|
+
}
|
|
157
|
+
catch (err) {
|
|
158
|
+
const error = (0, config_1.msg)(err).slice(0, 300);
|
|
159
|
+
log(`[report] save failed: ${error}`, 'stderr');
|
|
160
|
+
return { ok: false, error };
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/** Best-effort cleanup of this run's narrative file (never throws). */
|
|
164
|
+
function clearReportFile(reportPath) {
|
|
165
|
+
try {
|
|
166
|
+
const { unlinkSync } = require('node:fs');
|
|
167
|
+
if ((0, node_fs_1.existsSync)(reportPath))
|
|
168
|
+
unlinkSync(reportPath);
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
/* best-effort */
|
|
172
|
+
}
|
|
124
173
|
}
|
|
125
174
|
//# sourceMappingURL=run-report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-report.js","sourceRoot":"","sources":["../../src/lib/run-report.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"run-report.js","sourceRoot":"","sources":["../../src/lib/run-report.ts"],"names":[],"mappings":";;AAyEA,sCAKC;AAGD,wCAOC;AAgCD,sCA2FC;AAGD,0CAOC;AA7ND;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qCAA8D;AAC9D,yCAAiC;AACjC,qCAAkC;AAElC,qCAA+B;AAG/B,iDAAsD;AAwCtD;;;;GAIG;AACH,SAAgB,aAAa,CAAC,MAAc;IAC1C,MAAM,GAAG,GAAG,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IACrD,IAAA,mBAAS,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E,EAAE,EAAE,CAAC;IACnE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,KAAK,GAAG,IAAA,YAAG,EAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACrC,GAAG,CAAC,yBAAyB,KAAK,EAAE,EAAE,QAAQ,CAAC,CAAC;QAChD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,uEAAuE;AACvE,SAAgB,eAAe,CAAC,UAAkB;IAChD,IAAI,CAAC;QACH,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAC1C,IAAI,IAAA,oBAAU,EAAC,UAAU,CAAC;YAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAAC,MAAM,CAAC;QACP,iBAAiB;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,95 @@
|
|
|
1
1
|
import type { ToolModule, ToolResult } from './runner';
|
|
2
|
+
export declare const KNOWN_LAYOUTS: readonly ["title", "agenda", "section", "bullets", "statement", "two-column", "cards", "stats", "timeline", "quote", "table", "closing", "sources"];
|
|
3
|
+
export type DeckLayout = (typeof KNOWN_LAYOUTS)[number];
|
|
4
|
+
export type Density = 'airy' | 'normal' | 'compact';
|
|
5
|
+
export interface DeckSlide {
|
|
6
|
+
layout: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
bullets?: unknown;
|
|
10
|
+
columns?: unknown;
|
|
11
|
+
cards?: unknown;
|
|
12
|
+
stats?: unknown;
|
|
13
|
+
rows?: unknown;
|
|
14
|
+
quote?: unknown;
|
|
15
|
+
notes?: unknown;
|
|
16
|
+
}
|
|
17
|
+
export interface DeckSpec {
|
|
18
|
+
title?: string;
|
|
19
|
+
slides: DeckSlide[];
|
|
20
|
+
}
|
|
21
|
+
export interface DeckTokens {
|
|
22
|
+
accent: string;
|
|
23
|
+
background: string;
|
|
24
|
+
surface: string;
|
|
25
|
+
textColor: string;
|
|
26
|
+
bodyFont: string;
|
|
27
|
+
headingFont: string;
|
|
28
|
+
coverStyle: string;
|
|
29
|
+
titleStyle: string;
|
|
30
|
+
footerStyle: string;
|
|
31
|
+
cornerStyle: string;
|
|
32
|
+
density: Density;
|
|
33
|
+
}
|
|
34
|
+
export interface TemplateEntry {
|
|
35
|
+
id: string;
|
|
36
|
+
label?: string;
|
|
37
|
+
summary?: string;
|
|
38
|
+
preview?: Partial<Record<keyof DeckTokens, string>>;
|
|
39
|
+
}
|
|
40
|
+
/** Built-in corporate-equivalent defaults (used only when the mirror file is unreadable). */
|
|
41
|
+
export declare const FALLBACK_TOKENS: DeckTokens;
|
|
42
|
+
/** Per-density content budgets. Exported for tests. */
|
|
43
|
+
export declare const DENSITY_CAPS: Record<Density, {
|
|
44
|
+
maxBullets: number;
|
|
45
|
+
maxWords: number;
|
|
46
|
+
}>;
|
|
47
|
+
/**
|
|
48
|
+
* Load the template mirror at runtime (never statically imported: tsc does
|
|
49
|
+
* not emit JSON assets into dist, so a static import would break at runtime).
|
|
50
|
+
* Returns null when the file cannot be found or parsed.
|
|
51
|
+
*/
|
|
52
|
+
export declare function loadTemplateMirror(): {
|
|
53
|
+
templates: TemplateEntry[];
|
|
54
|
+
} | null;
|
|
55
|
+
/** Resolve template tokens: mirror lookup + accentColor/density overrides. */
|
|
56
|
+
export declare function resolveDeckTokens(params: Record<string, unknown>): {
|
|
57
|
+
tokens: DeckTokens;
|
|
58
|
+
templateId: string;
|
|
59
|
+
warnings: string[];
|
|
60
|
+
};
|
|
61
|
+
/** Parse deckJson (text or object). Throws on invalid/empty specs. */
|
|
62
|
+
export declare function parseDeckSpec(raw: unknown): DeckSpec;
|
|
63
|
+
export interface PlannedSlide {
|
|
64
|
+
index: number;
|
|
65
|
+
/** Effective layout after degrading unknowns to bullets. */
|
|
66
|
+
layout: DeckLayout;
|
|
67
|
+
/** Original layout string when it was degraded. */
|
|
68
|
+
degradedFrom?: string;
|
|
69
|
+
titleSize: number;
|
|
70
|
+
bodySize: number;
|
|
71
|
+
columns: number;
|
|
72
|
+
bullets: string[];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Pure layout planner: per-slide sizes/spacing/columns from density + aspect.
|
|
76
|
+
* No pptxgenjs calls — safe to unit-test.
|
|
77
|
+
*/
|
|
78
|
+
export declare function planDeck(spec: DeckSpec, opts: {
|
|
79
|
+
density: Density;
|
|
80
|
+
aspect: '16:9' | '4:3';
|
|
81
|
+
}): PlannedSlide[];
|
|
2
82
|
export declare class PptxDeckTool implements ToolModule {
|
|
3
83
|
key: string;
|
|
4
84
|
run(params: Record<string, unknown>): Promise<ToolResult>;
|
|
85
|
+
private inferTitle;
|
|
86
|
+
private firstBullets;
|
|
87
|
+
private coerceColumns;
|
|
88
|
+
private coerceCards;
|
|
89
|
+
private coerceStats;
|
|
90
|
+
private coerceTimeline;
|
|
91
|
+
private coerceQuote;
|
|
92
|
+
private coerceTableRows;
|
|
93
|
+
private buildSpeakerNotes;
|
|
94
|
+
private runLegacy;
|
|
5
95
|
}
|