Skip to content

fix(import): clone auth, auto-push, and from-org simplification#48

Open
m0Nst3r873 wants to merge 5 commits into
Tencent:mainfrom
m0Nst3r873:fix/import-clone-and-push
Open

fix(import): clone auth, auto-push, and from-org simplification#48
m0Nst3r873 wants to merge 5 commits into
Tencent:mainfrom
m0Nst3r873:fix/import-clone-and-push

Conversation

@m0Nst3r873

Copy link
Copy Markdown
Contributor

Summary

Clone auth

  • http → https upgrade for TGit (netrc requires HTTPS)
  • OAuth token embedded in URL for TGit
  • SSH conversion when forceSsh=true

Auto-push

  • All import commands now auto-push to team repo
  • Shared autoPushTeamRepo utility

from-org

  • Remove AI clustering (graph organizes via edges)
  • Graceful domains.yaml error handling

Other

  • AI timeout 720s → 1200s, failure non-blocking
  • iWiki Accept header fix
  • MAPS_TO reconcile before push

Test plan

  • tsc + vitest pass
  • E2E: import --from-org 378710 (11 repos, 0 failures)

Replace AI-generated docs/team-codebase/ with structured teamwiki/
knowledge graph. Vendor team-wiki's code-knowledge + core packages
(by @lurkacai) as the deterministic extraction engine.

New capabilities:
- `teamai codebase --extract`: code fact extraction (TS/Python/Go/Rust/Java/TOML/SQL)
- `teamai recall`: BM25 + graph-boost codebase retrieval
- `teamai codebase --lint`: graph health check
- `teamai codebase --upgrade-wiki`: migration from old format
- Module summaries with dependency direction and ranked components
- Knowledge gaps detection (IMPL_MISSING, LOW_CONNECTIVITY, etc.)
- Cross-repo edge detection via PascalCase label + config key matching
- AI overview.md generation (non-blocking on timeout)
- Pull protection: skip overwrite when local teamwiki/ is newer

Architecture:
- src/wiki-engine/: vendored core (graph schema, protocol) + code-knowledge
  (collector, extractors, graph builder, incremental detection)
- src/wiki-engine/adapters/: teamai-specific bridge + shared templates
- teamwiki/ directory (non-hidden) with router.md, hot.md, index.md,
  evidence/, .indices/, gaps/, modules/
@m0Nst3r873 m0Nst3r873 force-pushed the fix/import-clone-and-push branch from 610b47b to 42926ff Compare June 25, 2026 06:40
Clone: http→https for TGit, OAuth token in URL, SSH conversion
Auto-push: all import commands auto-push via shared utility
from-org: remove AI clustering, direct whitelist→batch import
AI timeout: 720s→1200s, failure non-blocking for graph extraction
iWiki: Accept header fix, MAPS_TO reconcile before push
@m0Nst3r873 m0Nst3r873 force-pushed the fix/import-clone-and-push branch from 42926ff to 72696d4 Compare June 25, 2026 06:42
… saveGraphIndex path

- Delete manifest-schema.ts (unused, team-wiki compile-from-manifest path not needed)
- computeGraphBoost: extend from 1-hop to 2-hop neighbor traversal (2-hop gets 0.4x weight)
- saveGraphIndex: fix path from .teamwiki/.indices/ to .indices/ (align with teamai teamwiki/ convention)
- import-iwiki: use saveGraphIndex instead of manual writeFile
…ents

Bug 1 (critical): Stop hook output used invalid {"stopReason":...} format.
Claude Code only passes hookSpecificOutput.additionalContext to the AI.
5 sessions had hinted=true but users never saw the hint.

Fix: new src/utils/hook-output.ts with multi-tool format awareness
(Claude Code/CodeBuddy use hookSpecificOutput, Cursor uses {message}).

Bug 2 (minor): scoring formula adjustments:
- Tool count start: 30→20
- Duration: add 15min tier (+10)
- Git commit penalty: -15→0 (neutral)
- BASE_THRESHOLD: 20→15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant