Commit Graph
11 Commits
Author SHA1 Message Date
ZiyaandMagolor 341ea6eea4 feat(schedule): integrate standalone tasks with the existing WebUI (#6189)
* feat(schedule): manage Host tasks with typed timing and delivery targets

* fix(schedule): align task creation button halves

* refactor(schedule): remove obsolete Session reminder runtime

* refactor(schedule): simplify task UI and preserve keyboard navigation

* fix(schedule): address task delivery and interface review findings

* test(schedule): normalize bundle module paths on Windows

* fix(schedule): cover reserved targets and trim unrelated changes

* refactor(schedule): minimize task management changes after rebase

* test(schedule): align rebased fixtures and documentation records

* test(schedule): refresh SDK scenarios added on master

---------

Co-authored-by: Magolor <[email protected]>
2026-10-29 18:11:48 +08:00
Chinesezjc c949deb1ca refactor(util-time): publish only the span surface its consumers call
The package API carried members and result types ahead of any caller. The
span now publishes fromMilliseconds and decompose, the two entries
dsh-time-context calls; the seconds constructor, the zero identity, the
arithmetic and ordering operations, the millisecond getter, and the four
fractional conversions land with the caller that needs them, recorded in
the Agent Note and the README limitation.

The package entry names its exports instead of re-exporting both modules,
so the three result types and DurationParts, which no consumer names, are
no longer part of the published surface. Every remaining new name has a
named consumer: schedule imports the nine parser and bound names plus
four rejection types, and canonicalizeTimeZone has seven consumer files.
2026-10-14 15:27:15 +08:00
Chinesezjc 830f66006e fix(util-time): enforce the span bound in arithmetic, and correct the record
- plus and minus construct through fromMilliseconds, so the documented
  bound has one enforcement point; the negative control reddens the new
  assertion
- the class and README say Duration overrides no coercion hook rather
  than having none, and decompose says which parts are floored
- the note no longer calls the differential a review probe, records that
  Schedule imports the bound constants, that both strict parsers refuse
  year 0, that Schedule's suites do assert a few message substrings, and
  that the util charter bans harness dependencies rather than external
  packages
2026-09-25 16:33:11 +08:00
Chinesezjc 0b5803cf0c fix(util-time): bound a span, and state the conversions as they are
- Duration rejects a count outside the exactly representable millisecond
  range, which is what makes decompose's whole-part identity exact; the
  postcondition is asserted over a sweep and a random sample
- the to* JSDoc no longer claims a round trip restores the count: each is
  one division, so it answers the nearest double
- a test rules out a Symbol.toPrimitive coercion hook, the README names
  both implementation modules, and the note records that the value type
  ships its full operation set before its second consumer exists
2026-09-25 15:14:50 +08:00
Chinesezjc 994b9e07bf fix: satisfy the lint and generated-catalog gates
- the immutability assertion checked coercion overrides instead of
  stringifying the instance, which no-base-to-string rejects
- the config catalog is regenerated for the package description
2026-09-25 14:55:58 +08:00
Chinesezjc 0939392e71 feat(util-time): add a millisecond Duration span
Duration holds one finite millisecond count behind a frozen class: a
class rather than a branded number because TypeScript erases a brand
through arithmetic, so only an instance can stop seconds and
milliseconds from being added. It adds, subtracts, orders, converts to
larger units fractionally, and splits a non-negative span into whole
days, hours, minutes, and seconds. There is no valueOf and no toString,
so a reader always states its unit.

dsh-time-context reads its elapsed line through it and keeps the
wording: a backward clock reading still clamps to zero there. The
rendered text is byte-identical for every finite sample, verified by a
differential over more than eight thousand inputs. A non-finite sample
now throws from the span constructor instead of rendering 'NaNs', which
the package's own reading invariant already refused.
2026-09-25 14:48:01 +08:00
Chinesezjc 7edd3efe85 refactor(time): give the four-digit bound one owner
- isFourDigitYearInstant is the shared predicate; Schedule's five
  representability guards delegate to it instead of re-deriving the range
- the reason for a field outside its calendar range is out_of_range in
  both strict parsers, so year 0 no longer reads as a wall-clock problem
- LocalCalendarTime.year states which entries reject year 0 and which
  accept it at the UTC edges
- the note counts the five removed expressions and records that the zone
  mapper is a silent catch-all; the Chinese side mirrors the English
  paragraph order
2026-09-25 00:53:09 +08:00
Chinesezjc 51a7572852 refactor(time): answer the shared resolver from one place
- resolveLocalInstant accepts an already-built plain date-time, so the
  recurrence walkers drop their private copy of the disambiguation and
  round-trip decision
- decodeInstant narrows its field explicitly and drops the assertion
- the model-input exhaustiveness fallbacks throw a plain Error, matching
  the timing-change fallback, while durable decoding keeps
  ScheduleLogError
- the library module and README state which entries answer a
  discriminated result
2026-09-25 00:31:56 +08:00
Chinesezjc 22f8be30a1 refactor(time-context): consume the shared zone vocabulary
time-context kept a third copy of the IANA profile: its own regular
expression and its own Intl canonicalization in request-zone.ts. It now
reads a request's reported zone through canonicalizeTimeZone and keeps
its stricter policy — an alias whose canonical answer differs from the
reported value is still refused, with the same three diagnostics.

The shared rejection now carries the platform error it caught, so the
unsupported refusal keeps its cause in both time-context and Schedule.
2026-09-24 21:54:34 +08:00
Chinesezjc c96d48d491 refactor(schedule): extract time vocabulary into dsh-util-time
Move Schedule's strict RFC 3339 instant, local-calendar, and IANA zone
parsing into @deepseek-ai/dsh-util-time, and have Schedule consume it.

The shared entries answer discriminated results and own no failure
vocabulary; Schedule keeps its error codes, diagnostics, durable record
shapes, and all recurrence arithmetic.
2026-09-24 12:55:36 +08:00
imccyu 804b1ffbfc refactor(api): converge the Remote failure vocabulary and client surface
Single RemoteError with a merge-extensible, domain-prefixed code map;
owners throw at the failure point; streams surface marked failures;
clients consume ctx.remote directly with isRemoteFailure as the only
discrimination point and construct no failure instances.
2026-08-28 22:37:36 +08:00