@nhtio/adk 0.1.0-master-e6c58205 → 0.1.0-master-89b47bec
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/CHANGELOG.md +94 -0
- package/__vite-browser-external-CU7uua8b.mjs +9 -0
- package/__vite-browser-external-CU7uua8b.mjs.map +1 -0
- package/__vite-browser-external-DAHxjh-D.js +13 -0
- package/__vite-browser-external-DAHxjh-D.js.map +1 -0
- package/batteries/embeddings/openai/adapter.cjs +1 -1
- package/batteries/embeddings/openai/adapter.mjs +1 -1
- package/batteries/embeddings/webllm/adapter.cjs +1 -1
- package/batteries/embeddings/webllm/adapter.mjs +1 -1
- package/batteries/llm/ollama/adapter.cjs +5 -5
- package/batteries/llm/ollama/adapter.mjs +5 -5
- package/batteries/llm/ollama/helpers.cjs +2 -2
- package/batteries/llm/ollama/helpers.mjs +2 -2
- package/batteries/llm/ollama/validation.cjs +1 -1
- package/batteries/llm/ollama/validation.mjs +1 -1
- package/batteries/llm/openai_chat_completions/adapter.cjs +5 -5
- package/batteries/llm/openai_chat_completions/adapter.mjs +5 -5
- package/batteries/llm/openai_chat_completions/helpers.cjs +2 -2
- package/batteries/llm/openai_chat_completions/helpers.mjs +2 -2
- package/batteries/llm/openai_chat_completions/validation.cjs +1 -1
- package/batteries/llm/openai_chat_completions/validation.mjs +1 -1
- package/batteries/llm/webllm_chat_completions/adapter.cjs +5 -5
- package/batteries/llm/webllm_chat_completions/adapter.mjs +5 -5
- package/batteries/llm/webllm_chat_completions/validation.cjs +1 -1
- package/batteries/llm/webllm_chat_completions/validation.mjs +1 -1
- package/batteries/media/contracts.cjs +38 -8
- package/batteries/media/contracts.cjs.map +1 -1
- package/batteries/media/contracts.d.ts +86 -6
- package/batteries/media/contracts.mjs +37 -9
- package/batteries/media/contracts.mjs.map +1 -1
- package/batteries/media/engines/audio_decode.cjs +46 -6
- package/batteries/media/engines/audio_decode.cjs.map +1 -1
- package/batteries/media/engines/audio_decode.d.ts +9 -5
- package/batteries/media/engines/audio_decode.mjs +47 -7
- package/batteries/media/engines/audio_decode.mjs.map +1 -1
- package/batteries/media/engines/data.cjs +159 -0
- package/batteries/media/engines/data.cjs.map +1 -0
- package/batteries/media/engines/data.d.ts +36 -0
- package/batteries/media/engines/data.mjs +157 -0
- package/batteries/media/engines/data.mjs.map +1 -0
- package/batteries/media/engines/exceljs.cjs +290 -0
- package/batteries/media/engines/exceljs.cjs.map +1 -0
- package/batteries/media/engines/exceljs.d.ts +41 -0
- package/batteries/media/engines/exceljs.mjs +288 -0
- package/batteries/media/engines/exceljs.mjs.map +1 -0
- package/batteries/media/engines/execa_executor.cjs +1 -1
- package/batteries/media/engines/execa_executor.mjs +1 -1
- package/batteries/media/engines/fs_workspace.cjs +1 -1
- package/batteries/media/engines/fs_workspace.mjs +1 -1
- package/batteries/media/engines/jimp.cjs +24 -2
- package/batteries/media/engines/jimp.cjs.map +1 -1
- package/batteries/media/engines/jimp.d.ts +3 -1
- package/batteries/media/engines/jimp.mjs +24 -2
- package/batteries/media/engines/jimp.mjs.map +1 -1
- package/batteries/media/engines/sharp.cjs +37 -4
- package/batteries/media/engines/sharp.cjs.map +1 -1
- package/batteries/media/engines/sharp.d.ts +5 -3
- package/batteries/media/engines/sharp.mjs +37 -4
- package/batteries/media/engines/sharp.mjs.map +1 -1
- package/batteries/media/engines/sheetjs.cjs +438 -0
- package/batteries/media/engines/sheetjs.cjs.map +1 -0
- package/batteries/media/engines/sheetjs.d.ts +51 -0
- package/batteries/media/engines/sheetjs.mjs +436 -0
- package/batteries/media/engines/sheetjs.mjs.map +1 -0
- package/batteries/media/engines/soffice.cjs +37 -3
- package/batteries/media/engines/soffice.cjs.map +1 -1
- package/batteries/media/engines/soffice.mjs +38 -4
- package/batteries/media/engines/soffice.mjs.map +1 -1
- package/batteries/media/engines/tesseract_js.cjs +1 -1
- package/batteries/media/engines/tesseract_js.mjs +1 -1
- package/batteries/media/engines/transformers_asr.cjs +1 -1
- package/batteries/media/engines/transformers_asr.mjs +1 -1
- package/batteries/media/forge.cjs +89 -20
- package/batteries/media/forge.cjs.map +1 -1
- package/batteries/media/forge.mjs +89 -20
- package/batteries/media/forge.mjs.map +1 -1
- package/batteries/media/formats.d.ts +9 -0
- package/batteries/media/index.d.ts +8 -6
- package/batteries/media/lint.cjs +270 -58
- package/batteries/media/lint.cjs.map +1 -1
- package/batteries/media/lint.d.ts +45 -0
- package/batteries/media/lint.mjs +267 -58
- package/batteries/media/lint.mjs.map +1 -1
- package/batteries/media/registry.d.ts +11 -2
- package/batteries/media/steps/data.d.ts +26 -0
- package/batteries/media/steps/doc.d.ts +17 -7
- package/batteries/media/steps/patch.d.ts +90 -0
- package/batteries/media/steps/sheet.d.ts +10 -6
- package/batteries/media/steps/text.d.ts +4 -1
- package/batteries/media/validate.d.ts +5 -0
- package/batteries/media/verbs.d.ts +12 -1
- package/batteries/media.cjs +869 -448
- package/batteries/media.cjs.map +1 -1
- package/batteries/media.mjs +829 -409
- package/batteries/media.mjs.map +1 -1
- package/batteries/storage/flydrive.cjs +3 -6
- package/batteries/storage/flydrive.cjs.map +1 -1
- package/batteries/storage/flydrive.mjs +3 -6
- package/batteries/storage/flydrive.mjs.map +1 -1
- package/batteries/storage/in_memory.cjs +1 -1
- package/batteries/storage/in_memory.mjs +1 -1
- package/batteries/storage/opfs.cjs +1 -1
- package/batteries/storage/opfs.mjs +1 -1
- package/batteries/tools/_shared.cjs +2 -2
- package/batteries/tools/_shared.mjs +2 -2
- package/batteries/tools/color.cjs +2 -2
- package/batteries/tools/color.mjs +2 -2
- package/batteries/tools/comparison.cjs +3 -3
- package/batteries/tools/comparison.mjs +3 -3
- package/batteries/tools/data_structure.cjs +3 -3
- package/batteries/tools/data_structure.mjs +3 -3
- package/batteries/tools/datetime_extended.cjs +3 -3
- package/batteries/tools/datetime_extended.mjs +3 -3
- package/batteries/tools/datetime_math.cjs +3 -3
- package/batteries/tools/datetime_math.mjs +3 -3
- package/batteries/tools/encoding.cjs +3 -3
- package/batteries/tools/encoding.mjs +3 -3
- package/batteries/tools/formatting.cjs +3 -3
- package/batteries/tools/formatting.mjs +3 -3
- package/batteries/tools/geo_basics.cjs +2 -2
- package/batteries/tools/geo_basics.mjs +2 -2
- package/batteries/tools/math.cjs +3 -3
- package/batteries/tools/math.mjs +3 -3
- package/batteries/tools/memory.cjs +6 -6
- package/batteries/tools/memory.mjs +6 -6
- package/batteries/tools/parsing.cjs +4 -4
- package/batteries/tools/parsing.mjs +4 -4
- package/batteries/tools/retrievables.cjs +5 -5
- package/batteries/tools/retrievables.mjs +5 -5
- package/batteries/tools/scrapper.cjs +1 -1
- package/batteries/tools/scrapper.mjs +1 -1
- package/batteries/tools/searxng.cjs +1 -1
- package/batteries/tools/searxng.mjs +1 -1
- package/batteries/tools/standing_instructions.cjs +4 -4
- package/batteries/tools/standing_instructions.mjs +4 -4
- package/batteries/tools/statistics.cjs +4 -4
- package/batteries/tools/statistics.mjs +4 -4
- package/batteries/tools/string_processing.cjs +3 -3
- package/batteries/tools/string_processing.mjs +3 -3
- package/batteries/tools/structured_data.cjs +3 -3
- package/batteries/tools/structured_data.mjs +3 -3
- package/batteries/tools/text_analysis.cjs +3 -3
- package/batteries/tools/text_analysis.mjs +3 -3
- package/batteries/tools/text_comparison.cjs +2 -2
- package/batteries/tools/text_comparison.mjs +2 -2
- package/batteries/tools/time.cjs +3 -3
- package/batteries/tools/time.mjs +3 -3
- package/batteries/tools/unit_conversion.cjs +2 -2
- package/batteries/tools/unit_conversion.mjs +2 -2
- package/batteries/tools/web_retrieval.cjs +1 -1
- package/batteries/tools/web_retrieval.mjs +1 -1
- package/batteries/tools.cjs +2 -2
- package/batteries/tools.mjs +2 -2
- package/batteries/vector/arangodb.cjs +1 -1
- package/batteries/vector/arangodb.mjs +1 -1
- package/batteries/vector/clickhouse.cjs +1 -1
- package/batteries/vector/clickhouse.mjs +1 -1
- package/batteries/vector/cloudflare.cjs +1 -1
- package/batteries/vector/cloudflare.mjs +1 -1
- package/batteries/vector/couchbase.cjs +1 -1
- package/batteries/vector/couchbase.mjs +1 -1
- package/batteries/vector/duckdb.cjs +1 -1
- package/batteries/vector/duckdb.mjs +1 -1
- package/batteries/vector/elasticsearch.cjs +1 -1
- package/batteries/vector/elasticsearch.mjs +1 -1
- package/batteries/vector/filters.cjs +1 -1
- package/batteries/vector/filters.mjs +1 -1
- package/batteries/vector/hnswlib.cjs +1 -1
- package/batteries/vector/hnswlib.mjs +1 -1
- package/batteries/vector/lancedb.cjs +1 -1
- package/batteries/vector/lancedb.mjs +1 -1
- package/batteries/vector/mariadb.cjs +1 -1
- package/batteries/vector/mariadb.mjs +1 -1
- package/batteries/vector/meilisearch.cjs +1 -1
- package/batteries/vector/meilisearch.mjs +1 -1
- package/batteries/vector/migrate.cjs +1 -1
- package/batteries/vector/migrate.mjs +1 -1
- package/batteries/vector/mongodb.cjs +1 -1
- package/batteries/vector/mongodb.mjs +1 -1
- package/batteries/vector/neo4j.cjs +1 -1
- package/batteries/vector/neo4j.mjs +1 -1
- package/batteries/vector/opensearch.cjs +1 -1
- package/batteries/vector/opensearch.mjs +1 -1
- package/batteries/vector/oracle23ai.cjs +1 -1
- package/batteries/vector/oracle23ai.mjs +1 -1
- package/batteries/vector/pinecone.cjs +1 -1
- package/batteries/vector/pinecone.mjs +1 -1
- package/batteries/vector/redis.cjs +1 -1
- package/batteries/vector/redis.mjs +1 -1
- package/batteries/vector/retrievable.cjs +1 -1
- package/batteries/vector/retrievable.mjs +1 -1
- package/batteries/vector/s3vectors.cjs +1 -1
- package/batteries/vector/s3vectors.mjs +1 -1
- package/batteries/vector/solr.cjs +1 -1
- package/batteries/vector/solr.mjs +1 -1
- package/batteries/vector/surrealdb.cjs +1 -1
- package/batteries/vector/surrealdb.mjs +1 -1
- package/batteries/vector/typesense.cjs +1 -1
- package/batteries/vector/typesense.mjs +1 -1
- package/batteries/vector/vespa.cjs +1 -1
- package/batteries/vector/vespa.mjs +1 -1
- package/batteries/vector/weaviate.cjs +1 -1
- package/batteries/vector/weaviate.mjs +1 -1
- package/batteries.cjs +2 -2
- package/batteries.mjs +2 -2
- package/bundled_xlsx.d.ts +1075 -0
- package/{common-BxoznqbX.mjs → common-BQoFv108.mjs} +7 -7
- package/{common-BxoznqbX.mjs.map → common-BQoFv108.mjs.map} +1 -1
- package/{common-BBK2e5ro.js → common-DmDn4Gfl.js} +7 -7
- package/{common-BBK2e5ro.js.map → common-DmDn4Gfl.js.map} +1 -1
- package/common.cjs +7 -7
- package/common.mjs +7 -7
- package/{dispatch_runner-Hn5idJYx.js → dispatch_runner-BwplbCPr.js} +3 -3
- package/{dispatch_runner-Hn5idJYx.js.map → dispatch_runner-BwplbCPr.js.map} +1 -1
- package/{dispatch_runner-DUrpj0xR.mjs → dispatch_runner-C1ar_D7W.mjs} +3 -3
- package/{dispatch_runner-DUrpj0xR.mjs.map → dispatch_runner-C1ar_D7W.mjs.map} +1 -1
- package/dispatch_runner.cjs +1 -1
- package/dispatch_runner.mjs +1 -1
- package/eslint.cjs +1 -1
- package/eslint.mjs +1 -1
- package/forge.cjs +4 -4
- package/forge.mjs +4 -4
- package/formats-CCylUHZw.mjs +161 -0
- package/formats-CCylUHZw.mjs.map +1 -0
- package/formats-DZVuqZUN.js +196 -0
- package/formats-DZVuqZUN.js.map +1 -0
- package/guards.cjs +8 -8
- package/guards.mjs +8 -8
- package/index.cjs +11 -11
- package/index.mjs +11 -11
- package/mcp/adk-docs-corpus.json +1 -1
- package/package.json +198 -182
- package/{scrapper-DLj_KkxK.mjs → scrapper-Dn2wXu0Y.mjs} +5 -5
- package/{scrapper-DLj_KkxK.mjs.map → scrapper-Dn2wXu0Y.mjs.map} +1 -1
- package/{scrapper-Cmf1CSA-.js → scrapper-mBZ0Odq7.js} +5 -5
- package/{scrapper-Cmf1CSA-.js.map → scrapper-mBZ0Odq7.js.map} +1 -1
- package/{searxng-BKs5s8Su.js → searxng-Dj-iP_Vz.js} +5 -5
- package/{searxng-BKs5s8Su.js.map → searxng-Dj-iP_Vz.js.map} +1 -1
- package/{searxng-BJ-aZcMz.mjs → searxng-DjFxtFf6.mjs} +5 -5
- package/{searxng-BJ-aZcMz.mjs.map → searxng-DjFxtFf6.mjs.map} +1 -1
- package/server.json +21 -0
- package/skills/adk-assembly/SKILL.md +2 -2
- package/{spooled_artifact-BR0IhU9y.js → spooled_artifact-BCmPrxZS.js} +3 -3
- package/{spooled_artifact-BR0IhU9y.js.map → spooled_artifact-BCmPrxZS.js.map} +1 -1
- package/{spooled_artifact-nTE6ujM8.mjs → spooled_artifact-DL36jnqA.mjs} +3 -3
- package/{spooled_artifact-nTE6ujM8.mjs.map → spooled_artifact-DL36jnqA.mjs.map} +1 -1
- package/spooled_artifact.cjs +2 -2
- package/spooled_artifact.mjs +2 -2
- package/{spooled_markdown_artifact-Dj3fNowz.js → spooled_markdown_artifact-CD4PrrpV.js} +3 -3
- package/{spooled_markdown_artifact-Dj3fNowz.js.map → spooled_markdown_artifact-CD4PrrpV.js.map} +1 -1
- package/{spooled_markdown_artifact-DIYzbQv8.mjs → spooled_markdown_artifact-Da-Xnebh.mjs} +3 -3
- package/{spooled_markdown_artifact-DIYzbQv8.mjs.map → spooled_markdown_artifact-Da-Xnebh.mjs.map} +1 -1
- package/{thought-Cde2Y_GK.mjs → thought-CtOoZUSE.mjs} +3 -3
- package/{thought-Cde2Y_GK.mjs.map → thought-CtOoZUSE.mjs.map} +1 -1
- package/{thought-BFtsnUTU.js → thought-eka4iUHa.js} +3 -3
- package/{thought-BFtsnUTU.js.map → thought-eka4iUHa.js.map} +1 -1
- package/{tool-CcxYxA5X.mjs → tool-CITF20yJ.mjs} +3 -3
- package/{tool-CcxYxA5X.mjs.map → tool-CITF20yJ.mjs.map} +1 -1
- package/{tool-B2nnkwNU.js → tool-Dhjca7rC.js} +3 -3
- package/{tool-B2nnkwNU.js.map → tool-Dhjca7rC.js.map} +1 -1
- package/{tool_call-BxL3eU1k.js → tool_call-Cyi0hUUc.js} +4 -4
- package/{tool_call-BxL3eU1k.js.map → tool_call-Cyi0hUUc.js.map} +1 -1
- package/{tool_call-B3MOog2R.mjs → tool_call-D_k36aI4.mjs} +4 -4
- package/{tool_call-B3MOog2R.mjs.map → tool_call-D_k36aI4.mjs.map} +1 -1
- package/{tool_registry-BaLUIzWz.mjs → tool_registry-CZ55mIti.mjs} +152 -143
- package/tool_registry-CZ55mIti.mjs.map +1 -0
- package/{tool_registry-BdKlPuHS.js → tool_registry-DwZ6pzN4.js} +151 -142
- package/tool_registry-DwZ6pzN4.js.map +1 -0
- package/{turn_runner-M2I8G2ok.js → turn_runner-CCZcsoDU.js} +5 -5
- package/{turn_runner-M2I8G2ok.js.map → turn_runner-CCZcsoDU.js.map} +1 -1
- package/{turn_runner-BV4BaZK9.mjs → turn_runner-DRPpVvsd.mjs} +5 -5
- package/{turn_runner-BV4BaZK9.mjs.map → turn_runner-DRPpVvsd.mjs.map} +1 -1
- package/turn_runner.cjs +1 -1
- package/turn_runner.mjs +1 -1
- package/{validate-JOHfh-BB.mjs → validate-C_hTnDBE.mjs} +95 -8
- package/validate-C_hTnDBE.mjs.map +1 -0
- package/{validate-DgDZkUKs.js → validate-gaSa9bsk.js} +95 -8
- package/validate-gaSa9bsk.js.map +1 -0
- package/xlsx-B0sTpEC2.js +30615 -0
- package/xlsx-B0sTpEC2.js.map +1 -0
- package/xlsx-DiMpn_Xv.mjs +30596 -0
- package/xlsx-DiMpn_Xv.mjs.map +1 -0
- package/xlsx.zahl-D2_Q-Xs4.mjs +6 -0
- package/xlsx.zahl-D2_Q-Xs4.mjs.map +1 -0
- package/xlsx.zahl-ZIcUQVv8.js +7 -0
- package/xlsx.zahl-ZIcUQVv8.js.map +1 -0
- package/tool_registry-BaLUIzWz.mjs.map +0 -1
- package/tool_registry-BdKlPuHS.js.map +0 -1
- package/validate-DgDZkUKs.js.map +0 -1
- package/validate-JOHfh-BB.mjs.map +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The structured apply_patch envelope: parser and applier for the
|
|
3
|
+
* `*** Begin Patch` multi-file dialect.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Internal sibling of the `@nhtio/adk/batteries/media` entry. This dialect derives from the
|
|
7
|
+
* GitHub Copilot apply_patch format — one of the most robust and battle-tested patch formats
|
|
8
|
+
* in production use, which is also why models already know how to write it. The grammar
|
|
9
|
+
* (`*** Begin Patch` … `*** End Patch`, `*** Add File:` / `*** Delete File:` /
|
|
10
|
+
* `*** Update File:` (+ `*** Move to:`), `@@` context hunks with `+`/`-`/space lines) is
|
|
11
|
+
* preserved exactly — inventing a "better" variation would forfeit the pretraining. Ported
|
|
12
|
+
* from the source server's `doc.apply_patch` adapter (its green e2e suite informs the spec
|
|
13
|
+
* coverage); the context matcher rejects ambiguity (a hunk whose context matches more than
|
|
14
|
+
* one location fails rather than guessing).
|
|
15
|
+
*/
|
|
16
|
+
/** One parsed `@@` hunk: the context+removal lines and their replacement. */
|
|
17
|
+
export interface ParsedHunk {
|
|
18
|
+
oldLines: string[];
|
|
19
|
+
newLines: string[];
|
|
20
|
+
added: number;
|
|
21
|
+
removed: number;
|
|
22
|
+
}
|
|
23
|
+
/** `*** Add File:` — create a new file from `+` lines. */
|
|
24
|
+
export interface AddOperation {
|
|
25
|
+
type: 'add';
|
|
26
|
+
path: string;
|
|
27
|
+
content: string;
|
|
28
|
+
added: number;
|
|
29
|
+
}
|
|
30
|
+
/** `*** Delete File:` — remove a file. */
|
|
31
|
+
export interface DeleteOperation {
|
|
32
|
+
type: 'delete';
|
|
33
|
+
path: string;
|
|
34
|
+
}
|
|
35
|
+
/** `*** Update File:` (+ optional `*** Move to:`) — apply hunks, optionally rename. */
|
|
36
|
+
export interface UpdateOperation {
|
|
37
|
+
type: 'update';
|
|
38
|
+
path: string;
|
|
39
|
+
movePath?: string;
|
|
40
|
+
hunks: ParsedHunk[];
|
|
41
|
+
added: number;
|
|
42
|
+
removed: number;
|
|
43
|
+
}
|
|
44
|
+
/** Any one operation of a structured patch. */
|
|
45
|
+
export type PatchOperation = AddOperation | DeleteOperation | UpdateOperation;
|
|
46
|
+
/** The parsed envelope: ordered operations plus totals. */
|
|
47
|
+
export interface ParsedApplyPatch {
|
|
48
|
+
operations: PatchOperation[];
|
|
49
|
+
added: number;
|
|
50
|
+
removed: number;
|
|
51
|
+
}
|
|
52
|
+
/** `true` when `patch` is the structured envelope rather than a unified diff. */
|
|
53
|
+
export declare const isStructuredPatch: (patch: string) => boolean;
|
|
54
|
+
/** Normalize a workspace path: relative, no `.`/`..`/empty segments, forward slashes. */
|
|
55
|
+
export declare const normalizeWorkspacePath: (path: string) => string;
|
|
56
|
+
/**
|
|
57
|
+
* Parse a structured `*** Begin Patch` envelope.
|
|
58
|
+
*
|
|
59
|
+
* @param patch - The raw patch text.
|
|
60
|
+
* @returns The parsed operations.
|
|
61
|
+
*/
|
|
62
|
+
export declare const parseStructuredPatch: (patch: string) => ParsedApplyPatch;
|
|
63
|
+
/**
|
|
64
|
+
* Apply an update operation's hunks to `inputText`. Context matching is exact and rejects
|
|
65
|
+
* ambiguity: a hunk whose old-lines match more than one location past the cursor fails
|
|
66
|
+
* rather than guessing.
|
|
67
|
+
*
|
|
68
|
+
* @param inputText - The file's current text.
|
|
69
|
+
* @param hunks - The parsed hunks, in order.
|
|
70
|
+
* @returns The patched text.
|
|
71
|
+
*/
|
|
72
|
+
export declare const applyUpdateHunks: (inputText: string, hunks: ParsedHunk[]) => string;
|
|
73
|
+
/** One file in the virtual workspace a structured patch operates over. */
|
|
74
|
+
export interface WorkspaceFile {
|
|
75
|
+
text: string;
|
|
76
|
+
mimeType: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Apply a parsed structured patch to a virtual workspace of files keyed by normalized path.
|
|
80
|
+
*
|
|
81
|
+
* @param files - The workspace (mutated in place).
|
|
82
|
+
* @param patch - The parsed envelope.
|
|
83
|
+
* @returns The workspace and the number of files touched.
|
|
84
|
+
*/
|
|
85
|
+
export declare const applyOperations: (files: Map<string, WorkspaceFile>, patch: ParsedApplyPatch) => {
|
|
86
|
+
files: Map<string, WorkspaceFile>;
|
|
87
|
+
modifiedFiles: number;
|
|
88
|
+
};
|
|
89
|
+
/** Infer a text MIME from a workspace path's extension (Add File outputs). */
|
|
90
|
+
export declare const inferTextMimeFromPath: (path: string) => string;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `sheet.*` step implementations:
|
|
2
|
+
* `sheet.*` step implementations: thin dispatchers into the engine registry's edit
|
|
3
|
+
* capability.
|
|
3
4
|
*
|
|
4
5
|
* @remarks
|
|
5
|
-
* Internal sibling of the `@nhtio/adk/batteries/media` entry.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Internal sibling of the `@nhtio/adk/batteries/media` entry. The actual workbook surgery
|
|
7
|
+
* lives in edit-capable engines (`engines/exceljs` preserves styling; `engines/sheetjs`
|
|
8
|
+
* covers the wider read matrix but strips styling — SheetJS CE limitation). Each step here:
|
|
9
|
+
* normalizes non-xlsx spreadsheet inputs to xlsx when the selected edit coverage requires it
|
|
10
|
+
* (any spreadsheet-family MIME with a declared `hasConvert(mime, 'xlsx')` edge qualifies —
|
|
11
|
+
* ODS/XLS via soffice or sheetjs, XLSB/FODS/SYLK/DIF/DBF/NUMBERS via sheetjs), dispatches the
|
|
12
|
+
* op through `ctx.engines.edit`, and degrades to a model-actionable failure when no edit
|
|
13
|
+
* engine is configured.
|
|
10
14
|
*/
|
|
11
15
|
import type { StepImpl } from "../runtime";
|
|
12
16
|
/** `sheet.add_rows` — insert rows before/after an index, or append. */
|
|
@@ -39,5 +39,8 @@ export declare const redactStep: StepImpl;
|
|
|
39
39
|
export declare const updateTextStep: StepImpl;
|
|
40
40
|
/** `diff` — compare against another media (text-comparable formats in Phase 0). */
|
|
41
41
|
export declare const diffStep: StepImpl;
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* `apply_patch` — apply a unified diff, or a structured `*** Begin Patch` envelope
|
|
44
|
+
* (multi-file Add/Delete/Update/Move — the GitHub Copilot apply_patch dialect).
|
|
45
|
+
*/
|
|
43
46
|
export declare const applyPatchStep: StepImpl;
|
|
@@ -21,6 +21,11 @@ export interface CapabilityProbe {
|
|
|
21
21
|
hasConvert(from?: string, to?: string): boolean;
|
|
22
22
|
/** `true` when some engine declares a mutate capability. */
|
|
23
23
|
hasMutate(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* `true` when some engine declares a matching edit capability (omit both for "any").
|
|
26
|
+
* Optional so existing probe stubs stay valid; absent means "no edit engines".
|
|
27
|
+
*/
|
|
28
|
+
hasEdit?(mime?: string, op?: string): boolean;
|
|
24
29
|
}
|
|
25
30
|
/** Options for {@link validateSegments} / {@link validateOps}. */
|
|
26
31
|
export interface ValidateOptions {
|
|
@@ -45,6 +45,9 @@ export type VerbRequirement = {
|
|
|
45
45
|
to?: string;
|
|
46
46
|
} | {
|
|
47
47
|
capability: 'mutate';
|
|
48
|
+
} | {
|
|
49
|
+
capability: 'edit';
|
|
50
|
+
op?: string;
|
|
48
51
|
};
|
|
49
52
|
/** Broad input families used for verb-applicability checks. */
|
|
50
53
|
export type FormatFamily = 'document' | 'spreadsheet' | 'presentation' | 'image' | 'audio' | 'any';
|
|
@@ -69,7 +72,7 @@ export interface VerbSpec {
|
|
|
69
72
|
/** Output kind. May be refined by an `out`-style arg (documented per verb). */
|
|
70
73
|
output: VerbOutput;
|
|
71
74
|
}
|
|
72
|
-
/** Conversion targets supported by `convert` (
|
|
75
|
+
/** Conversion targets supported by `convert` (the server's enum plus the SheetJS/data matrix). */
|
|
73
76
|
export declare const CONVERT_TARGETS: readonly [
|
|
74
77
|
"pdf",
|
|
75
78
|
"html",
|
|
@@ -77,6 +80,7 @@ export declare const CONVERT_TARGETS: readonly [
|
|
|
77
80
|
"md",
|
|
78
81
|
"csv",
|
|
79
82
|
"json",
|
|
83
|
+
"yaml",
|
|
80
84
|
"docx",
|
|
81
85
|
"doc",
|
|
82
86
|
"rtf",
|
|
@@ -84,6 +88,13 @@ export declare const CONVERT_TARGETS: readonly [
|
|
|
84
88
|
"xlsx",
|
|
85
89
|
"xls",
|
|
86
90
|
"ods",
|
|
91
|
+
"xlsm",
|
|
92
|
+
"xlsb",
|
|
93
|
+
"fods",
|
|
94
|
+
"sylk",
|
|
95
|
+
"dif",
|
|
96
|
+
"dbf",
|
|
97
|
+
"numbers",
|
|
87
98
|
"pptx",
|
|
88
99
|
"ppt",
|
|
89
100
|
"odp"
|