This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
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>
2026-06-23 14:14:09 +03:00

122 lines
2.0 KiB
Dart

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
// Top-level function
String greet(String name) {
return 'Hello, $name!';
}
// Top-level typedef
typedef JsonMap = Map<String, dynamic>;
typedef Callback = void Function(int value);
// Enum
enum Status {
active,
inactive,
pending;
String get label => name.toUpperCase();
}
// Class with extends and implements
class Animal {
final String name;
Animal(this.name);
String speak() => 'I am $name';
}
abstract class Describable {
String describe();
}
class Dog extends Animal implements Describable {
final String breed;
Dog(super.name, this.breed);
// Factory constructor
factory Dog.unknown() {
return Dog('Unknown', 'Mixed');
}
@override
String speak() => 'Woof! I am $name';
@override
String describe() => 'Dog($name, $breed)';
// Getter
String get info => '$name - $breed';
// Setter
set nickname(String value) {
print('Nickname set to $value');
}
}
// Mixin
mixin Swimming {
void swim() {
print('Swimming!');
}
}
mixin Flying {
void fly() {
print('Flying!');
}
}
// Class with mixin
class Duck extends Animal with Swimming, Flying {
Duck(super.name);
}
// Extension
extension StringExtension on String {
String capitalize() {
if (isEmpty) return this;
return '${this[0].toUpperCase()}${substring(1)}';
}
}
// Generic class
class Repository<T> {
final List<T> _items = [];
void add(T item) {
_items.add(item);
}
T? findFirst(bool Function(T) predicate) {
for (final item in _items) {
if (predicate(item)) return item;
}
return null;
}
}
// Private function (starts with _)
void _privateHelper() {
print('I am private');
}
// Async function
Future<String> fetchData(String url) async {
final response = await http.get(Uri.parse(url));
return response.body;
}
// Top-level const
const String appName = 'MyApp';
void main() {
final dog = Dog('Rex', 'German Shepherd');
dog.speak();
print(greet('World'));
}