kimi-code/packages/node-sdk/examples
liruifengv b0f43aea28
feat(oauth): return structured managed usage rows (#2300)
* feat(oauth): return structured managed usage rows

Stop formatting plan-usage labels and reset hints into English strings
at the oauth layer. The parser still absorbs backend field drift, but
now emits a stable structured row (name / window{duration,unit} / used
/ limit / resetAt) that kap-server passes through and clients localize
themselves:

- window: normalized from duration/timeUnit (minute/hour/day/week),
  whole-hour minute windows fold to hours, unnamed summaries are the
  weekly limit
- resetAt: absolute ISO timestamp; relative reset_in/ttl seconds are
  converted at parse time
- TUI /usage panel formats labels and reset hints locally

* refactor(oauth): parse managed usage strictly to the current payload shape

Drop the defensive drift tolerance (alternate reset-time spellings,
reset_in/ttl seconds, remaining-derived used, title/scope names,
top-level duration/timeUnit, fuzzy time-unit matching) and parse only
what the platform actually sends: numeric strings, resetTime, nested
detail/window records, TIME_UNIT_* enums.

* fix(node-sdk): update managed usage smoke example and facade tests for structured rows
2026-07-28 15:03:25 +08:00
..
kimi-harness-auth-smoke.ts feat(oauth): return structured managed usage rows (#2300) 2026-07-28 15:03:25 +08:00
kimi-harness-cancel-smoke.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
kimi-harness-config-smoke.ts refactor!: overhaul thinking config and effort resolution (#1132) 2026-06-30 22:34:13 +08:00
kimi-harness-export-smoke.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
kimi-harness-list-smoke.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
kimi-harness-log-marker.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
kimi-harness-logging-smoke.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
kimi-harness-prompt-demo.ts feat: agent swarm (#424) 2026-06-08 14:26:56 +08:00
kimi-harness-rename-smoke.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
kimi-harness-set-model-smoke.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
kimi-harness-set-permission-smoke.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
kimi-harness-set-thinking-smoke.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
kimi-harness-smoke.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
kimi-harness-steer-smoke.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
runtime-smoke-helpers.ts feat: agent swarm (#424) 2026-06-08 14:26:56 +08:00
t8-race-create-single.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
t8-race-create.ts refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
t8-race-direct.ts Kimi For Coding 2026-05-22 15:54:50 +08:00