Skip to content
hulingjunPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ChatCards

ChatCards turns user-confirmed sentences from the current ChatGPT conversation into typed fill-in-the-blank cards, publishes immutable JSON batches to Google Drive application data, and imports them into a local-first SwiftUI reviewer.

This repository currently implements the M0 contract and cross-client storage spike. It does not yet contain a production OAuth broker, production MCP deployment, or finished iOS application.

Frozen v0.1 boundaries

  • ChatGPT side: one Skill plus one authenticated MCP write tool; no widget.
  • Card type: type_answer, exactly one blank, 1–10 cards per batch.
  • Privacy: the MCP receives confirmed card fields, never a complete transcript.
  • Transport: one immutable JSON file per batch in Drive appDataFolder.
  • iOS: SwiftUI and SwiftData, with review state kept locally.
  • Sync: first sync after login and user-triggered sync only.
  • Scheduling: the typed answer provides feedback; the user chooses Again, Hard, Good, or Easy.

Repository map

contracts/                       Shared v1 JSON Schema, fixtures, and hash vectors
packages/contract-ts/            TypeScript validation and canonical hashing
ios/Packages/ChatCardsCore/      Swift contract, validation, comparison, and tests
spikes/drive-cross-client/       Web/iOS Drive appDataFolder interoperability spike
docs/                            Architecture decisions and M0 runbook

Local checks

npm install
npm run check

cd ios/Packages/ChatCardsCore
swift test

The Swift command requires an installed Swift 6 toolchain. The Drive spike additionally requires a Google Cloud project and OAuth client configuration; no credentials belong in this repository.

M0 exit criteria

  1. TypeScript and Swift accept and reject the same contract fixtures.
  2. Both implementations produce the same SHA-256 digest for the canonical payload vector.
  3. A Web OAuth client can create a marker in appDataFolder.
  4. An iOS OAuth client in the same Google Cloud project and using the same Google account can read it.
  5. The reverse write/read direction works, while another Google account remains isolated.

See docs/m0-runbook.md for the execution order.

Current verification

  • TypeScript contract: 30 tests passing.
  • Drive CLI: typecheck and 4 tests passing.
  • Dependency gate: no high or critical npm audit finding; the remaining Ajv $data advisory is documented in docs/security-notes.md and the feature is disabled.
  • Swift Core: source and XCTest are present with the same golden hashes; this Linux workspace has no Swift toolchain, so GitHub Actions runs swift test on macOS.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages