toolcraft 0.0.223 → 0.0.225

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.
Files changed (64) hide show
  1. package/README.md +20 -3
  2. package/composition.json +4 -4
  3. package/dist/composition.json +4 -4
  4. package/node_modules/@poe-code/config-mutations/README.md +7 -0
  5. package/node_modules/@poe-code/frontmatter/README.md +2 -0
  6. package/node_modules/@poe-code/process-runner/README.md +2 -0
  7. package/node_modules/@poe-code/task-list/README.md +11 -0
  8. package/node_modules/smol-toml/README.md +249 -84
  9. package/node_modules/smol-toml/dist/date.d.ts +1 -0
  10. package/node_modules/smol-toml/dist/date.d.ts.map +1 -0
  11. package/node_modules/smol-toml/dist/date.js +1 -0
  12. package/node_modules/smol-toml/dist/date.js.map +1 -0
  13. package/node_modules/smol-toml/dist/error.d.ts +1 -0
  14. package/node_modules/smol-toml/dist/error.d.ts.map +1 -0
  15. package/node_modules/smol-toml/dist/error.js +1 -0
  16. package/node_modules/smol-toml/dist/error.js.map +1 -0
  17. package/node_modules/smol-toml/dist/extract.d.ts +1 -0
  18. package/node_modules/smol-toml/dist/extract.d.ts.map +1 -0
  19. package/node_modules/smol-toml/dist/extract.js +11 -10
  20. package/node_modules/smol-toml/dist/extract.js.map +1 -0
  21. package/node_modules/smol-toml/dist/index.cjs +658 -847
  22. package/node_modules/smol-toml/dist/index.cjs.map +1 -0
  23. package/node_modules/smol-toml/dist/index.d.ts +2 -1
  24. package/node_modules/smol-toml/dist/index.d.ts.map +1 -0
  25. package/node_modules/smol-toml/dist/index.js +1 -0
  26. package/node_modules/smol-toml/dist/index.js.map +1 -0
  27. package/node_modules/smol-toml/dist/parse.d.ts +1 -0
  28. package/node_modules/smol-toml/dist/parse.d.ts.map +1 -0
  29. package/node_modules/smol-toml/dist/parse.js +4 -4
  30. package/node_modules/smol-toml/dist/parse.js.map +1 -0
  31. package/node_modules/smol-toml/dist/primitive.d.ts +2 -1
  32. package/node_modules/smol-toml/dist/primitive.d.ts.map +1 -0
  33. package/node_modules/smol-toml/dist/primitive.js +130 -72
  34. package/node_modules/smol-toml/dist/primitive.js.map +1 -0
  35. package/node_modules/smol-toml/dist/stringify.d.ts +1 -0
  36. package/node_modules/smol-toml/dist/stringify.d.ts.map +1 -0
  37. package/node_modules/smol-toml/dist/stringify.js +2 -1
  38. package/node_modules/smol-toml/dist/stringify.js.map +1 -0
  39. package/node_modules/smol-toml/dist/struct.d.ts +1 -0
  40. package/node_modules/smol-toml/dist/struct.d.ts.map +1 -0
  41. package/node_modules/smol-toml/dist/struct.js +6 -11
  42. package/node_modules/smol-toml/dist/struct.js.map +1 -0
  43. package/node_modules/smol-toml/dist/util.d.ts +1 -1
  44. package/node_modules/smol-toml/dist/util.d.ts.map +1 -0
  45. package/node_modules/smol-toml/dist/util.js +3 -28
  46. package/node_modules/smol-toml/dist/util.js.map +1 -0
  47. package/node_modules/smol-toml/package.json +44 -34
  48. package/node_modules/smol-toml/src/date.ts +152 -0
  49. package/node_modules/smol-toml/src/error.ts +77 -0
  50. package/node_modules/smol-toml/src/extract.ts +112 -0
  51. package/node_modules/smol-toml/src/index.ts +42 -0
  52. package/node_modules/smol-toml/src/parse.ts +184 -0
  53. package/node_modules/smol-toml/src/primitive.ts +247 -0
  54. package/node_modules/smol-toml/src/stringify.ts +191 -0
  55. package/node_modules/smol-toml/src/struct.ts +199 -0
  56. package/node_modules/smol-toml/src/util.ts +101 -0
  57. package/node_modules/tiny-http-mcp-server/dist/composition.json +1 -1
  58. package/node_modules/tiny-http-mcp-server/package.json +1 -1
  59. package/node_modules/tiny-stdio-mcp-server/README.md +19 -3
  60. package/node_modules/tiny-stdio-mcp-server/dist/composition.json +1 -1
  61. package/node_modules/toolcraft-design/README.md +3 -3
  62. package/node_modules/toolcraft-schema/README.md +8 -5
  63. package/node_modules/toolcraft-schema/package.json +1 -1
  64. package/package.json +2 -2
package/README.md CHANGED
@@ -46,7 +46,7 @@ After the tool map exists, add commands to `root`, expose the same tree through
46
46
  npm install toolcraft
