@redaksjon/protokoll-engine 0.1.16 → 0.1.17
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/index14.js +4 -0
- package/dist/index14.js.map +1 -1
- package/dist/index19.js +1 -1
- package/dist/index22.js +1 -1
- package/dist/index26.js +1 -1
- package/dist/index27.js +5 -5
- package/dist/index31.js +1 -1
- package/dist/index32.js +1 -1
- package/dist/index33.js +2 -2
- package/dist/index34.js +1 -1
- package/dist/index35.js +1 -1
- package/dist/index36.js +1 -1
- package/dist/index37.js +1 -1
- package/dist/index39.js +1 -1
- package/dist/index42.js +1 -1
- package/dist/index43.js +1 -1
- package/dist/index47.js +4 -45
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +45 -147
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +31 -106
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +198 -21
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +29 -25
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +26 -18
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +34 -5
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index57.js +1 -1
- package/dist/index58.js +1 -1
- package/dist/index60.js +1 -1
- package/dist/util/media.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index51.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index51.js","sources":["../src/agentic/tools/
|
|
1
|
+
{"version":3,"file":"index51.js","sources":["../src/agentic/tools/verify-spelling.ts"],"sourcesContent":["/**\n * Verify Spelling Tool\n * \n * Requests user verification for an unknown name or term.\n */\n\nimport { TranscriptionTool, ToolContext, ToolResult } from '../types';\n\nexport const create = (ctx: ToolContext): TranscriptionTool => ({\n name: 'verify_spelling',\n description: 'Request user verification for an unknown name or term. Use when you encounter something that needs human confirmation.',\n parameters: {\n type: 'object',\n properties: {\n term: {\n type: 'string',\n description: 'The term that needs verification',\n },\n context: {\n type: 'string',\n description: 'Context around where this term appears',\n },\n suggestedSpelling: {\n type: 'string',\n description: 'Your best guess at the correct spelling',\n },\n },\n required: ['term'],\n },\n execute: async (args: { term: string; context?: string; suggestedSpelling?: string }): Promise<ToolResult> => {\n if (!ctx.interactiveMode) {\n // In batch mode, return best guess\n return {\n success: true,\n data: {\n verified: false,\n useSuggestion: true,\n spelling: args.suggestedSpelling || args.term,\n message: 'Non-interactive mode: using best guess',\n },\n };\n }\n \n // In interactive mode, mark for user input\n return {\n success: true,\n needsUserInput: true,\n userPrompt: `Unknown term: \"${args.term}\"${args.context ? ` (context: \"${args.context}\")` : ''}\n${args.suggestedSpelling ? `Suggested spelling: \"${args.suggestedSpelling}\"` : ''}\nPlease provide the correct spelling:`,\n data: {\n term: args.term,\n suggestedSpelling: args.suggestedSpelling,\n },\n };\n },\n});\n\n"],"names":[],"mappings":"AAQO,MAAM,MAAA,GAAS,CAAC,GAAA,MAAyC;AAAA,EAC5D,IAAA,EAAM,iBAAA;AAAA,EACN,WAAA,EAAa,wHAAA;AAAA,EACb,UAAA,EAAY;AAAA,IACR,IAAA,EAAM,QAAA;AAAA,IACN,UAAA,EAAY;AAAA,MACR,IAAA,EAAM;AAAA,QACF,IAAA,EAAM,QAAA;AAAA,QACN,WAAA,EAAa;AAAA,OACjB;AAAA,MACA,OAAA,EAAS;AAAA,QACL,IAAA,EAAM,QAAA;AAAA,QACN,WAAA,EAAa;AAAA,OACjB;AAAA,MACA,iBAAA,EAAmB;AAAA,QACf,IAAA,EAAM,QAAA;AAAA,QACN,WAAA,EAAa;AAAA;AACjB,KACJ;AAAA,IACA,QAAA,EAAU,CAAC,MAAM;AAAA,GACrB;AAAA,EACA,OAAA,EAAS,OAAO,IAAA,KAA8F;AAC1G,IAAA,IAAI,CAAC,IAAI,eAAA,EAAiB;AAEtB,MAAA,OAAO;AAAA,QACH,OAAA,EAAS,IAAA;AAAA,QACT,IAAA,EAAM;AAAA,UACF,QAAA,EAAU,KAAA;AAAA,UACV,aAAA,EAAe,IAAA;AAAA,UACf,QAAA,EAAU,IAAA,CAAK,iBAAA,IAAqB,IAAA,CAAK,IAAA;AAAA,UACzC,OAAA,EAAS;AAAA;AACb,OACJ;AAAA,IACJ;AAGA,IAAA,OAAO;AAAA,MACH,OAAA,EAAS,IAAA;AAAA,MACT,cAAA,EAAgB,IAAA;AAAA,MAChB,UAAA,EAAY,CAAA,eAAA,EAAkB,IAAA,CAAK,IAAI,CAAA,CAAA,EAAI,IAAA,CAAK,OAAA,GAAU,CAAA,YAAA,EAAe,IAAA,CAAK,OAAO,CAAA,EAAA,CAAA,GAAO,EAAE;AAAA,EACxG,KAAK,iBAAA,GAAoB,CAAA,qBAAA,EAAwB,IAAA,CAAK,iBAAiB,MAAM,EAAE;AAAA,oCAAA,CAAA;AAAA,MAErE,IAAA,EAAM;AAAA,QACF,MAAM,IAAA,CAAK,IAAA;AAAA,QACX,mBAAmB,IAAA,CAAK;AAAA;AAC5B,KACJ;AAAA,EACJ;AACJ,CAAA;;;;"}
|
package/dist/index52.js
CHANGED
|
@@ -1,33 +1,41 @@
|
|
|
1
|
-
const create = (
|
|
2
|
-
name: "
|
|
3
|
-
description: "
|
|
1
|
+
const create = (ctx) => ({
|
|
2
|
+
name: "route_note",
|
|
3
|
+
description: "Determine the destination for this note based on content analysis.",
|
|
4
4
|
parameters: {
|
|
5
5
|
type: "object",
|
|
6
6
|
properties: {
|
|
7
|
-
|
|
7
|
+
projectHint: {
|
|
8
8
|
type: "string",
|
|
9
|
-
|
|
10
|
-
description: "Type of entity to store"
|
|
9
|
+
description: "The detected project name or hint"
|
|
11
10
|
},
|
|
12
|
-
|
|
11
|
+
contentSummary: {
|
|
13
12
|
type: "string",
|
|
14
|
-
description: "
|
|
15
|
-
},
|
|
16
|
-
details: {
|
|
17
|
-
type: "object",
|
|
18
|
-
description: "Additional details about the entity"
|
|
13
|
+
description: "Brief summary of what the note is about"
|
|
19
14
|
}
|
|
20
|
-
}
|
|
21
|
-
required: ["entityType", "name"]
|
|
15
|
+
}
|
|
22
16
|
},
|
|
23
17
|
execute: async (args) => {
|
|
18
|
+
const routing = ctx.routingInstance;
|
|
19
|
+
const routingContext = {
|
|
20
|
+
transcriptText: ctx.transcriptText,
|
|
21
|
+
audioDate: ctx.audioDate,
|
|
22
|
+
sourceFile: ctx.sourceFile
|
|
23
|
+
};
|
|
24
|
+
const decision = routing.route(routingContext);
|
|
25
|
+
const outputPath = routing.buildOutputPath(decision, routingContext);
|
|
24
26
|
return {
|
|
25
27
|
success: true,
|
|
26
28
|
data: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
projectId: decision.projectId,
|
|
30
|
+
// Return the routing decision (base path + structure), NOT the built output path
|
|
31
|
+
// The orchestrator will call buildOutputPath() later
|
|
32
|
+
routingDecision: decision,
|
|
33
|
+
// Also include the built path for informational purposes
|
|
34
|
+
outputPath,
|
|
35
|
+
confidence: decision.confidence,
|
|
36
|
+
reasoning: decision.reasoning,
|
|
37
|
+
projectHint: args.projectHint,
|
|
38
|
+
contentSummary: args.contentSummary
|
|
31
39
|
}
|
|
32
40
|
};
|
|
33
41
|
}
|
package/dist/index52.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index52.js","sources":["../src/agentic/tools/
|
|
1
|
+
{"version":3,"file":"index52.js","sources":["../src/agentic/tools/route-note.ts"],"sourcesContent":["/**\n * Route Note Tool\n * \n * Determines the destination for a note based on content analysis.\n */\n\nimport { TranscriptionTool, ToolContext, ToolResult } from '../types';\n\nexport const create = (ctx: ToolContext): TranscriptionTool => ({\n name: 'route_note',\n description: 'Determine the destination for this note based on content analysis.',\n parameters: {\n type: 'object',\n properties: {\n projectHint: {\n type: 'string',\n description: 'The detected project name or hint',\n },\n contentSummary: {\n type: 'string',\n description: 'Brief summary of what the note is about',\n },\n },\n },\n execute: async (args: { projectHint?: string; contentSummary?: string }): Promise<ToolResult> => {\n const routing = ctx.routingInstance;\n \n const routingContext = {\n transcriptText: ctx.transcriptText,\n audioDate: ctx.audioDate,\n sourceFile: ctx.sourceFile,\n };\n \n const decision = routing.route(routingContext);\n const outputPath = routing.buildOutputPath(decision, routingContext);\n \n return {\n success: true,\n data: {\n projectId: decision.projectId,\n // Return the routing decision (base path + structure), NOT the built output path\n // The orchestrator will call buildOutputPath() later\n routingDecision: decision,\n // Also include the built path for informational purposes\n outputPath: outputPath,\n confidence: decision.confidence,\n reasoning: decision.reasoning,\n projectHint: args.projectHint,\n contentSummary: args.contentSummary,\n },\n };\n },\n});\n\n"],"names":[],"mappings":"AAQO,MAAM,MAAA,GAAS,CAAC,GAAA,MAAyC;AAAA,EAC5D,IAAA,EAAM,YAAA;AAAA,EACN,WAAA,EAAa,oEAAA;AAAA,EACb,UAAA,EAAY;AAAA,IACR,IAAA,EAAM,QAAA;AAAA,IACN,UAAA,EAAY;AAAA,MACR,WAAA,EAAa;AAAA,QACT,IAAA,EAAM,QAAA;AAAA,QACN,WAAA,EAAa;AAAA,OACjB;AAAA,MACA,cAAA,EAAgB;AAAA,QACZ,IAAA,EAAM,QAAA;AAAA,QACN,WAAA,EAAa;AAAA;AACjB;AACJ,GACJ;AAAA,EACA,OAAA,EAAS,OAAO,IAAA,KAAiF;AAC7F,IAAA,MAAM,UAAU,GAAA,CAAI,eAAA;AAEpB,IAAA,MAAM,cAAA,GAAiB;AAAA,MACnB,gBAAgB,GAAA,CAAI,cAAA;AAAA,MACpB,WAAW,GAAA,CAAI,SAAA;AAAA,MACf,YAAY,GAAA,CAAI;AAAA,KACpB;AAEA,IAAA,MAAM,QAAA,GAAW,OAAA,CAAQ,KAAA,CAAM,cAAc,CAAA;AAC7C,IAAA,MAAM,UAAA,GAAa,OAAA,CAAQ,eAAA,CAAgB,QAAA,EAAU,cAAc,CAAA;AAEnE,IAAA,OAAO;AAAA,MACH,OAAA,EAAS,IAAA;AAAA,MACT,IAAA,EAAM;AAAA,QACF,WAAW,QAAA,CAAS,SAAA;AAAA;AAAA;AAAA,QAGpB,eAAA,EAAiB,QAAA;AAAA;AAAA,QAEjB,UAAA;AAAA,QACA,YAAY,QAAA,CAAS,UAAA;AAAA,QACrB,WAAW,QAAA,CAAS,SAAA;AAAA,QACpB,aAAa,IAAA,CAAK,WAAA;AAAA,QAClB,gBAAgB,IAAA,CAAK;AAAA;AACzB,KACJ;AAAA,EACJ;AACJ,CAAA;;;;"}
|
package/dist/index53.js
CHANGED
|
@@ -1,8 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
const create = (_ctx) => ({
|
|
2
|
+
name: "store_context",
|
|
3
|
+
description: "Store new context information for future use. Use when you learn something new that should be remembered.",
|
|
4
|
+
parameters: {
|
|
5
|
+
type: "object",
|
|
6
|
+
properties: {
|
|
7
|
+
entityType: {
|
|
8
|
+
type: "string",
|
|
9
|
+
enum: ["person", "project", "company", "term"],
|
|
10
|
+
description: "Type of entity to store"
|
|
11
|
+
},
|
|
12
|
+
name: {
|
|
13
|
+
type: "string",
|
|
14
|
+
description: "Name of the entity"
|
|
15
|
+
},
|
|
16
|
+
details: {
|
|
17
|
+
type: "object",
|
|
18
|
+
description: "Additional details about the entity"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
required: ["entityType", "name"]
|
|
22
|
+
},
|
|
23
|
+
execute: async (args) => {
|
|
24
|
+
return {
|
|
25
|
+
success: true,
|
|
26
|
+
data: {
|
|
27
|
+
stored: false,
|
|
28
|
+
message: "Context storage requires --self-update flag. Information noted but not persisted.",
|
|
29
|
+
entityType: args.entityType,
|
|
30
|
+
name: args.name
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
});
|
|
6
35
|
|
|
7
36
|
export { create };
|
|
8
37
|
//# sourceMappingURL=index53.js.map
|
package/dist/index53.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index53.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index53.js","sources":["../src/agentic/tools/store-context.ts"],"sourcesContent":["/**\n * Store Context Tool\n * \n * Stores new context information for future use.\n */\n\nimport { TranscriptionTool, ToolContext, ToolResult } from '../types';\n\nexport const create = (_ctx: ToolContext): TranscriptionTool => ({\n name: 'store_context',\n description: 'Store new context information for future use. Use when you learn something new that should be remembered.',\n parameters: {\n type: 'object',\n properties: {\n entityType: {\n type: 'string',\n enum: ['person', 'project', 'company', 'term'],\n description: 'Type of entity to store',\n },\n name: {\n type: 'string',\n description: 'Name of the entity',\n },\n details: {\n type: 'object',\n description: 'Additional details about the entity',\n },\n },\n required: ['entityType', 'name'],\n },\n \n execute: async (args: { entityType: string; name: string; details?: any }): Promise<ToolResult> => {\n // This tool requires --self-update flag to actually persist\n // Otherwise it just acknowledges without saving\n \n return {\n success: true,\n data: {\n stored: false,\n message: 'Context storage requires --self-update flag. Information noted but not persisted.',\n entityType: args.entityType,\n name: args.name,\n },\n };\n },\n});\n\n"],"names":[],"mappings":"AAQO,MAAM,MAAA,GAAS,CAAC,IAAA,MAA0C;AAAA,EAC7D,IAAA,EAAM,eAAA;AAAA,EACN,WAAA,EAAa,2GAAA;AAAA,EACb,UAAA,EAAY;AAAA,IACR,IAAA,EAAM,QAAA;AAAA,IACN,UAAA,EAAY;AAAA,MACR,UAAA,EAAY;AAAA,QACR,IAAA,EAAM,QAAA;AAAA,QACN,IAAA,EAAM,CAAC,QAAA,EAAU,SAAA,EAAW,WAAW,MAAM,CAAA;AAAA,QAC7C,WAAA,EAAa;AAAA,OACjB;AAAA,MACA,IAAA,EAAM;AAAA,QACF,IAAA,EAAM,QAAA;AAAA,QACN,WAAA,EAAa;AAAA,OACjB;AAAA,MACA,OAAA,EAAS;AAAA,QACL,IAAA,EAAM,QAAA;AAAA,QACN,WAAA,EAAa;AAAA;AACjB,KACJ;AAAA,IACA,QAAA,EAAU,CAAC,YAAA,EAAc,MAAM;AAAA,GACnC;AAAA,EAEA,OAAA,EAAS,OAAO,IAAA,KAAmF;AAI/F,IAAA,OAAO;AAAA,MACH,OAAA,EAAS,IAAA;AAAA,MACT,IAAA,EAAM;AAAA,QACF,MAAA,EAAQ,KAAA;AAAA,QACR,OAAA,EAAS,mFAAA;AAAA,QACT,YAAY,IAAA,CAAK,UAAA;AAAA,QACjB,MAAM,IAAA,CAAK;AAAA;AACf,KACJ;AAAA,EACJ;AACJ,CAAA;;;;"}
|
package/dist/index54.js
CHANGED
package/dist/index56.js
CHANGED
package/dist/index57.js
CHANGED
package/dist/index58.js
CHANGED
package/dist/index60.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
2
|
import * as fs from 'node:fs/promises';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import { getLogger } from './
|
|
4
|
+
import { getLogger } from './index48.js';
|
|
5
5
|
import { PklTranscript } from '@redaksjon/protokoll-format';
|
|
6
6
|
|
|
7
7
|
const create = (config) => {
|
package/dist/util/media.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/util/media.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAIjC,MAAM,WAAW,KAAK;IAClB,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACjE,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACjG,wBAAwB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACjH;AAYD,eAAO,MAAM,MAAM,GAAI,QAAQ,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/util/media.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAIjC,MAAM,WAAW,KAAK;IAClB,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACjE,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACjG,wBAAwB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACjH;AAYD,eAAO,MAAM,MAAM,GAAI,QAAQ,MAAM,KAAG,KAsKvC,CAAA"}
|
package/package.json
CHANGED