Files
2026-05-27 23:29:53 +01:00

1.6 KiB

tasks — drive-transport-https-v1

1. Package scaffolding

  • 1.1 package.json with subpath exports for root, types, schemas, errors.
  • 1.2 vite.config.ts with the standard externals list.
  • 1.3 tsconfig.lib.json extending the base config.
  • 1.4 vitest.config.ts via createTestConfig().

2. Error registry

  • 2.1 Define the nine HTTPS_TRANSPORT_CODES and HttpsTransportError.
  • 2.2 Co-located error-codes.md (≥200-word doc).

3. Public types

  • 3.1 HttpsTransportOptions, FetchFn, RecvResponse, SendBody, SendResponse, Unsubscribe in types/transport.types.ts.
  • 3.2 Co-located transport.types.md.

4. Boundary schemas

  • 4.1 Zod schemas: HttpsTransportOptionsSchema, SendBodySchema, SendResponseSchema, RecvResponseSchema.
  • 4.2 Co-located transport.schema.md.

5. Transport runtime

  • 5.1 HttpsTransport class implementing TransportLike.
  • 5.2 Long-poll receive loop with backoff + jitter.
  • 5.3 lastAuthError diagnostic getter for the auth-fail termination path.
  • 5.4 defaults.ts constants module.
  • 5.5 Co-located https-transport.md and defaults.md.

6. Tests

  • 6.1 error-codes.spec-conformance.test.ts.
  • 6.2 schemas.test.ts.
  • 6.3 lifecycle.test.ts.
  • 6.4 send.test.ts.
  • 6.5 recv.test.ts.
  • 6.6 default-fetch.test.ts (isolated globalThis.fetch tests).

7. Gates

  • 7.1 bunx turbo lint typecheck test --filter=... green.
  • 7.2 bunx turbo test:coverage --filter=... at 100/100/100/100.
  • 7.3 bun run docs:check reports 5/5 files.