@openclaw/clickclack 2026.9.5 → 2026.9.6
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/.setup/{channel-yIQ_PUDD.mjs → channel-CT4CVd4d.mjs} +165 -91
- package/dist/.setup/{runtime-api-D9Bwyc44.mjs → runtime-api-A9r1b12d.mjs} +225 -161
- package/dist/api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/index.js +1 -1
- package/dist/runtime-api.js +2 -2
- package/node_modules/zod/README.md +2 -2
- package/node_modules/zod/compile.cjs +19 -0
- package/node_modules/zod/index.cjs +19 -0
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +8 -7
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v4/classic/external.ts +2 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
- package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
- package/node_modules/zod/src/v4/core/api.ts +44 -28
- package/node_modules/zod/src/v4/core/checks.ts +62 -102
- package/node_modules/zod/src/v4/core/compile.ts +218 -93
- package/node_modules/zod/src/v4/core/core.ts +1 -3
- package/node_modules/zod/src/v4/core/doc.ts +6 -2
- package/node_modules/zod/src/v4/core/errors.ts +3 -6
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
- package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
- package/node_modules/zod/src/v4/core/parse.ts +37 -16
- package/node_modules/zod/src/v4/core/regexes.ts +14 -4
- package/node_modules/zod/src/v4/core/schemas.ts +296 -132
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
- package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
- package/node_modules/zod/src/v4/core/util.ts +218 -147
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/ar.ts +2 -0
- package/node_modules/zod/src/v4/locales/az.ts +2 -0
- package/node_modules/zod/src/v4/locales/be.ts +2 -0
- package/node_modules/zod/src/v4/locales/bg.ts +2 -0
- package/node_modules/zod/src/v4/locales/bn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ca.ts +2 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
- package/node_modules/zod/src/v4/locales/cs.ts +2 -0
- package/node_modules/zod/src/v4/locales/da.ts +2 -0
- package/node_modules/zod/src/v4/locales/de.ts +2 -0
- package/node_modules/zod/src/v4/locales/el.ts +2 -0
- package/node_modules/zod/src/v4/locales/en.ts +2 -0
- package/node_modules/zod/src/v4/locales/eo.ts +2 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +2 -0
- package/node_modules/zod/src/v4/locales/fi.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr.ts +2 -0
- package/node_modules/zod/src/v4/locales/gu.ts +2 -0
- package/node_modules/zod/src/v4/locales/he.ts +2 -0
- package/node_modules/zod/src/v4/locales/hi.ts +2 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +2 -0
- package/node_modules/zod/src/v4/locales/hy.ts +2 -0
- package/node_modules/zod/src/v4/locales/id.ts +2 -0
- package/node_modules/zod/src/v4/locales/index.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +2 -0
- package/node_modules/zod/src/v4/locales/it.ts +2 -0
- package/node_modules/zod/src/v4/locales/ja.ts +2 -0
- package/node_modules/zod/src/v4/locales/ka.ts +2 -0
- package/node_modules/zod/src/v4/locales/km.ts +2 -0
- package/node_modules/zod/src/v4/locales/kn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ko.ts +2 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ms.ts +2 -0
- package/node_modules/zod/src/v4/locales/ne.ts +2 -0
- package/node_modules/zod/src/v4/locales/nl.ts +2 -0
- package/node_modules/zod/src/v4/locales/nn.ts +2 -0
- package/node_modules/zod/src/v4/locales/no.ts +2 -0
- package/node_modules/zod/src/v4/locales/ota.ts +2 -0
- package/node_modules/zod/src/v4/locales/pl.ts +2 -0
- package/node_modules/zod/src/v4/locales/ps.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt.ts +2 -0
- package/node_modules/zod/src/v4/locales/ro.ts +2 -0
- package/node_modules/zod/src/v4/locales/ru.ts +2 -0
- package/node_modules/zod/src/v4/locales/sk.ts +2 -0
- package/node_modules/zod/src/v4/locales/sl.ts +2 -0
- package/node_modules/zod/src/v4/locales/sv.ts +2 -0
- package/node_modules/zod/src/v4/locales/ta.ts +2 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +2 -0
- package/node_modules/zod/src/v4/locales/tk.ts +2 -0
- package/node_modules/zod/src/v4/locales/tr.ts +2 -0
- package/node_modules/zod/src/v4/locales/uk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ur.ts +2 -0
- package/node_modules/zod/src/v4/locales/uz.ts +2 -0
- package/node_modules/zod/src/v4/locales/vi.ts +2 -0
- package/node_modules/zod/src/v4/locales/yo.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
- package/node_modules/zod/src/v4/mini/external.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
- package/node_modules/zod/v3/ZodError.cjs +19 -0
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +19 -0
- package/node_modules/zod/v4/classic/checks.cjs +19 -0
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/classic/errors.cjs +19 -0
- package/node_modules/zod/v4/classic/external.cjs +22 -1
- package/node_modules/zod/v4/classic/external.d.cts +1 -1
- package/node_modules/zod/v4/classic/external.d.ts +1 -1
- package/node_modules/zod/v4/classic/external.js +1 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
- package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
- package/node_modules/zod/v4/classic/in-out.cjs +19 -0
- package/node_modules/zod/v4/classic/index.cjs +19 -0
- package/node_modules/zod/v4/classic/iso.cjs +19 -0
- package/node_modules/zod/v4/classic/parse.cjs +19 -0
- package/node_modules/zod/v4/classic/schemas.cjs +100 -35
- package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
- package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
- package/node_modules/zod/v4/classic/schemas.js +77 -33
- package/node_modules/zod/v4/core/api.cjs +45 -22
- package/node_modules/zod/v4/core/api.d.cts +12 -6
- package/node_modules/zod/v4/core/api.d.ts +12 -6
- package/node_modules/zod/v4/core/api.js +25 -22
- package/node_modules/zod/v4/core/checks.cjs +51 -97
- package/node_modules/zod/v4/core/checks.d.cts +17 -1
- package/node_modules/zod/v4/core/checks.d.ts +17 -1
- package/node_modules/zod/v4/core/checks.js +31 -96
- package/node_modules/zod/v4/core/compile.cjs +173 -78
- package/node_modules/zod/v4/core/compile.d.cts +18 -4
- package/node_modules/zod/v4/core/compile.d.ts +18 -4
- package/node_modules/zod/v4/core/compile.js +154 -79
- package/node_modules/zod/v4/core/core.cjs +20 -1
- package/node_modules/zod/v4/core/core.js +1 -1
- package/node_modules/zod/v4/core/doc.cjs +26 -2
- package/node_modules/zod/v4/core/doc.js +7 -2
- package/node_modules/zod/v4/core/errors.cjs +21 -5
- package/node_modules/zod/v4/core/errors.js +2 -5
- package/node_modules/zod/v4/core/index.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +111 -23
- package/node_modules/zod/v4/core/memoizer.js +69 -23
- package/node_modules/zod/v4/core/parse.cjs +56 -16
- package/node_modules/zod/v4/core/parse.js +37 -16
- package/node_modules/zod/v4/core/regexes.cjs +31 -6
- package/node_modules/zod/v4/core/regexes.d.cts +3 -0
- package/node_modules/zod/v4/core/regexes.d.ts +3 -0
- package/node_modules/zod/v4/core/regexes.js +10 -4
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/schemas.cjs +302 -114
- package/node_modules/zod/v4/core/schemas.d.cts +28 -8
- package/node_modules/zod/v4/core/schemas.d.ts +28 -8
- package/node_modules/zod/v4/core/schemas.js +279 -113
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
- package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.js +7 -6
- package/node_modules/zod/v4/core/util.cjs +177 -143
- package/node_modules/zod/v4/core/util.d.cts +25 -4
- package/node_modules/zod/v4/core/util.d.ts +25 -4
- package/node_modules/zod/v4/core/util.js +156 -143
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +19 -0
- package/node_modules/zod/v4/index.cjs +19 -0
- package/node_modules/zod/v4/locales/ar.cjs +2 -0
- package/node_modules/zod/v4/locales/ar.js +2 -0
- package/node_modules/zod/v4/locales/az.cjs +2 -0
- package/node_modules/zod/v4/locales/az.js +2 -0
- package/node_modules/zod/v4/locales/be.cjs +2 -0
- package/node_modules/zod/v4/locales/be.js +2 -0
- package/node_modules/zod/v4/locales/bg.cjs +2 -0
- package/node_modules/zod/v4/locales/bg.js +2 -0
- package/node_modules/zod/v4/locales/bn.cjs +2 -0
- package/node_modules/zod/v4/locales/bn.js +2 -0
- package/node_modules/zod/v4/locales/ca.cjs +2 -0
- package/node_modules/zod/v4/locales/ca.js +2 -0
- package/node_modules/zod/v4/locales/ckb.cjs +2 -0
- package/node_modules/zod/v4/locales/ckb.js +2 -0
- package/node_modules/zod/v4/locales/cs.cjs +2 -0
- package/node_modules/zod/v4/locales/cs.js +2 -0
- package/node_modules/zod/v4/locales/da.cjs +2 -0
- package/node_modules/zod/v4/locales/da.js +2 -0
- package/node_modules/zod/v4/locales/de.cjs +2 -0
- package/node_modules/zod/v4/locales/de.js +2 -0
- package/node_modules/zod/v4/locales/el.cjs +2 -0
- package/node_modules/zod/v4/locales/el.js +2 -0
- package/node_modules/zod/v4/locales/en.cjs +2 -0
- package/node_modules/zod/v4/locales/en.js +2 -0
- package/node_modules/zod/v4/locales/eo.cjs +2 -0
- package/node_modules/zod/v4/locales/eo.js +2 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +2 -0
- package/node_modules/zod/v4/locales/fa.js +2 -0
- package/node_modules/zod/v4/locales/fi.cjs +2 -0
- package/node_modules/zod/v4/locales/fi.js +2 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
- package/node_modules/zod/v4/locales/fr-CA.js +2 -0
- package/node_modules/zod/v4/locales/fr.cjs +2 -0
- package/node_modules/zod/v4/locales/fr.js +2 -0
- package/node_modules/zod/v4/locales/gu.cjs +2 -0
- package/node_modules/zod/v4/locales/gu.js +2 -0
- package/node_modules/zod/v4/locales/he.cjs +2 -0
- package/node_modules/zod/v4/locales/he.js +2 -0
- package/node_modules/zod/v4/locales/hi.cjs +2 -0
- package/node_modules/zod/v4/locales/hi.js +2 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +2 -0
- package/node_modules/zod/v4/locales/hu.js +2 -0
- package/node_modules/zod/v4/locales/hy.cjs +2 -0
- package/node_modules/zod/v4/locales/hy.js +2 -0
- package/node_modules/zod/v4/locales/id.cjs +2 -0
- package/node_modules/zod/v4/locales/id.js +2 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -1
- package/node_modules/zod/v4/locales/index.d.cts +1 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +2 -0
- package/node_modules/zod/v4/locales/is.js +2 -0
- package/node_modules/zod/v4/locales/it.cjs +2 -0
- package/node_modules/zod/v4/locales/it.js +2 -0
- package/node_modules/zod/v4/locales/ja.cjs +2 -0
- package/node_modules/zod/v4/locales/ja.js +2 -0
- package/node_modules/zod/v4/locales/ka.cjs +2 -0
- package/node_modules/zod/v4/locales/ka.js +2 -0
- package/node_modules/zod/v4/locales/km.cjs +2 -0
- package/node_modules/zod/v4/locales/km.js +2 -0
- package/node_modules/zod/v4/locales/kn.cjs +2 -0
- package/node_modules/zod/v4/locales/kn.js +2 -0
- package/node_modules/zod/v4/locales/ko.cjs +2 -0
- package/node_modules/zod/v4/locales/ko.js +2 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +2 -0
- package/node_modules/zod/v4/locales/mk.js +2 -0
- package/node_modules/zod/v4/locales/ms.cjs +2 -0
- package/node_modules/zod/v4/locales/ms.js +2 -0
- package/node_modules/zod/v4/locales/ne.cjs +2 -0
- package/node_modules/zod/v4/locales/ne.js +2 -0
- package/node_modules/zod/v4/locales/nl.cjs +2 -0
- package/node_modules/zod/v4/locales/nl.js +2 -0
- package/node_modules/zod/v4/locales/nn.cjs +2 -0
- package/node_modules/zod/v4/locales/nn.js +2 -0
- package/node_modules/zod/v4/locales/no.cjs +2 -0
- package/node_modules/zod/v4/locales/no.js +2 -0
- package/node_modules/zod/v4/locales/ota.cjs +2 -0
- package/node_modules/zod/v4/locales/ota.js +2 -0
- package/node_modules/zod/v4/locales/pl.cjs +2 -0
- package/node_modules/zod/v4/locales/pl.js +2 -0
- package/node_modules/zod/v4/locales/ps.cjs +2 -0
- package/node_modules/zod/v4/locales/ps.js +2 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
- package/node_modules/zod/v4/locales/pt-BR.js +2 -0
- package/node_modules/zod/v4/locales/pt.cjs +2 -0
- package/node_modules/zod/v4/locales/pt.js +2 -0
- package/node_modules/zod/v4/locales/ro.cjs +2 -0
- package/node_modules/zod/v4/locales/ro.js +2 -0
- package/node_modules/zod/v4/locales/ru.cjs +2 -0
- package/node_modules/zod/v4/locales/ru.js +2 -0
- package/node_modules/zod/v4/locales/sk.cjs +2 -0
- package/node_modules/zod/v4/locales/sk.js +2 -0
- package/node_modules/zod/v4/locales/sl.cjs +2 -0
- package/node_modules/zod/v4/locales/sl.js +2 -0
- package/node_modules/zod/v4/locales/sv.cjs +2 -0
- package/node_modules/zod/v4/locales/sv.js +2 -0
- package/node_modules/zod/v4/locales/ta.cjs +2 -0
- package/node_modules/zod/v4/locales/ta.js +2 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +2 -0
- package/node_modules/zod/v4/locales/th.js +2 -0
- package/node_modules/zod/v4/locales/tk.cjs +2 -0
- package/node_modules/zod/v4/locales/tk.js +2 -0
- package/node_modules/zod/v4/locales/tr.cjs +2 -0
- package/node_modules/zod/v4/locales/tr.js +2 -0
- package/node_modules/zod/v4/locales/uk.cjs +2 -0
- package/node_modules/zod/v4/locales/uk.js +2 -0
- package/node_modules/zod/v4/locales/ur.cjs +2 -0
- package/node_modules/zod/v4/locales/ur.js +2 -0
- package/node_modules/zod/v4/locales/uz.cjs +2 -0
- package/node_modules/zod/v4/locales/uz.js +2 -0
- package/node_modules/zod/v4/locales/vi.cjs +2 -0
- package/node_modules/zod/v4/locales/vi.js +2 -0
- package/node_modules/zod/v4/locales/yo.cjs +2 -0
- package/node_modules/zod/v4/locales/yo.js +2 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-CN.js +2 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-TW.js +2 -0
- package/node_modules/zod/v4/mini/checks.cjs +19 -0
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/mini/external.cjs +22 -1
- package/node_modules/zod/v4/mini/external.d.cts +1 -1
- package/node_modules/zod/v4/mini/external.d.ts +1 -1
- package/node_modules/zod/v4/mini/external.js +1 -1
- package/node_modules/zod/v4/mini/in-out.cjs +19 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +19 -0
- package/node_modules/zod/v4/mini/schemas.cjs +44 -8
- package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
- package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
- package/node_modules/zod/v4/mini/schemas.js +21 -6
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/package.json +5 -5
|
@@ -5,13 +5,12 @@ import { parseDateStringTimestampMs } from "openclaw/plugin-sdk/number-runtime";
|
|
|
5
5
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
6
6
|
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { buildChannelOutboundSessionRoute, buildThreadAwareOutboundSessionRoute, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
8
|
-
import { buildChannelProgressDraftLine, createChannelMessageReplyPipeline, createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, deriveDurableFinalDeliveryRequirements } from "openclaw/plugin-sdk/channel-outbound";
|
|
8
|
+
import { buildChannelProgressDraftLine, createChannelMessageReplyPipeline, createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, deriveDurableFinalDeliveryRequirements, formatChannelProgressDraftLineForEntry, isCompleteAgentPreamble } from "openclaw/plugin-sdk/channel-outbound";
|
|
9
9
|
import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
10
10
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
11
11
|
import { channelReadyPatch, channelStoppedPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
12
12
|
import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
13
13
|
import { rawDataToString } from "openclaw/plugin-sdk/webhook-ingress";
|
|
14
|
-
import { resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
15
14
|
import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
|
|
16
15
|
import { createHash, randomUUID } from "node:crypto";
|
|
17
16
|
import { truncateCodePoints } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
@@ -23,84 +22,135 @@ import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
|
|
|
23
22
|
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
|
|
24
23
|
import { FormatCapabilityProfile, renderMarkdownWithMarkers, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
25
24
|
//#region extensions/clickclack/src/discussions/binding-generation.ts
|
|
26
|
-
const
|
|
27
|
-
|
|
25
|
+
const GENERATION_STORE_OPTIONS = {
|
|
26
|
+
namespace: "discussion-binding-generations",
|
|
27
|
+
maxEntries: 1e4,
|
|
28
|
+
overflowPolicy: "reject-new"
|
|
29
|
+
};
|
|
28
30
|
const storesByRuntime$2 = /* @__PURE__ */ new WeakMap();
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
function withGenerationStore(runtime, run) {
|
|
32
|
+
let owner = storesByRuntime$2.get(runtime);
|
|
33
|
+
if (!owner) {
|
|
34
|
+
const store = runtime.state.openKeyedStore(GENERATION_STORE_OPTIONS);
|
|
35
|
+
owner = {
|
|
36
|
+
store,
|
|
37
|
+
...!store.observe || !store.compareAndApply ? { native: runtime.state.openSyncKeyedStore(GENERATION_STORE_OPTIONS) } : {},
|
|
38
|
+
tail: Promise.resolve()
|
|
39
|
+
};
|
|
40
|
+
storesByRuntime$2.set(runtime, owner);
|
|
41
|
+
}
|
|
42
|
+
const currentOwner = owner;
|
|
43
|
+
const current = owner.tail.then(() => run(currentOwner));
|
|
44
|
+
owner.tail = current.then(() => void 0, () => void 0);
|
|
45
|
+
return current;
|
|
46
|
+
}
|
|
47
|
+
function mutateGeneration(runtime, sessionKey, decide) {
|
|
48
|
+
return withGenerationStore(runtime, async ({ store, native }) => {
|
|
49
|
+
if (native) {
|
|
50
|
+
const current = native.lookup(sessionKey);
|
|
51
|
+
const next = decide(current);
|
|
52
|
+
if (next.value !== current) {
|
|
53
|
+
if (next.value) native.register(sessionKey, next.value);
|
|
54
|
+
else native.delete(sessionKey);
|
|
55
|
+
}
|
|
56
|
+
return next.result;
|
|
57
|
+
}
|
|
58
|
+
const { observe, compareAndApply } = store;
|
|
59
|
+
if (!observe || !compareAndApply) throw new Error("ClickClack generation comparison capabilities changed");
|
|
60
|
+
let observed = await observe(sessionKey);
|
|
61
|
+
for (;;) {
|
|
62
|
+
const next = decide(observed.value);
|
|
63
|
+
const outcome = await compareAndApply(sessionKey, observed.comparison, next.value === observed.value ? {
|
|
64
|
+
operation: "update",
|
|
65
|
+
action: "keep"
|
|
66
|
+
} : next.value ? {
|
|
67
|
+
operation: "update",
|
|
68
|
+
action: "set",
|
|
69
|
+
value: next.value
|
|
70
|
+
} : {
|
|
71
|
+
operation: "delete",
|
|
72
|
+
action: "delete"
|
|
73
|
+
});
|
|
74
|
+
if (outcome.status !== "conflict") return next.result;
|
|
75
|
+
observed = outcome.current;
|
|
76
|
+
}
|
|
36
77
|
});
|
|
37
|
-
storesByRuntime$2.set(runtime, created);
|
|
38
|
-
return created;
|
|
39
78
|
}
|
|
40
79
|
/** Reserves a generation so an interrupted channel create can be adopted on retry. */
|
|
41
80
|
function reserveDiscussionBindingGeneration(params) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
81
|
+
let generation;
|
|
82
|
+
return mutateGeneration(params.runtime, params.sessionKey, (existing) => {
|
|
83
|
+
const existingAccountId = existing?.accountId ?? existing?.pending?.accountId;
|
|
84
|
+
const existingCredentialFingerprint = existing?.credentialFingerprint ?? existing?.pending?.credentialFingerprint;
|
|
85
|
+
if (existing?.destinationIdentity === params.destinationIdentity && existingAccountId === params.accountId && existingCredentialFingerprint === params.credentialFingerprint) return {
|
|
86
|
+
value: existing.accountId && existing.credentialFingerprint ? existing : {
|
|
87
|
+
...existing,
|
|
88
|
+
accountId: params.accountId,
|
|
89
|
+
credentialFingerprint: params.credentialFingerprint
|
|
90
|
+
},
|
|
91
|
+
result: existing.generation
|
|
92
|
+
};
|
|
93
|
+
generation ??= (params.createGeneration ?? randomUUID)();
|
|
94
|
+
return {
|
|
95
|
+
value: {
|
|
96
|
+
accountId: params.accountId,
|
|
97
|
+
credentialFingerprint: params.credentialFingerprint,
|
|
98
|
+
destinationIdentity: params.destinationIdentity,
|
|
99
|
+
generation
|
|
100
|
+
},
|
|
101
|
+
result: generation
|
|
102
|
+
};
|
|
60
103
|
});
|
|
61
|
-
return generation;
|
|
62
104
|
}
|
|
63
105
|
/** Clears only the completed reservation; future opens must mint a new ownership ref. */
|
|
64
106
|
function clearDiscussionBindingGeneration(params) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
store.delete(params.sessionKey);
|
|
107
|
+
return mutateGeneration(params.runtime, params.sessionKey, (existing) => ({
|
|
108
|
+
value: existing && params.expectedGeneration && existing.generation !== params.expectedGeneration ? existing : void 0,
|
|
109
|
+
result: void 0
|
|
110
|
+
}));
|
|
70
111
|
}
|
|
71
112
|
/** Quarantines a destination before the first fallible channel create. */
|
|
72
113
|
function recordPendingDiscussionOpen(params) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
114
|
+
return mutateGeneration(params.runtime, params.sessionKey, (existing) => {
|
|
115
|
+
if (!existing || existing.generation !== params.generation) throw new Error("ClickClack discussion generation changed before channel creation");
|
|
116
|
+
if (existing.accountId !== params.pending.accountId || existing.credentialFingerprint !== params.pending.credentialFingerprint) throw new Error("ClickClack discussion ownership changed before channel creation");
|
|
117
|
+
return {
|
|
118
|
+
value: {
|
|
119
|
+
...existing,
|
|
120
|
+
pending: params.pending
|
|
121
|
+
},
|
|
122
|
+
result: void 0
|
|
123
|
+
};
|
|
80
124
|
});
|
|
81
125
|
}
|
|
82
126
|
function listPendingDiscussionOpens(runtime) {
|
|
83
|
-
return
|
|
127
|
+
return withGenerationStore(runtime, async ({ store }) => (await store.entries()).flatMap((entry) => entry.value.pending ? [{
|
|
84
128
|
sessionKey: entry.key,
|
|
85
129
|
generation: entry.value.generation,
|
|
86
130
|
...entry.value.pending
|
|
87
|
-
}] : []);
|
|
131
|
+
}] : []));
|
|
88
132
|
}
|
|
89
133
|
/** Stops destination-wide quarantine after the exact remote channel is known. */
|
|
90
134
|
function clearPendingDiscussionOpen(params) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
135
|
+
return mutateGeneration(params.runtime, params.sessionKey, (existing) => {
|
|
136
|
+
if (!existing || existing.generation !== params.expectedGeneration || !existing.pending) return {
|
|
137
|
+
value: existing,
|
|
138
|
+
result: void 0
|
|
139
|
+
};
|
|
140
|
+
return {
|
|
141
|
+
value: {
|
|
142
|
+
accountId: existing.accountId ?? existing.pending.accountId,
|
|
143
|
+
credentialFingerprint: existing.credentialFingerprint ?? existing.pending.credentialFingerprint,
|
|
144
|
+
destinationIdentity: existing.destinationIdentity,
|
|
145
|
+
generation: existing.generation
|
|
146
|
+
},
|
|
147
|
+
result: void 0
|
|
148
|
+
};
|
|
99
149
|
});
|
|
100
150
|
}
|
|
101
|
-
function hasPendingDiscussionOpenForDestination(params) {
|
|
151
|
+
async function hasPendingDiscussionOpenForDestination(params) {
|
|
102
152
|
const serverBaseUrl = params.serverBaseUrl.replace(/\/+$/u, "");
|
|
103
|
-
return listPendingDiscussionOpens(params.runtime).some((pending) => pending.serverBaseUrl === serverBaseUrl && pending.workspaceId === params.workspaceId);
|
|
153
|
+
return (await listPendingDiscussionOpens(params.runtime)).some((pending) => pending.serverBaseUrl === serverBaseUrl && pending.workspaceId === params.workspaceId);
|
|
104
154
|
}
|
|
105
155
|
//#endregion
|
|
106
156
|
//#region extensions/clickclack/src/discussions/naming.ts
|
|
@@ -402,14 +452,19 @@ function isClickClackDiscussionChannelRevoked(params) {
|
|
|
402
452
|
}
|
|
403
453
|
//#endregion
|
|
404
454
|
//#region extensions/clickclack/src/discussions/routing.ts
|
|
405
|
-
function resolveClickClackDiscussionRoute(params) {
|
|
406
|
-
if (isClickClackDiscussionChannelRevoked(params)) return { state: "revoked" };
|
|
455
|
+
async function resolveClickClackDiscussionRoute(params) {
|
|
407
456
|
const store = getClickClackDiscussionBindingStore(params.runtime);
|
|
408
|
-
|
|
409
|
-
|
|
457
|
+
let matched = store.getByChannel(params.serverBaseUrl, params.channelId);
|
|
458
|
+
let pending = false;
|
|
459
|
+
if (!matched) {
|
|
460
|
+
pending = await hasPendingDiscussionOpenForDestination(params);
|
|
461
|
+
matched = store.getByChannel(params.serverBaseUrl, params.channelId);
|
|
462
|
+
}
|
|
463
|
+
if (isClickClackDiscussionChannelRevoked(params)) return { state: "revoked" };
|
|
464
|
+
if (!matched) return { state: pending ? "revoked" : "unbound" };
|
|
410
465
|
if (matched.binding.accountId !== params.accountId) return { state: "revoked" };
|
|
411
466
|
if (matched.binding.serverBaseUrl !== params.serverBaseUrl.replace(/\/+$/u, "")) return { state: "revoked" };
|
|
412
|
-
if (resolveDiscussionBindingAccount(params.config, matched.binding).state !== "active") return { state: "revoked" };
|
|
467
|
+
if (resolveDiscussionBindingAccount(params.runtime.config.current(), matched.binding).state !== "active") return { state: "revoked" };
|
|
413
468
|
let binding;
|
|
414
469
|
try {
|
|
415
470
|
binding = attachBindingToCurrentActiveSession({
|
|
@@ -622,10 +677,6 @@ function looksLikeClickClackTarget(raw) {
|
|
|
622
677
|
}
|
|
623
678
|
//#endregion
|
|
624
679
|
//#region extensions/clickclack/src/access.ts
|
|
625
|
-
/**
|
|
626
|
-
* Maps ClickClack senders and conversations onto the shared channel ingress
|
|
627
|
-
* allowlist/command authorization contract.
|
|
628
|
-
*/
|
|
629
680
|
const CHANNEL_ID$2 = "clickclack";
|
|
630
681
|
function normalizeClickClackUserId(value) {
|
|
631
682
|
const trimmed = value.trim();
|
|
@@ -684,7 +735,7 @@ function resolveAccountAgentRoute(params) {
|
|
|
684
735
|
lastRoutePolicy: sessionKey === mainSessionKey ? "main" : "session"
|
|
685
736
|
};
|
|
686
737
|
}
|
|
687
|
-
function resolvePreparedInboundRoute(params) {
|
|
738
|
+
async function resolvePreparedInboundRoute(params) {
|
|
688
739
|
const runtime = getClickClackRuntime();
|
|
689
740
|
const isDirect = Boolean(params.message.direct_conversation_id);
|
|
690
741
|
const target = buildClickClackTarget(isDirect ? {
|
|
@@ -702,9 +753,8 @@ function resolvePreparedInboundRoute(params) {
|
|
|
702
753
|
target,
|
|
703
754
|
isDirect
|
|
704
755
|
});
|
|
705
|
-
const discussionResolution = !isDirect && params.message.channel_id ? resolveClickClackDiscussionRoute({
|
|
756
|
+
const discussionResolution = !isDirect && params.message.channel_id ? await resolveClickClackDiscussionRoute({
|
|
706
757
|
runtime,
|
|
707
|
-
config: params.config,
|
|
708
758
|
accountId: params.account.accountId,
|
|
709
759
|
serverBaseUrl: params.account.baseUrl,
|
|
710
760
|
workspaceId: params.message.workspace_id,
|
|
@@ -731,7 +781,7 @@ function resolvePreparedInboundRoute(params) {
|
|
|
731
781
|
async function resolveClickClackInboundAccess(params) {
|
|
732
782
|
const runtime = getClickClackRuntime();
|
|
733
783
|
const cfg = params.config;
|
|
734
|
-
const preparedRoute = resolvePreparedInboundRoute(params);
|
|
784
|
+
const preparedRoute = await resolvePreparedInboundRoute(params);
|
|
735
785
|
const shouldCheckCommand = runtime.channel.commands.shouldComputeCommandAuthorized(params.message.body, cfg);
|
|
736
786
|
const effectiveGroupPolicy = resolveClickClackGroupPolicy({
|
|
737
787
|
account: params.account,
|
|
@@ -786,7 +836,7 @@ async function resolveClickClackInboundAccess(params) {
|
|
|
786
836
|
surface: CHANNEL_ID$2,
|
|
787
837
|
commandSource: "text"
|
|
788
838
|
});
|
|
789
|
-
const resolved = await
|
|
839
|
+
const resolved = await runtime.channel.inbound.ingress.resolveStable({
|
|
790
840
|
channelId: CHANNEL_ID$2,
|
|
791
841
|
accountId: params.account.accountId,
|
|
792
842
|
identity: clickClackIngressIdentity,
|
|
@@ -799,6 +849,7 @@ async function resolveClickClackInboundAccess(params) {
|
|
|
799
849
|
contextBinding: {
|
|
800
850
|
agentId: preparedRoute.route.agentId,
|
|
801
851
|
sessionKey: preparedRoute.route.sessionKey,
|
|
852
|
+
nativeChannelId: params.message.channel_id || params.message.direct_conversation_id,
|
|
802
853
|
messageId: params.message.id,
|
|
803
854
|
inboundEventKind: "user_request"
|
|
804
855
|
},
|
|
@@ -938,7 +989,7 @@ function commentaryBody(payload) {
|
|
|
938
989
|
return text;
|
|
939
990
|
}
|
|
940
991
|
function activityBody(payload) {
|
|
941
|
-
const line =
|
|
992
|
+
const line = formatChannelProgressDraftLineForEntry(void 0, {
|
|
942
993
|
event: "item",
|
|
943
994
|
itemId: payload.itemId,
|
|
944
995
|
toolCallId: payload.toolCallId,
|
|
@@ -951,7 +1002,7 @@ function activityBody(payload) {
|
|
|
951
1002
|
progressText: payload.progressText,
|
|
952
1003
|
meta: payload.meta,
|
|
953
1004
|
commandBearing: payload.commandBearing
|
|
954
|
-
})?.
|
|
1005
|
+
})?.trim();
|
|
955
1006
|
if (line) return line;
|
|
956
1007
|
const head = payload.name?.trim() || payload.title?.trim();
|
|
957
1008
|
const text = payload.progressText?.trim() || payload.summary?.trim();
|
|
@@ -1009,9 +1060,19 @@ function createClickClackActivityPublisher(params) {
|
|
|
1009
1060
|
};
|
|
1010
1061
|
const handleCommentary = (payload) => {
|
|
1011
1062
|
const body = commentaryBody(payload);
|
|
1012
|
-
if (!body.trim()) return;
|
|
1013
1063
|
const key = payload.itemId?.trim() || "turn";
|
|
1014
1064
|
let segment = commentaryByItem.get(key);
|
|
1065
|
+
if (!body.trim()) {
|
|
1066
|
+
if (segment) {
|
|
1067
|
+
clearTimeout(segment.timer);
|
|
1068
|
+
commentaryByItem.delete(key);
|
|
1069
|
+
const retracted = segment;
|
|
1070
|
+
enqueue(async () => {
|
|
1071
|
+
if (retracted.messageId) await params.client.updateMessageBody(retracted.messageId, "");
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1015
1076
|
if (!segment) {
|
|
1016
1077
|
segment = {
|
|
1017
1078
|
body: "",
|
|
@@ -1019,7 +1080,7 @@ function createClickClackActivityPublisher(params) {
|
|
|
1019
1080
|
};
|
|
1020
1081
|
commentaryByItem.set(key, segment);
|
|
1021
1082
|
}
|
|
1022
|
-
if (body
|
|
1083
|
+
if (body === segment.body) return;
|
|
1023
1084
|
segment.body = body;
|
|
1024
1085
|
segment.dirty = true;
|
|
1025
1086
|
if (!segment.timer) segment.timer = setTimeout(() => {
|
|
@@ -1028,9 +1089,7 @@ function createClickClackActivityPublisher(params) {
|
|
|
1028
1089
|
}, flushMs);
|
|
1029
1090
|
};
|
|
1030
1091
|
const toolRowKey = (payload) => {
|
|
1031
|
-
|
|
1032
|
-
if (toolCallId) return toolCallId;
|
|
1033
|
-
return (payload.itemId?.trim() ?? "").replace(/^(tool|command):/, "");
|
|
1092
|
+
return payload.itemId?.trim() || payload.toolCallId?.trim() || "";
|
|
1034
1093
|
};
|
|
1035
1094
|
const handleDiscreteItem = (payload) => {
|
|
1036
1095
|
const body = activityBody(payload);
|
|
@@ -1049,7 +1108,7 @@ function createClickClackActivityPublisher(params) {
|
|
|
1049
1108
|
});
|
|
1050
1109
|
return;
|
|
1051
1110
|
}
|
|
1052
|
-
if (body
|
|
1111
|
+
if (body === existing.body) return;
|
|
1053
1112
|
existing.body = body;
|
|
1054
1113
|
enqueue(async () => {
|
|
1055
1114
|
if (existing.messageId && existing.body !== existing.sentBody) {
|
|
@@ -1060,6 +1119,18 @@ function createClickClackActivityPublisher(params) {
|
|
|
1060
1119
|
};
|
|
1061
1120
|
return {
|
|
1062
1121
|
onItemEvent: (payload) => {
|
|
1122
|
+
if (payload.hideFromChannelProgress || payload.suppressChannelProgress || payload.suppressDurableProgress) {
|
|
1123
|
+
const key = toolRowKey(payload);
|
|
1124
|
+
const row = key ? toolRows.get(`agent_tool:${key}`) : void 0;
|
|
1125
|
+
if (row) {
|
|
1126
|
+
toolRows.delete(`agent_tool:${key}`);
|
|
1127
|
+
enqueue(async () => {
|
|
1128
|
+
if (row.messageId) await params.client.updateMessageBody(row.messageId, "");
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1131
|
+
return false;
|
|
1132
|
+
}
|
|
1133
|
+
if (payload.kind === "preamble" && !isCompleteAgentPreamble(payload)) return false;
|
|
1063
1134
|
const kind = normalizedItemKind(payload);
|
|
1064
1135
|
if (STREAMING_COMMENTARY_ITEM_KINDS.has(kind)) {
|
|
1065
1136
|
handleCommentary(payload);
|
|
@@ -1410,6 +1481,7 @@ function normalizedKind(payload) {
|
|
|
1410
1481
|
return kind;
|
|
1411
1482
|
}
|
|
1412
1483
|
function progressText(payload) {
|
|
1484
|
+
if (payload.kind !== "preamble" && payload.title) return payload.title;
|
|
1413
1485
|
const line = buildChannelProgressDraftLine({
|
|
1414
1486
|
event: "item",
|
|
1415
1487
|
itemId: payload.itemId,
|
|
@@ -1433,21 +1505,11 @@ function isFinal(payload) {
|
|
|
1433
1505
|
return phase === "end" || status === "completed" || status === "failed" || status === "blocked";
|
|
1434
1506
|
}
|
|
1435
1507
|
function createLineIdResolver() {
|
|
1436
|
-
const lineIdsByIdentity = /* @__PURE__ */ new Map();
|
|
1437
1508
|
const anonymousLinesByKind = /* @__PURE__ */ new Map();
|
|
1438
1509
|
let anonymousSequence = 0;
|
|
1439
1510
|
return (payload) => {
|
|
1440
|
-
const
|
|
1441
|
-
|
|
1442
|
-
if (existingId) {
|
|
1443
|
-
for (const identity of identities) lineIdsByIdentity.set(identity, existingId);
|
|
1444
|
-
return existingId;
|
|
1445
|
-
}
|
|
1446
|
-
if (identities.length > 0) {
|
|
1447
|
-
const id = `item:${identities[0]}`;
|
|
1448
|
-
for (const identity of identities) lineIdsByIdentity.set(identity, id);
|
|
1449
|
-
return id;
|
|
1450
|
-
}
|
|
1511
|
+
const identity = payload.itemId?.trim() || payload.toolCallId?.trim();
|
|
1512
|
+
if (identity) return `item:${identity}`;
|
|
1451
1513
|
const kind = normalizedKind(payload);
|
|
1452
1514
|
const anonymousLines = anonymousLinesByKind.get(kind) ?? [];
|
|
1453
1515
|
const line = (payload.phase?.trim().toLowerCase() === "start" ? void 0 : anonymousLines.toReversed().find((line) => line.active)) ?? (() => {
|
|
@@ -1574,7 +1636,19 @@ function createClickClackAgentProgressPublisher(params) {
|
|
|
1574
1636
|
},
|
|
1575
1637
|
onItemEvent(payload) {
|
|
1576
1638
|
if (!started || cleared) return false;
|
|
1639
|
+
if (payload.suppressChannelProgress || payload.kind === "preamble" && !isCompleteAgentPreamble(payload)) return false;
|
|
1577
1640
|
const id = resolveLineId(payload);
|
|
1641
|
+
if (payload.hideFromChannelProgress) {
|
|
1642
|
+
if (seenLines.delete(id)) enqueueLine(id, {
|
|
1643
|
+
op: "update",
|
|
1644
|
+
line: {
|
|
1645
|
+
id,
|
|
1646
|
+
kind: normalizedKind(payload),
|
|
1647
|
+
text: ""
|
|
1648
|
+
}
|
|
1649
|
+
});
|
|
1650
|
+
return false;
|
|
1651
|
+
}
|
|
1578
1652
|
const final = isFinal(payload);
|
|
1579
1653
|
const kind = normalizedKind(payload);
|
|
1580
1654
|
const retractsExistingCommentary = kind === "commentary" && seenLines.has(id) && payload.progressText !== void 0 && payload.progressText.trim() === "";
|
|
@@ -1587,7 +1661,7 @@ function createClickClackAgentProgressPublisher(params) {
|
|
|
1587
1661
|
id,
|
|
1588
1662
|
kind,
|
|
1589
1663
|
text: retractsExistingCommentary ? "" : progressText(payload),
|
|
1590
|
-
status: payload.status?.trim() || (final ? "
|
|
1664
|
+
status: payload.status?.trim() || (final ? "blocked" : "running")
|
|
1591
1665
|
};
|
|
1592
1666
|
if (payload.name?.trim()) line.tool_name = payload.name.trim();
|
|
1593
1667
|
enqueueLine(id, {
|