open-agents-ai 0.164.0 → 0.166.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/index.js +55 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11781,23 +11781,69 @@ var init_transcribe_tool = __esm({
|
|
|
11781
11781
|
model,
|
|
11782
11782
|
format: "json",
|
|
11783
11783
|
diarize,
|
|
11784
|
-
wordTimestamps:
|
|
11784
|
+
wordTimestamps: true
|
|
11785
|
+
// Always get timestamps for structured output
|
|
11785
11786
|
});
|
|
11786
11787
|
const transcriptDir = join19(this.workingDir, ".oa", "transcripts");
|
|
11787
11788
|
mkdirSync7(transcriptDir, { recursive: true });
|
|
11788
|
-
const
|
|
11789
|
-
|
|
11789
|
+
const fileBase = basename4(filePath).replace(/\.[^.]+$/, "");
|
|
11790
|
+
const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
11791
|
+
const txtFile = join19(transcriptDir, `${fileBase}-${timestamp}.txt`);
|
|
11792
|
+
writeFileSync7(txtFile, result.text, "utf-8");
|
|
11793
|
+
const jsonFile = join19(transcriptDir, `${fileBase}-${timestamp}.json`);
|
|
11794
|
+
const structured = {
|
|
11795
|
+
source: filePath,
|
|
11796
|
+
model,
|
|
11797
|
+
language: result.language,
|
|
11798
|
+
duration: result.duration,
|
|
11799
|
+
wordCount: result.wordCount,
|
|
11800
|
+
speakers: result.speakers,
|
|
11801
|
+
transcribedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
11802
|
+
segments: result.segments.map((seg) => ({
|
|
11803
|
+
start: seg.start,
|
|
11804
|
+
end: seg.end,
|
|
11805
|
+
text: seg.text,
|
|
11806
|
+
speaker: seg.speaker || void 0
|
|
11807
|
+
})),
|
|
11808
|
+
fullText: result.text
|
|
11809
|
+
};
|
|
11810
|
+
writeFileSync7(jsonFile, JSON.stringify(structured, null, 2), "utf-8");
|
|
11811
|
+
try {
|
|
11812
|
+
const memDir = join19(this.workingDir, ".oa", "memory");
|
|
11813
|
+
mkdirSync7(memDir, { recursive: true });
|
|
11814
|
+
const memFile = join19(memDir, "transcripts.json");
|
|
11815
|
+
let memEntries = [];
|
|
11816
|
+
try {
|
|
11817
|
+
memEntries = JSON.parse(readFileSync13(memFile, "utf-8"));
|
|
11818
|
+
} catch {
|
|
11819
|
+
}
|
|
11820
|
+
memEntries.push({
|
|
11821
|
+
source: basename4(filePath),
|
|
11822
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
11823
|
+
duration: result.duration,
|
|
11824
|
+
wordCount: result.wordCount,
|
|
11825
|
+
language: result.language,
|
|
11826
|
+
summary: result.text.slice(0, 200),
|
|
11827
|
+
jsonPath: jsonFile,
|
|
11828
|
+
txtPath: txtFile
|
|
11829
|
+
});
|
|
11830
|
+
if (memEntries.length > 50)
|
|
11831
|
+
memEntries = memEntries.slice(-50);
|
|
11832
|
+
writeFileSync7(memFile, JSON.stringify(memEntries, null, 2), "utf-8");
|
|
11833
|
+
} catch {
|
|
11834
|
+
}
|
|
11790
11835
|
const lines = [
|
|
11791
11836
|
`Transcription of: ${basename4(filePath)}`,
|
|
11792
11837
|
`Model: ${model} | Language: ${result.language} | Duration: ${result.duration ? `${result.duration.toFixed(1)}s` : "unknown"}`,
|
|
11793
|
-
`Words: ${result.wordCount} |
|
|
11838
|
+
`Words: ${result.wordCount} | Segments: ${result.segments.length}`,
|
|
11839
|
+
`Saved: ${txtFile} (text) + ${jsonFile} (structured with timestamps)`,
|
|
11794
11840
|
""
|
|
11795
11841
|
];
|
|
11796
11842
|
if (result.speakers.length > 1) {
|
|
11797
11843
|
lines.push(`Speakers: ${result.speakers.join(", ")}`);
|
|
11798
11844
|
lines.push("");
|
|
11799
11845
|
}
|
|
11800
|
-
if (
|
|
11846
|
+
if (result.segments.length > 0) {
|
|
11801
11847
|
for (const seg of result.segments) {
|
|
11802
11848
|
const ts = `[${formatTime(seg.start)} \u2192 ${formatTime(seg.end)}]`;
|
|
11803
11849
|
const speaker = seg.speaker ? `${seg.speaker}: ` : "";
|
|
@@ -63060,10 +63106,11 @@ NEW TASK: ${fullInput}`;
|
|
|
63060
63106
|
setTerminalTitle(void 0, version);
|
|
63061
63107
|
}
|
|
63062
63108
|
const updateMode = savedSettings.updateMode ?? "auto";
|
|
63063
|
-
if (updateMode !== "manual") {
|
|
63109
|
+
if (updateMode !== "manual" && !_autoUpdatedThisSession) {
|
|
63064
63110
|
try {
|
|
63065
63111
|
const updateInfo = await checkForUpdate(version);
|
|
63066
63112
|
if (updateInfo) {
|
|
63113
|
+
_autoUpdatedThisSession = true;
|
|
63067
63114
|
const { exec: exec4 } = await import("node:child_process");
|
|
63068
63115
|
exec4(`npm install -g open-agents-ai@latest --prefer-online`, { timeout: 18e4 }, (err) => {
|
|
63069
63116
|
if (!err) {
|
|
@@ -63545,7 +63592,7 @@ Rules:
|
|
|
63545
63592
|
process.exit(1);
|
|
63546
63593
|
}
|
|
63547
63594
|
}
|
|
63548
|
-
var taskManager, _shellToolRef, _fullSubAgentToolRef, _activeRunnerRef, SELF_IMPROVE_INTERVAL, _tasksSinceImprove;
|
|
63595
|
+
var taskManager, _shellToolRef, _fullSubAgentToolRef, _activeRunnerRef, _autoUpdatedThisSession, SELF_IMPROVE_INTERVAL, _tasksSinceImprove;
|
|
63549
63596
|
var init_interactive = __esm({
|
|
63550
63597
|
"packages/cli/dist/tui/interactive.js"() {
|
|
63551
63598
|
"use strict";
|
|
@@ -63588,6 +63635,7 @@ var init_interactive = __esm({
|
|
|
63588
63635
|
_shellToolRef = null;
|
|
63589
63636
|
_fullSubAgentToolRef = null;
|
|
63590
63637
|
_activeRunnerRef = null;
|
|
63638
|
+
_autoUpdatedThisSession = false;
|
|
63591
63639
|
SELF_IMPROVE_INTERVAL = 5;
|
|
63592
63640
|
_tasksSinceImprove = 0;
|
|
63593
63641
|
}
|
package/package.json
CHANGED