47
47
  ```
48
48
 
49
- `toolcraft-schema` is a dependency and its `S` builders are re-exported from `toolcraft`. Requires Node 20+.
49
+ `toolcraft-schema` is a dependency and its `S` builders are re-exported from `toolcraft`. Requires Node.js >= 18.18.
50
50
 
51
51
  ## Hello world
52
52
 
@@ -181,7 +181,9 @@ The same `root` flows into all three. No duplication.
181
181
 
182
182
  **Tree**: the `root` group is a `defineGroup` whose children are commands and sub-groups. Any depth. CLI flags, MCP tool names, and SDK methods are derived from the path.
183
183
 
184
- **CLI help**: group help lists visible child commands with their parameter tokens inline. Required options appear as `--name <type>`, optional options and defaults appear in brackets like `[--limit <number>]`, and positional parameters render as positional tokens like `<name>` or `[name]` depending on whether they are required. Command-specific `--help` still shows the detailed parameter table.
184
+ **Validation**: CLI, MCP, SDK, and preset-file inputs all enforce the same `toolcraft-schema` constraints, including string lengths and patterns, numeric ranges and integer schemas, and array `minItems`/`maxItems`. CLI array options also accept negative numeric array values when the item schema allows them instead of treating those values as new flags.
185
+
186
+ **CLI help**: group help lists visible child commands with their parameter tokens inline. Required options appear as `--name <type>`, optional options and defaults appear in brackets like `[--limit <number>]`, and positional parameters render as positional tokens like `<name>` or `[name]` depending on whether they are required. Command-specific `--help` still shows the detailed parameter table. When `controls.output` is enabled, `--help --output json` returns a stable JSON help document for groups and commands, including usage, visible commands, options, positional markers, secrets, and examples. Unknown help targets fail with suggestions and a pointer to the nearest valid help command.
185
187
 
186
188
  **Examples**: commands may declare `examples: Array<{ title, params }>` alongside their params.
187
189
  CLI help renders an `Examples` section for the command, and MCP tool descriptions include the
@@ -518,10 +520,16 @@ export function slackApprovalProvider(opts: {
518
520
 
519
521
  Throw `UserError` for expected, user-facing failures. The CLI prints the message without a stack trace and sets exit code 1; MCP and SDK surface the message as the error body. Usage mistakes include a pointer to the relevant command help. Any other thrown error is treated as unexpected and shows a trimmed stack with `--debug`; use `--debug=raw` to include framework and runtime frames.
520
522
 
521
- HTTP-style errors with request/response context print the request, status, and a response-body snippet by default. `--verbose` or `--debug` prints headers and the full request/response bodies, with authorization headers redacted.
523
+ HTTP-style errors with request/response context print the request, status, and a concise summary by default. The summary extracts common fields such as error code, message, request id, retry-after, hints, and field errors when they are present, then falls back to a response-body snippet. `--verbose` or `--debug` prints headers and the full request/response bodies, with authorization headers redacted.
522
524
 
523
525
  Enable structured error reports with `errorReports: true`, `errorReports: { dir }`, or `TOOLCRAFT_ERROR_REPORTS=1`. Reports are written under `.toolcraft/errors` by default, include argv, parsed params, resolved secret presence, structured error fields, stack/cause chains, and HTTP transcripts, and redact declared secrets plus parameter names that look sensitive.
524
526
 
527
+ ## Runtime diagnostics
528
+
529
+ Handlers receive `diagnostics` and `progress` in the shared runtime context. `progress(message)` emits an info-level progress diagnostic. `diagnostics.emit({ level, message, category, data })` supports `error`, `warn`, `info`, `debug`, and `trace` events for categories such as `runtime`, `http`, `auth`, `retry`, and `progress`.
530
+
531
+ CLI, SDK, and MCP runtimes share the same logger and log-level gates. The default diagnostic level is `warn`; `silent` suppresses diagnostic events. CLI apps can enable `controls.logLevel` to expose `--log-level <silent|error|warn|info|debug|trace>`, and `controls.verbose` maps `--verbose` to trace-level diagnostics when no explicit log level is passed.
532
+
525
533
  ## Migrating from a folder of scripts
526
534
 
527
535
  Pattern for adopting toolcraft incrementally:
@@ -611,6 +619,10 @@ additional long CLI flags. For example, `rawResponse` normally maps to `--raw-re
611
619
  ### `runCLI(root, options)`
612
620
 
613
621
  - `casing?: "kebab" | "snake"` — generated CLI flag style.
622
+ - `argv?: readonly string[]` — explicit argv vector for embedded runners and tests. Defaults to `process.argv` and is used for routing, help rendering, version lookup, error reports, and output-mode detection.
623
+ - `controls?: { debug?: boolean; logLevel?: boolean; output?: boolean; verbose?: boolean; yes?: boolean }` — opts into global CLI controls such as `--debug`, `--log-level`, `--output`, `--verbose`, and `--yes`.
624
+ - `logLevel?: "silent" | "error" | "warn" | "info" | "debug" | "trace"` — default runtime diagnostic level.
625
+ - `logger?: RuntimeLogger | ((event) => void)` — receives diagnostic events that pass the configured log level.
614
626
  - `services?: TServices` — merged into every handler context.
615
627
  - `version?: string` — surfaced via `--version`.
616
628
  - `presets?: boolean` — enables `--preset <path>` for loading parameter defaults from JSON files.
