Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
50 lines
1.5 KiB
TypeScript
50 lines
1.5 KiB
TypeScript
import api from './api'
|
|
|
|
export const githubService = {
|
|
connectGitHub: () => {
|
|
const clientId = process.env.NEXT_PUBLIC_GITHUB_CLIENT_ID
|
|
const redirectUri = `${window.location.origin}/auth/github/callback`
|
|
window.location.href = `https://github.com/login/oauth/authorize?client_id=${clientId}&redirect_uri=${redirectUri}&scope=user:email,repo,read:user`
|
|
},
|
|
|
|
syncProjects: async () => {
|
|
const { data } = await api.post('/github/sync')
|
|
return data
|
|
},
|
|
|
|
getProjects: async () => {
|
|
const { data } = await api.get('/github/projects')
|
|
return data
|
|
},
|
|
|
|
getProject: async (owner: string, repo: string) => {
|
|
const { data } = await api.get(`/github/projects/${owner}/${repo}`)
|
|
return data
|
|
},
|
|
|
|
claimAccount: async (githubUsername: string) => {
|
|
const { data } = await api.post('/github/claim', { githubUsername })
|
|
return data
|
|
},
|
|
|
|
disconnectGitHub: async () => {
|
|
const { data } = await api.delete('/github/disconnect')
|
|
return data
|
|
},
|
|
|
|
searchProjects: async (query: string, page = 1, limit = 20) => {
|
|
const { data } = await api.get('/github/search', { params: { q: query, page, limit } })
|
|
return data
|
|
},
|
|
|
|
getSavedProjects: async (page = 1, limit = 20) => {
|
|
const { data } = await api.get('/github/saved', { params: { page, limit } })
|
|
return data
|
|
},
|
|
|
|
syncProject: async (repoName: string, owner: string) => {
|
|
const { data } = await api.post('/github/sync-project', { repoName, owner })
|
|
return data
|
|
},
|
|
}
|