@@ -626,6 +638,8 @@ additional long CLI flags. For example, `rawResponse` normally maps to `--raw-re
626
638
  - `casing?: "camel"` — generated SDK member style.
627
639
  - `services?` / `humanInLoop?` / `apiVersion?` / `errorReports?`
628
640
  - `projectRoot?: string` — root used for MCP proxy cache files (`.toolcraft/mcp/*.json`).
641
+ - `logLevel?: "silent" | "error" | "warn" | "info" | "debug" | "trace"` — default runtime diagnostic level.
642
+ - `logger?: RuntimeLogger | ((event) => void)` — receives diagnostic events that pass the configured log level.
629
643
 
630
644
  ### `createMCPServer(root, options)` / `runMCP(root, options)`
631
645
 
@@ -633,6 +647,8 @@ additional long CLI flags. For example, `rawResponse` normally maps to `--raw-re
633
647
  - `version: string`
634
648
  - `services?` / `humanInLoop?` / `apiVersion?` / `errorReports?`
635
649
  - `projectRoot?: string` — root used for MCP proxy cache files (`.toolcraft/mcp/*.json`).
650
+ - `logLevel?: "silent" | "error" | "warn" | "info" | "debug" | "trace"` — default runtime diagnostic level.
651
+ - `logger?: RuntimeLogger | ((event) => void)` — receives diagnostic events that pass the configured log level.
636
652
  - `tools?: string[]` — allowlist of MCP tool names or group prefixes. Tool names are `__`-joined snake_case path segments (`root__bot__create`); a prefix like `root__bot` includes every descendant tool.
637
653
  - `omitRootToolNamePrefix?: boolean` — defaults to `false`. Set to `true` to omit the root group name from single-root MCP tool names (`bot__create`).
638
654
  - `casing?: "snake" | "camel"` — affects MCP input-schema property names, output-schema property names, and structured result keys. Tool names always stay `__`-joined snake_case.
@@ -659,6 +675,7 @@ Returns the `HumanInLoopRuntime` accepted by `runCLI` / `createMCPServer` / `cre
659
675
  - `fetch: typeof globalThis.fetch`
660
676
  - `fs: { readFile, writeFile, exists }`
661
677
  - `env: { get(key: string): string | undefined }`
678
+ - `diagnostics: RuntimeLogger`
662
679
  - `progress(message: string): void`
663
680
  - All `services` keys merged in.
664
681
 
package/composition.json CHANGED
@@ -93,12 +93,12 @@
93
93
  },
94
94
  {
95
95
  "name": "smol-toml",
96
- "version": "1.6.1",
96
+ "version": "1.7.0",
97
97
  "license": "BSD-3-Clause"
98
98
  },
99
99
  {
100
100
  "name": "tiny-http-mcp-server",
101
- "version": "0.1.15",
101
+ "version": "0.1.16",
102
102
  "license": "MIT"
103
103
  },
104
104
  {
@@ -113,7 +113,7 @@
113
113
  },
114
114
  {
115
115
  "name": "toolcraft",
116
- "version": "0.0.223",
116
+ "version": "0.0.225",
117
117
  "license": "MIT"
118
118
  },
119
119
  {
@@ -123,7 +123,7 @@
123
123
  },
124
124
  {
125
125
  "name": "toolcraft-schema",
126
- "version": "0.0.223",
126
+ "version": "0.0.225",
127
127
  "license": "MIT"
128
128
  },
129
129
  {
@@ -93,12 +93,12 @@
93
93
  },
94
94
  {
95
95
  "name": "smol-toml",
96
- "version": "1.6.1",
96
+ "version": "1.7.0",
97
97
  "license": "BSD-3-Clause"
98
98
  },
99
99
  {
100
100
  "name": "tiny-http-mcp-server",
101
- "version": "0.1.15",
101
+ "version": "0.1.16",
102
102
  "license": "MIT"
103
103
  },
104
104
  {
@@ -113,7 +113,7 @@
113
113
  },
114
114
  {
115
115
  "name": "toolcraft",
116
- "version": "0.0.223",
116
+ "version": "0.0.225",
117
117
  "license": "MIT"
118
118
  },
119
119
  {
@@ -123,7 +123,7 @@
123
123
  },
124
124
  {
125
125
  "name": "toolcraft-schema",
126
- "version": "0.0.223",
126
+ "version": "0.0.225",
127
127
  "license": "MIT"
128
128
  },
129
129
  {
@@ -50,6 +50,13 @@ await runMutations(
50
50
  Mutation builders also expose per-mutation options such as target path, format,
51
51
  label, force removal, backup behavior, template id, and transform callbacks.
52
52
 
53
+ ## Validation and safety
54
+
55
+ - Config merge mutations require object values; primitive merge payloads are rejected.
56
+ - Transform mutations do not rewrite a file when serialized output is unchanged.
57
+ - Directory creation, backup, and chmod mutations refuse targets that resolve through symlinked parents or symlinked files.
58
+ - Observer start events include the resolved target details that will be used by the mutation.
59
+
53
60
  ## Environment Variables
54
61
 
55
62
  This package does not read or expose environment variables.
@@ -36,3 +36,5 @@ This package reads no environment variables.
36
36
  ## Configuration Options
37
37
 
38
38
  This package has no configuration options.
39
+
40
+ Diagnostics retain source offsets, including CRLF input. Opening fences may have trailing spaces or tabs; a missing closing fence is reported as a diagnostic. Writing frontmatter requires an object root.
@@ -39,3 +39,5 @@ This package exposes no environment variables.
39
39
  ## Configuration
40
40
 
41
41
  This package currently exposes no package-level configuration options.
42
+
43
+ Workspace transfer validates a positive finite upload limit and applies gitignore traversal rules: an ignored parent must be unignored before its children can be included. Docker template hashing honors `.dockerignore`. Docker port mappings, wait output, and detached completion markers are validated before use.
@@ -103,6 +103,11 @@ await plans.list("plans").reorder(["api-shape-providers", "memory"]);
103
103
 
104
104
  `frontmatterMode: "strict"` expects full task frontmatter (`kind`, `version`, `name`, `state`, and related task fields). `frontmatterMode: "passthrough"` keeps unrelated frontmatter keys as task metadata and writes back only the task-owned fields (`name`, `description`, `state`), so existing plan metadata is preserved.
105
105
 
106
+ List names, task ids, and task names are validated before writes. The
107
+ `markdown-dir` backend accepts the normal macOS `/tmp` system alias, preserves
108
+ numeric filename prefixes for passthrough documents, and removes invalid stale
109
+ lock files before acquiring a new lock.
110
+
106
111
  ### `yaml-file`
107
112
 
108
113
  ```ts
@@ -125,6 +130,9 @@ await planning.fire("review-release", "plan");
125
130
  await planning.fire("review-release", "start");
126
131
  ```
127
132
 
133
+ Archived tasks cannot be used as move anchors. Alphabetical listing with
134
+ `includeArchived` sorts active and archived tasks together.
135
+
128
136
  ### `gh-issues`
129
137
 
130
138
  ```ts
@@ -155,6 +163,9 @@ await project.move(created.id, { after: "42" });
155
163
 
156
164
  `gh-issues` exposes one list named `${project.owner}/${project.number}`. `create()` ignores `TaskCreate.id` because GitHub assigns issue numbers. `fire(state)` writes the Project v2 `Status` field to the matching single-select option. `move()` reorders project items.
157
165
 
166
+ Issue ids must be canonical decimal issue numbers. Required state names are
167
+ checked for blank entries before project lookup or mutation.
168
+
158
169
  If the GitHub Project v2 board has not been set up manually, run `poe-code tasks sync <list>` before opening the backend. `openTaskList({ type: "gh-issues" })` no longer requires manual board setup when the board was provisioned with `tasks sync` first.
159
170
 
160
171
  ## Verifying and provisioning the GitHub Project v2 board
@@ -22,8 +22,7 @@ has been battle-tested and is actively used in production systems.
22
22
  smol-toml passes most of the tests from the [`toml-test` suite](https://github.com/toml-lang/toml-test); use the
23
23
  `run-toml-test.bash` script to run the tests. Due to the nature of JavaScript and the limits of the language,
24
24
  it doesn't pass certain tests, namely:
25
- - Invalid UTF-8 strings are not rejected
26
- - Certain invalid UTF-8 codepoints are not rejected
25
+ - Invalid UTF-8 strings (and comments) are not rejected
27
26
  - Certain invalid dates are not rejected
28
27
  - For instance, `2023-02-30` would be accepted and parsed as `2023-03-02`. While additional checks could be performed
29
28
  to reject these, they've not been added for performance reasons.
@@ -73,7 +72,8 @@ A few notes on the `stringify` function:
73
72
  When parsing, both integers and floats are read as plain JavaScript numbers, which essentially are floats. This means
74
73
  loss of type information, and makes it impossible to safely represent integers beyond 53 bits.
75
74
 
76
- When serializing, numbers without a decimal part are serialized as integers. This allows in most cases to preserve
75
+ When serializing, numbers without a decimal part are serialized as integers (except if they're outside of the safe
76
+ range; i.e. they cannot be represented as a signed 53-bit integer). This allows in most cases to preserve
77
77
  whether a number is an integer or not, but fails to preserve type information for numbers like `1.0`.
78
78
 
79
79
  #### Enabling BigInt support and type preservation
@@ -143,97 +143,262 @@ const localTime = TomlDate.wrapAsLocalTime(jsDate)
143
143
  ```
144
144
 
145
145
  ## Performance
146
- > [!NOTE]
147
- > These benchmarks are starting to get quite old and were ran prior to the release of TOML 1.1.0 which changed subtle
148
- > implementation details.
149
- >
150
- > They will be updated in the (hopefully near) future to better reflect numbers of the latest version of smol-toml
151
- > on the latest version of Node.js.
146
+ The benchmark is ran using [mitata](https://github.com/evanwashere/mitata).
152
147
 
153
- A note on these performance numbers: in some highly synthetic tests, other parsers such as `fast-toml` greatly
154
- outperform other parsers, mostly due to their lack of compliance with the spec. For example, to parse a string,
155
- `fast-toml` skips the entire string while `smol-toml` does validate the string, costing a fair share of performance.
148
+ Parsers and serializers are tested in 2 scenarios: using the example from TOML's homepage and specification, and
149
+ using a ~5MB randomly generated[^generator] file.
156
150
 
157
- The ~5MB test file used for benchmark here is filled with random data which attempts to be close-ish to reality in
158
- terms of structure. The idea is to have a file relatively close to a real-world application, with moderately sized
159
- strings etc.
151
+ [^generator]: The TOML generator used can be found [here](https://gist.github.com/cyyynthia/e77c744cb6494dabe37d0182506526b9)
160
152
 
161
- The large TOML generator can be found [here](https://gist.github.com/cyyynthia/e77c744cb6494dabe37d0182506526b9)
153
+ While `fast-toml` is included as it's a challenging candidate, it takes a lot of shortcuts that makes it very fast,
154
+ but at the expense of correctness (it has significant defects and does not pass the TOML test suite). `smol-toml` is
155
+ almost as fast, without sacrificing correctness. 😎
162
156
 
163
- | **Parse** | smol-toml | @iarna/toml@3.0.0 | @ltd/j-toml | fast-toml |
164
- |----------------|---------------------|-------------------|-----------------|-----------------|
165
- | Spec example | **71,356.51 op/s** | 33,629.31 op/s | 16,433.86 op/s | 29,421.60 op/s |
166
- | ~5MB test file | **3.8091 op/s** | *DNF* | 2.4369 op/s | 2.6078 op/s |
157
+ | **Parse** | smol-toml@1.7.0 | @iarna/toml@3.0.0 | @ltd/j-toml@1.38.0 | fast-toml@0.5.4 | @std/toml@1.0.11 | toml@4.1.1 | js-toml@1.1.2 | @decimalturn/toml-patch@2.0.0 |
158
+ |----------------|--------------------|-------------------|--------------------|-----------------|------------------|----------------|----------------|-------------------------------|
159
+ | Spec example | **4.90 µs/iter** | 12.36 µs/iter | 33.17 µs/iter | *4.80 µs/iter* | 22.94 µs/iter | 29.86 µs/iter | 23.67 µs/iter | 17.81 µs/iter |
160
+ | ~5MB test file | **116.74 ms/iter** | *DNF* | 198.57 ms/iter | *93.51 ms/iter* | 429.91 ms/iter | 415.92 ms/iter | 361.89 ms/iter | 176.94 ms/iter |
167
161
 
168
- | **Stringify** | smol-toml | @iarna/toml@3.0.0 | @ltd/j-toml |
169
- |----------------|----------------------|-------------------|----------------|
170
- | Spec example | **195,191.99 op/s** | 46,583.07 op/s | 5,670.12 op/s |
171
- | ~5MB test file | **14.6709 op/s** | 3.5941 op/s | 0.7856 op/s |
162
+ | **Stringify** | smol-toml@1.7.0 | @iarna/toml@3.0.0 | @ltd/j-toml@1.38.0 | fast-toml@0.5.4 | @std/toml@1.0.11 | toml@4.1.1 | js-toml@1.1.2 | @decimalturn/toml-patch@2.0.0 |
163
+ |----------------|--------------------|-------------------|--------------------|-----------------|------------------|----------------|----------------|-------------------------------|
164
+ | Spec example | **2.24 µs/iter** | 8.68 µs/iter | 89.89 µs/iter | N/A | 3.86 µs/iter | N/A | 3.53 µs/iter | N/A[^toml-patch-note] |
165
+ | ~5MB test file | **42.34 ms/iter** | 132.74 ms/iter | 921.98 ms/iter | N/A | 68.37 ms/iter | N/A | 106.14 ms/iter | N/A[^toml-patch-note] |
166
+
167
+ [^toml-patch-note]: Stringify performance is not included here, as the library is not meant to be fast, but rather
168
+ capable of doing precise non-destructive edits that preserve the entire document's shape and format. Putting it here
169
+ wouldn't be fair.
172
170
 
173
171
  <details>
174
172
  <summary>Detailed benchmark data</summary>
175
173
 
176
- Tests ran using Vitest v0.31.0 on commit f58cb6152e667e9cea09f31c93d90652e3b82bf5
177
-
178
- CPU: Intel Core i7 7700K (4.2GHz)
179
-
180
174
  ```
181
- RUN v0.31.0
182
-
183
- ✓ bench/parseSpecExample.bench.ts (4) 2462ms
184
- name hz min max mean p75 p99 p995 p999 rme samples
185
- · smol-toml 71,356.51 0.0132 0.2633 0.0140 0.0137 0.0219 0.0266 0.1135 ±0.37% 35679 fastest
186
- · @iarna/toml 33,629.31 0.0272 0.2629 0.0297 0.0287 0.0571 0.0650 0.1593 ±0.45% 16815
187
- · @ltd/j-toml 16,433.86 0.0523 1.3088 0.0608 0.0550 0.1140 0.1525 0.7348 ±1.47% 8217 slowest
188
- · fast-toml 29,421.60 0.0305 0.2995 0.0340 0.0312 0.0618 0.0640 0.1553 ±0.47% 14711
189
- ✓ bench/parseLargeMixed.bench.ts (3) 16062ms
190
- name hz min max mean p75 p99 p995 p999 rme samples
191
- · smol-toml 3.8091 239.60 287.30 262.53 274.17 287.30 287.30 287.30 ±3.66% 10 fastest
192
- · @ltd/j-toml 2.4369 376.73 493.49 410.35 442.58 493.49 493.49 493.49 ±7.08% 10 slowest
193
- · fast-toml 2.6078 373.88 412.79 383.47 388.62 412.79 412.79 412.79 ±2.72% 10
194
- ✓ bench/stringifySpecExample.bench.ts (3) 1886ms
195
- name hz min max mean p75 p99 p995 p999 rme samples
196
- · smol-toml 195,191.99 0.0047 0.2704 0.0051 0.0050 0.0099 0.0110 0.0152 ±0.41% 97596 fastest
197
- · @iarna/toml 46,583.07 0.0197 0.2808 0.0215 0.0208 0.0448 0.0470 0.1704 ±0.47% 23292
198
- · @ltd/j-toml 5,670.12 0.1613 0.5768 0.1764 0.1726 0.3036 0.3129 0.4324 ±0.56% 2836 slowest
199
- ✓ bench/stringifyLargeMixed.bench.ts (3) 24057ms
200
- name hz min max mean p75 p99 p995 p999 rme samples
201
- · smol-toml 14.6709 65.1071 79.2199 68.1623 67.1088 79.2199 79.2199 79.2199 ±5.25% 10 fastest
202
- · @iarna/toml 3.5941 266.48 295.24 278.24 290.10 295.24 295.24 295.24 ±2.83% 10
203
- · @ltd/j-toml 0.7856 1,254.33 1,322.05 1,272.87 1,286.82 1,322.05 1,322.05 1,322.05 ±1.37% 10 slowest
204
-
205
-
206
- BENCH Summary
207
-
208
- smol-toml - bench/parseLargeMixed.bench.ts >
209
- 1.46x faster than fast-toml
210
- 1.56x faster than @ltd/j-toml
211
-
212
- smol-toml - bench/parseSpecExample.bench.ts >
213
- 2.12x faster than @iarna/toml
214
- 2.43x faster than fast-toml
215
- 4.34x faster than @ltd/j-toml
216
-
217
- smol-toml - bench/stringifyLargeMixed.bench.ts >
218
- 4.00x faster than @iarna/toml
219
- 18.33x faster than @ltd/j-toml
220
-
221
- smol-toml - bench/stringifySpecExample.bench.ts >
222
- 4.19x faster than @iarna/toml
223
- 34.42x faster than @ltd/j-toml
175
+ node --expose-gc bench/parse.bench.ts
176
+ clk: ~5.47 GHz
177
+ cpu: AMD Ryzen 9 9950X3D 16-Core Processor
178
+ runtime: node 26.3.1 (x64-linux)
179
+
180
+ benchmark avg (min … max) p75 / p99 (min … top 1%)
181
+ ------------------------------------------- -------------------------------
182
+ • spec document
183
+ ------------------------------------------- -------------------------------
184
+ smol-toml 4.90 µs/iter 4.85 µs █
185
+ (4.72 µs … 96.03 µs) 6.13 µs █▅
186
+ ( 2.09 kb … 325.14 kb) 12.96 kb ▁██▄▃▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
187
+ 4.01 ipc ( 99.63% cache) 21.59 branch misses
188
+ 27.50k cycles 110.19k instructions 4.09k c-refs 15.27 c-misses
189
+
190
+ @iarna/toml 12.36 µs/iter 12.19 µs █
191
+ (11.86 µs … 131.24 µs) 16.53 µs █
192
+ (176.00 b … 360.27 kb) 24.00 kb ▅█▅▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
193
+ 3.97 ipc ( 99.71% cache) 60.52 branch misses
194
+ 68.38k cycles 271.17k instructions 12.01k c-refs 35.06 c-misses
195
+
196
+ @ltd/j-toml 33.17 µs/iter 32.50 µs ▇█
197
+ (31.03 µs … 1.10 ms) 36.36 µs ███▆
198
+ ( 40.00 b … 537.94 kb) 27.61 kb ▁▃▇████▆▂▁▁▂▂▁▁▁▁▁▁▁▁
199
+ 3.15 ipc ( 99.50% cache) 305.47 branch misses
200
+ 183.96k cycles 579.46k instructions 32.33k c-refs 160.93 c-misses
201
+
202
+ fast-toml 4.80 µs/iter 4.77 µs █
203
+ (4.61 µs … 96.44 µs) 5.58 µs █▃
204
+ (256.00 b … 329.85 kb) 12.55 kb ▁▆██▅▄▃▂▂▁▁▁▁▁▁▁▁▁▁▁▁
205
+ 4.61 ipc ( 99.61% cache) 18.02 branch misses
206
+ 26.90k cycles 123.90k instructions 3.73k c-refs 14.45 c-misses
207
+
208
+ deno's @std/toml 22.94 µs/iter 22.84 µs █
209
+ (21.43 µs … 183.90 µs) 27.22 µs ██
210
+ (800.00 b … 619.62 kb) 64.88 kb ▁▄▄▆██▅▂▁▁▁▁▁▁▁▁▁▁▁▁▁
211
+ 3.73 ipc ( 99.67% cache) 106.77 branch misses
212
+ 126.43k cycles 472.03k instructions 23.79k c-refs 79.52 c-misses
213
+
214
+ node-toml 29.86 µs/iter 29.51 µs █
215
+ (28.17 µs … 200.95 µs) 42.50 µs █▇
216
+ (976.00 b … 785.96 kb) 104.23 kb ▄██▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
217
+ 4.01 ipc ( 99.36% cache) 146.79 branch misses
218
+ 163.80k cycles 657.50k instructions 27.26k c-refs 174.37 c-misses
219
+
220
+ js-toml 23.67 µs/iter 23.31 µs █▃
221
+ (22.10 µs … 196.26 µs) 34.04 µs ██
222
+ ( 2.55 kb … 678.23 kb) 96.06 kb ▃██▄▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁
223
+ 4.14 ipc ( 98.56% cache) 141.38 branch misses
224
+ 129.53k cycles 536.67k instructions 18.52k c-refs 266.18 c-misses
225
+
226
+ @decimalturn/toml-patch 17.81 µs/iter 17.68 µs █▇
227
+ (16.82 µs … 159.63 µs) 23.01 µs ██▅
228
+ (264.00 b … 651.59 kb) 56.03 kb ▃███▄▂▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁
229
+ 3.60 ipc ( 99.55% cache) 73.51 branch misses
230
+ 98.49k cycles 354.88k instructions 20.21k c-refs 90.93 c-misses
231
+
232
+ summary
233
+ fast-toml
234
+ 1.02x faster than smol-toml
235
+ 2.57x faster than @iarna/toml
236
+ 3.71x faster than @decimalturn/toml-patch
237
+ 4.77x faster than deno's @std/toml
238
+ 4.93x faster than js-toml
239
+ 6.22x faster than node-toml
240
+ 6.9x faster than @ltd/j-toml (nice)
241
+
242
+ • 5MB document
243
+ ------------------------------------------- -------------------------------
244
+ smol-toml 116.74 ms/iter 118.39 ms █ █
245
+ (110.52 ms … 127.54 ms) 123.91 ms █ ▅ ▅ █ ▅ ▅▅ ▅ ▅
246
+ ( 32.98 mb … 49.20 mb) 42.93 mb █▁█▁█▁▁█▁█▁██▁▁█▁▁▁▁█
247
+ 2.48 ipc ( 98.45% cache) 3.17M branch misses
248
+ 629.10M cycles 1.56G instructions 101.49M c-refs 1.58M c-misses
249
+
250
+ @iarna/toml error: Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z at row 5, col 45, pos 569:
251
+ 4: NfF6LuAerfn5mDPI7Cp 2qsrB4vGmJTyb5jNubOIBYYWrWlAsrw PX93S57gjb5GEhR8qOU5blDQmwfVJTA YvmJ9cE3cUZU NAJQgAbIdpZLhc4lOs4ZhMEWehhZqXCsVD1YP1vN2GEoM2WX''', 1986-05-27T18:36:13Z, -5460, "2ZAV3fYlb23hf7r7QoftVlicWE2iuwp", 4790.2253 ]
252
+ 5> SzeC4Me8T = [ 5928.9340, 1991-04-28 19:24:24, 7807, -782.4516, 0b1000011111, "YvXRZKBGle9d51sqE90t8hP" ]
253
+ ^
254
+ 6: SLMvBirT.pmpX1D.9PivpfFBo = 2010-09-29
255
+
256
+
257
+
258
+ @ltd/j-toml 198.57 ms/iter 196.77 ms █
259
+ (181.11 ms … 291.66 ms) 209.47 ms ██
260
+ ( 8.55 mb … 55.95 mb) 35.95 mb ████▁▁▁▁▁█▁█▁▁▁█▁▁▁▁█
261
+ 2.32 ipc ( 97.82% cache) 3.98M branch misses
262
+ 1.08G cycles 2.50G instructions 166.94M c-refs 3.63M c-misses
263
+
264
+ fast-toml 93.51 ms/iter 95.06 ms █
265
+ (89.98 ms … 96.83 ms) 95.74 ms ▅ ▅ ▅ █▅ ▅▅ ▅▅▅
266
+ ( 13.30 mb … 34.88 mb) 24.04 mb █▁▁▁█▁█▁██▁▁▁▁▁██▁███
267
+ 2.83 ipc ( 98.14% cache) 2.36M branch misses
268
+ 507.32M cycles 1.44G instructions 66.44M c-refs 1.23M c-misses
269
+
270
+ deno's @std/toml 429.91 ms/iter 436.58 ms █
271
+ (419.32 ms … 441.05 ms) 437.63 ms ▅ ▅▅▅ ▅ ▅ ▅ ▅ ▅█
272
+ (180.32 mb … 204.05 mb) 191.51 mb █▁███▁▁█▁█▁▁▁▁▁█▁█▁██
273
+ 3.15 ipc ( 97.05% cache) 6.63M branch misses
274
+ 2.36G cycles 7.45G instructions 255.14M c-refs 7.54M c-misses
275
+
276
+ node-toml 415.92 ms/iter 413.57 ms ██
277
+ (404.84 ms … 448.96 ms) 438.33 ms ██ █
278
+ ( 45.80 mb … 78.18 mb) 50.13 mb ████▁█▁▁▁▁▁▁▁▁▁▁▁▁▁▁█
279
+ 4.26 ipc ( 97.29% cache) 6.53M branch misses
280
+ 2.25G cycles 9.59G instructions 194.56M c-refs 5.27M c-misses
281
+
282
+ js-toml 361.89 ms/iter 369.39 ms █
283
+ (346.05 ms … 406.77 ms) 394.74 ms ▅█ ▅
284
+ (249.62 mb … 282.33 mb) 265.65 mb ██▁█▁▁▁▁▁▁▇▁▁▁▇▁▁▁▁▁▇
285
+ 2.55 ipc ( 94.91% cache) 5.64M branch misses
286
+ 1.73G cycles 4.43G instructions 112.66M c-refs 5.74M c-misses
287
+
288
+ @decimalturn/toml-patch 176.94 ms/iter 174.86 ms █
289
+ (172.74 ms … 197.94 ms) 182.08 ms █ ██
290
+ ( 27.14 mb … 38.55 mb) 28.81 mb █▁████▁▁▁▁▁█▁▁▁▁▁▁▁▁█
291
+ 3.18 ipc ( 97.69% cache) 3.58M branch misses
292
+ 947.48M cycles 3.02G instructions 130.37M c-refs 3.01M c-misses
293
+
294
+ summary
295
+ fast-toml
296
+ 1.25x faster than smol-toml
297
+ 1.89x faster than @decimalturn/toml-patch
298
+ 2.12x faster than @ltd/j-toml
299
+ 3.87x faster than js-toml
300
+ 4.45x faster than node-toml
301
+ 4.6x faster than deno's @std/toml
302
+
303
+
304
+ node --expose-gc bench/stringify.bench.ts
305
+ clk: ~5.48 GHz
306
+ cpu: AMD Ryzen 9 9950X3D 16-Core Processor
307
+ runtime: node 26.3.1 (x64-linux)
308
+
309
+ benchmark avg (min … max) p75 / p99 (min … top 1%)
310
+ ------------------------------------------- -------------------------------
311
+ • spec document
312
+ ------------------------------------------- -------------------------------
313
+ smol-toml 2.24 µs/iter 2.24 µs ▄ █
314
+ (2.22 µs … 2.27 µs) 2.27 µs █▃ ▅▆ █▃
315
+ ( 4.60 kb … 4.71 kb) 4.61 kb ▅███▃██████▃▇▃▃▅▃▁▁▃▅
316
+ 4.62 ipc ( 99.64% cache) 5.08 branch misses
317
+ 12.21k cycles 56.44k instructions 1.12k c-refs 4.08 c-misses
318
+
319
+ @iarna/toml 8.68 µs/iter 8.67 µs █
320
+ (8.65 µs … 8.89 µs) 8.73 µs ▅█▅ ▅
321
+ (654.88 b … 1.53 kb) 720.60 b ▇███▇▁█▁▁▁▁▁▇▇▁▁▁▁▁▁▇
322
+ 4.00 ipc ( 99.49% cache) 23.53 branch misses
323
+ 47.95k cycles 191.80k instructions 7.11k c-refs 36.09 c-misses
324
+
325
+ @ltd/j-toml 89.89 µs/iter 90.21 µs █
326
+ (69.82 µs … 209.14 µs) 95.93 µs █
327
+ ( 4.04 kb … 389.75 kb) 37.49 kb ▁▁▁▁▁▁▁▂▁▁▁▁▁▁▁█▄▄▃▂▂
328
+ 4.20 ipc ( 99.76% cache) 544.09 branch misses
329
+ 490.58k cycles 2.06M instructions 35.22k c-refs 82.84 c-misses
330
+
331
+ deno's @std/toml 3.86 µs/iter 3.86 µs █
332
+ (3.83 µs … 4.24 µs) 3.88 µs ▅ ▅ █▅▅██▅
333
+ (836.05 b … 4.28 kb) 0.98 kb █▁██▅█▅████████▁▁▁▁▁▅
334
+ 4.00 ipc ( 99.60% cache) 6.22 branch misses
335
+ 21.36k cycles 85.36k instructions 3.32k c-refs 13.27 c-misses
336
+
337
+ js-toml 3.53 µs/iter 3.54 µs █▂▄
338
+ (3.52 µs … 3.58 µs) 3.58 µs ▆███
339
+ ( 5.76 kb … 7.29 kb) 6.98 kb ▃▇████▃▅▁▃▁▃▁▁▁▁▁▁▁▁▃
340
+ 4.37 ipc ( 99.11% cache) 10.24 branch misses
341
+ 19.45k cycles 84.99k instructions 2.10k c-refs 18.67 c-misses
342
+
343
+ @decimalturn/toml-patch 81.54 µs/iter 81.22 µs █
344
+ (78.63 µs … 341.24 µs) 103.14 µs █▂
345
+ (872.00 b … 831.95 kb) 113.00 kb ▃██▅▃▂▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁
346
+ 4.56 ipc ( 99.28% cache) 567.51 branch misses
347
+ 443.97k cycles 2.02M instructions 52.63k c-refs 381.28 c-misses
348
+
349
+ summary
350
+ smol-toml
351
+ 1.58x faster than js-toml
352
+ 1.73x faster than deno's @std/toml
353
+ 3.88x faster than @iarna/toml
354
+ 36.44x faster than @decimalturn/toml-patch
355
+ 40.18x faster than @ltd/j-toml
356
+
357
+ • 5MB document
358
+ ------------------------------------------- -------------------------------
359
+ smol-toml 42.34 ms/iter 43.06 ms █ █
360
+ (40.50 ms … 45.33 ms) 43.51 ms █ ▅▅▅▅ ▅ ▅▅▅ █
361
+ ( 9.46 mb … 35.74 mb) 12.91 mb █▁▁▁▁████▁▁▁█▁▁███▁▁█
362
+ 2.12 ipc ( 95.19% cache) 1.59M branch misses
363
+ 217.80M cycles 462.56M instructions 14.99M c-refs 720.67k c-misses
364
+
365
+ @iarna/toml 132.74 ms/iter 134.02 ms █
366
+ (125.91 ms … 138.18 ms) 137.02 ms █ █
367
+ ( 27.35 mb … 54.08 mb) 41.53 mb █▁▁█▁▁▁▁█▁▁█▁███▁▁▁▁█
368
+ 2.56 ipc ( 97.08% cache) 4.44M branch misses
369
+ 704.85M cycles 1.80G instructions 85.83M c-refs 2.50M c-misses
370
+
371
+ @ltd/j-toml 921.98 ms/iter 927.58 ms █ ██ █
372
+ (889.05 ms … 937.02 ms) 929.09 ms ▅ █ ▅██▅█
373
+ ( 4.20 mb … 33.46 mb) 18.59 mb █▁▁▁▁▁▁▁▁▁▁▁▁▁█▁█████
374
+ 4.06 ipc ( 99.42% cache) 6.75M branch misses
375
+ 5.04G cycles 20.45G instructions 243.67M c-refs 1.41M c-misses
376
+
377
+ deno's @std/toml 68.37 ms/iter 69.68 ms █ █
378
+ (61.79 ms … 78.19 ms) 77.23 ms ▅ ▅█▅ ▅ ▅█ ▅ ▅
379
+ ( 29.04 mb … 62.29 mb) 33.86 mb █▁███▁▁█▁██▁█▁▁▁▁▁▁▁█
380
+ 2.21 ipc ( 95.21% cache) 1.74M branch misses
381
+ 332.33M cycles 732.79M instructions 30.06M c-refs 1.44M c-misses
382
+
383
+ js-toml 106.14 ms/iter 107.44 ms █
384
+ (102.35 ms … 117.91 ms) 108.69 ms ▅█ ▅▅ ▅ ▅▅ ▅ ▅▅
385
+ ( 34.03 mb … 62.21 mb) 44.13 mb ██▁▁██▁▁█▁██▁▁▁▁█▁▁██
386
+ 2.39 ipc ( 96.23% cache) 3.05M branch misses
387
+ 570.22M cycles 1.36G instructions 50.24M c-refs 1.90M c-misses
388
+
389
+ @decimalturn/toml-patch 1.07 s/iter 1.08 s █ █ █
390
+ (1.05 s … 1.14 s) 1.09 s █▅ ▅▅ █ █ ▅ ▅
391
+ (116.61 mb … 147.62 mb) 121.20 mb ██▁██▁▁▁█▁▁▁▁▁█▁▁█▁▁█
392
+ 3.67 ipc ( 93.69% cache) 12.18M branch misses
393
+ 5.77G cycles 21.17G instructions 780.26M c-refs 49.26M c-misses
394
+
395
+ summary
396
+ smol-toml
397
+ 1.61x faster than deno's @std/toml
398
+ 2.51x faster than js-toml
399
+ 3.13x faster than @iarna/toml
400
+ 21.77x faster than @ltd/j-toml
401
+ 25.29x faster than @decimalturn/toml-patch
224
402
  ```
225
403
 
226
- ---
227
- Additional notes:
228
-
229
- I initially tried to benchmark `toml-nodejs`, but the 0.3.0 package is broken.
230
- I initially reported this to the library author, but the author decided to
231
- - a) advise to use a custom loader (via *experimental* flag) to circumvent the invalid imports.
232
- - Said flag, `--experimental-specifier-resolution`, has been removed in Node v20.
233
- - b) [delete the issue](https://github.com/huan231/toml-nodejs/issues/12) when pointed out links to the Node.js
234
- documentation about the flag removal and standard resolution algorithm.
235
-
236
- For the reference anyway, `toml-nodejs` (with proper imports) is ~8x slower on both parse benchmark with:
237
- - spec example: 7,543.47 op/s
238
- - 5mb mixed: 0.7006 op/s
239
404
  </details>
@@ -39,3 +39,4 @@ export declare class TomlDate extends Date {
39
39
  static wrapAsLocalDate(jsDate: Date): TomlDate;
40
40
  static wrapAsLocalTime(jsDate: Date): TomlDate;
41
41
  }
42
+ //# sourceMappingURL=date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../src/date.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AASH,qBAAa,QAAS,SAAQ,IAAI;;IAKjC,YAAY,IAAI,EAAE,MAAM,GAAG,IAAI,EAmC9B;IAED,UAAU,YAET;IAED,OAAO,YAEN;IAED,MAAM,YAEL;IAED,MAAM,YAEL;IAED,OAAO,YAEN;IAEQ,WAAW,WA2BnB;IAED,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,SAAM,YAIrD;IAED,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,IAAI,YAItC;IAED,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,YAKlC;IAED,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,YAKlC;CACD"}
@@ -125,3 +125,4 @@ export class TomlDate extends Date {
125
125
  return date;
126
126
  }
127
127
  }
128
+ //# sourceMappingURL=date.js.map
@@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C/B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAA;QACrB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;QACnB,OAAO,IAAI,CAAA;IACZ,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,MAAY;QAClC,IAAI,IAAI,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAA;QAC/B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAA;QACrB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;QACnB,OAAO,IAAI,CAAA;IACZ,CAAC;CACD"}
@@ -36,3 +36,4 @@ export declare class TomlError extends Error {
36
36
  constructor(message: string, options: TomlErrorOptions);
37
37
  }
38
38
  export {};
39
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,KAAK,gBAAgB,GAAG,YAAY,GAAG;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACX,CAAA;AA+BD,qBAAa,SAAU,SAAQ,KAAK;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IAEjB,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAQrD;CACD"}
@@ -61,3 +61,4 @@ export class TomlError extends Error {
61
61
  this.codeblock = codeblock;
62
62
  }
63
63
  }
64
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAOH,SAAS,iBAAiB,CAAC,MAAc,EAAE,GAAW;IACrD,IAAI,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC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