Skip to content

Commit 679c5d3

Browse files
committed
Finish renaming to Ampere, add basic CLI
1 parent eea060c commit 679c5d3

373 files changed

Lines changed: 1323 additions & 10814 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.aiassistant/rules/file_structure.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ instructions: When a new file need to be created.
44
---
55

66
You must decide the file's location and name based on the area of the codebase that it represents. Examples:
7-
- If creating `*UseCase.kt` for new shared functionality, then it should go in `/shared/src/commonMain/kotlin/link/socket/kore/domain/usecase`
7+
- If creating `*UseCase.kt` for new shared functionality, then it should go in `/shared/src/commonMain/kotlin/link/socket/ampere/domain/usecase`
88
- If you are providing the `actual` definition for a new `commonMain` value/function, then it should stay within that module's folder, and the file must end in `*.$platform.kt`. Example:
9-
- There is `expect fun foo()` defined in `/shared/src/commonMain/kotlin/link/socket/kore/io/Foo.kt`
10-
- The Android `actual fun foo()` should be generated in `/shared/src/androidMain/kotlin/link/socket/kore/io/Foo.android.kt`
11-
- The Desktop `actual fun foo()` should be generated in `/shared/src/jvmMain/kotlin/link/socket/kore/io/Foo.jvm.kt`
9+
- There is `expect fun foo()` defined in `/shared/src/commonMain/kotlin/link/socket/ampere/io/Foo.kt`
10+
- The Android `actual fun foo()` should be generated in `/shared/src/androidMain/kotlin/link/socket/ampere/io/Foo.android.kt`
11+
- The Desktop `actual fun foo()` should be generated in `/shared/src/jvmMain/kotlin/link/socket/ampere/io/Foo.jvm.kt`
1212
- If you are defining new functionality that is specific to _only_ one platform then it must go in the folder for that platform. Examples:
1313
- The Android app is defined in `MainActivity.kt` and `AndroidMainfest.xml`, which are both in `/androidApp/src/androidMain/*`
14-
- The Desktop app is defined in `Main.kt`, which is in `/desktopApp/src/jvmMain/kotlin/link/socket/kore/Main.kt`
14+
- The Desktop app is defined in `Main.kt`, which is in `/desktopApp/src/jvmMain/kotlin/link/socket/ampere/Main.kt`

.junie/guidelines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
## Project overview
44

5-
Kore AI is a Kotlin Multiplatform (KMP) project that provides a shared core for building conversational AI agents and
5+
Ampere is a Kotlin Multiplatform (KMP) project that provides a shared core for building conversational AI agents and
66
multiple platform apps that consume this core.
77

88
- shared: Multiplatform library containing the domain and model layers for agents, chat, conversations, capabilities,
99
and tools.
10-
- Common code: `shared/src/commonMain/kotlin/link/socket/kore/...`
10+
- Common code: `shared/src/commonMain/kotlin/link/socket/ampere/...`
1111
- Platform code: `shared/src/{androidMain,iosMain,jvmMain}`
1212
- Tests: `shared/src/jvmTest`
1313
- androidApp: Android application that uses the shared module.
@@ -39,7 +39,7 @@ multiple platform apps that consume this core.
3939

4040
## Notes for this repository
4141

42-
- The main package namespace is `link.socket.kore.*`.
42+
- The main package namespace is `link.socket.ampere.*`.
4343
- Key domains in `shared/src/commonMain/kotlin` include:
4444
- `domain/chat` and `domain/conversation`: Conversation, Chat, and system instructions (tone, seriousness).
4545
- `domain/capability`: Capability abstractions.

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Repository pattern with SQLDelight persistence:
160160
## Directory Structure
161161

162162
```
163-
shared/src/commonMain/kotlin/link/socket/kore/
163+
shared/src/commonMain/kotlin/link/socket/ampere/
164164
├── domain/
165165
│ ├── ai/
166166
│ │ ├── provider/ # AI providers (OpenAI, Anthropic, Google)

CONTRIBUTING.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ This project adheres to a Contributor Code of Conduct. By participating, you are
1212

1313
### Reporting Bugs
1414

15-
- Ensure the bug was not already reported by searching on GitHub under [Issues](https://github.com/socket-link/kore-ai/issues).
16-
- If you have a bug to report, [open a new issue](https://github.com/socket-link/kore-ai/issues/new) and follow the issue template.
15+
- Ensure the bug was not already reported by searching on GitHub under [Issues](https://github.com/socket-link/ampere/issues).
16+
- If you have a bug to report, [open a new issue](https://github.com/socket-link/ampere/issues/new) and follow the issue template.
1717

1818
### Suggesting Enhancements
1919

20-
- Check if the enhancement was already suggested by searching on GitHub under [Issues](https://github.com/socket-link/kore-ai/issues).
21-
- If you have an enhancement to suggest, [open a new issue](https://github.com/socket-link/kore-ai/issues/new) and follow the issue template.
20+
- Check if the enhancement was already suggested by searching on GitHub under [Issues](https://github.com/socket-link/ampere/issues).
21+
- If you have an enhancement to suggest, [open a new issue](https://github.com/socket-link/ampere/issues/new) and follow the issue template.
2222

2323
### Pull Requests
2424

@@ -34,4 +34,3 @@ This project adheres to a Contributor Code of Conduct. By participating, you are
3434
- Use the present tense ("Add feature" not "Added feature").
3535
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
3636
- Limit the first line to 72 characters or less.
37-

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Maven Central](https://img.shields.io/maven-central/v/link.socket.kore-ai/kore-ai-client?color=blue&label=Download)](https://central.sonatype.com/namespace/link.socket.kore-ai)
1+
[![Maven Central](https://img.shields.io/maven-central/v/link.socket.ampere/ampere-client?color=blue&label=Download)](https://central.sonatype.com/namespace/link.socket.ampere)
22
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
33

44
# Ampere: A KMP Library for AI Agents & Assistants
@@ -8,7 +8,7 @@
88
> **Note**
99
> This library, its APIs, and the sample client applications are in Alpha.
1010
> It may change incompatibly and require manual migration in the future.
11-
> If you have any issues, please report them on [GitHub](https://github.com/socket-link/kore-ai/issues).
11+
> If you have any issues, please report them on [GitHub](https://github.com/socket-link/ampere/issues).
1212
1313
## 📔 Overview
1414

@@ -32,7 +32,7 @@ An **Agent** is a specialized AI Chatbot with domain-specific knowledge for well
3232
- **System Prompt**: Defines the Agent's mindset and approach
3333
- **User Prompt**: Initial prompt with optional `HumanAssisted` API for dynamic input
3434

35-
### [Bundled Agents](https://github.com/socket-link/kore-ai/tree/main/shared/src/commonMain/kotlin/link/socket/kore/model/agent/bundled)
35+
### [Bundled Agents](https://github.com/socket-link/ampere/tree/main/shared/src/commonMain/kotlin/link/socket/ampere/model/agent/bundled)
3636

3737
- Save File Agent
3838
- Modify File Agent

README_AGENT_SYSTEM.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Agent System Overview
22

3-
This document describes the minimal autonomous agent system added to Kore AI, including core interfaces, tools, and an example workflow using the CodeWriterAgent.
3+
This document describes the minimal autonomous agent system added to Ampere, including core interfaces, tools, and an example workflow using the CodeWriterAgent.
44

55
## Interfaces
66

@@ -11,7 +11,7 @@ This document describes the minimal autonomous agent system added to Kore AI, in
1111
- act(): Outcome — execute one step from the plan
1212
- signal(): Message? — communicate uncertainties or ask for approval
1313

14-
All return types are immutable data classes in link.socket.kore.agents.core.AgentTypes.
14+
All return types are immutable data classes in link.socket.ampere.agents.core.AgentTypes.
1515

1616
## Autonomy Levels
1717

ampere

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
# Run the ampere CLI.
3+
# Any arguments are forwarded to the CLI.
4+
5+
if [ $# -eq 0 ]; then
6+
./gradlew --quiet ":ampere-cli:runJvm"
7+
else
8+
./gradlew --quiet ":ampere-cli:runJvm" --args="$*"
9+
fi

ampere-cli/build.gradle.kts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)
2+
3+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
4+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
5+
6+
plugins {
7+
kotlin("multiplatform")
8+
kotlin("plugin.serialization")
9+
}
10+
11+
kotlin {
12+
jvmToolchain(21)
13+
14+
jvm {
15+
compilerOptions {
16+
jvmTarget.set(JvmTarget.JVM_21)
17+
}
18+
19+
binaries {
20+
executable {
21+
mainClass.set("link.socket.ampere.MainKt")
22+
}
23+
}
24+
}
25+
26+
sourceSets {
27+
val jvmMain by getting {
28+
dependencies {
29+
implementation(project(":shared"))
30+
31+
// CLI argument parsing
32+
implementation("com.github.ajalt.clikt:clikt:4.4.0")
33+
34+
// Terminal rendering with colors and styles
35+
implementation("com.github.ajalt.mordant:mordant:2.7.2")
36+
37+
// Coroutines
38+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
39+
40+
// SQLDelight driver for JVM
41+
implementation("app.cash.sqldelight:sqlite-driver:2.2.1")
42+
43+
// Serialization
44+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0")
45+
}
46+
}
47+
}
48+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package link.socket.ampere
2+
3+
import com.github.ajalt.clikt.core.CliktCommand
4+
import com.github.ajalt.clikt.core.subcommands
5+
6+
fun main(args: Array<String>) = AmpereCommand()
7+
.subcommands(WatchCommand())
8+
.main(args)
9+
10+
class AmpereCommand : CliktCommand(
11+
name = "ampere",
12+
help = """
13+
Animated Multi-Agent (Prompting Technique) -> AniMA
14+
AniMA Model Protocol -> AMP
15+
AMP Environment Runtime Example -> AMPERE
16+
17+
AMPERE is a tool for running AniMA simulations in a real-time, observable environment.
18+
""".trimIndent()
19+
) {
20+
override fun run() = Unit
21+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
package link.socket.ampere
2+
3+
import com.github.ajalt.clikt.core.CliktCommand
4+
import com.github.ajalt.clikt.parameters.options.default
5+
import com.github.ajalt.clikt.parameters.options.option
6+
import com.github.ajalt.clikt.parameters.types.int
7+
import com.github.ajalt.mordant.rendering.TextColors.*
8+
import com.github.ajalt.mordant.rendering.TextStyles.*
9+
import com.github.ajalt.mordant.terminal.Terminal
10+
11+
class WatchCommand : CliktCommand(
12+
name = "watch",
13+
help = """
14+
Watch events streaming from the AniMA substrate in real-time.
15+
16+
Connects to the EventBus and renders events to terminal with color-coding
17+
and formatting for human readability.
18+
19+
Examples:
20+
ampere watch # Watch all events
21+
ampere watch --type TaskCreated # Filter by event type
22+
ampere watch --since 1h # Events from last hour
23+
""".trimIndent()
24+
) {
25+
private val eventType by option(
26+
"--type", "-t",
27+
help = "Filter events by type (TaskCreated, QuestionRaised, CodeSubmitted)"
28+
)
29+
30+
private val agent by option(
31+
"--agent", "-a",
32+
help = "Filter events by agent ID"
33+
)
34+
35+
private val since by option(
36+
"--since", "-s",
37+
help = "Show events since timestamp (e.g., '1h', '30m', '2024-01-01')"
38+
)
39+
40+
private val limit by option(
41+
"--limit", "-n",
42+
help = "Limit number of events to display"
43+
).int().default(100)
44+
45+
private val replay by option(
46+
"--replay", "-r",
47+
help = "Replay historical events from database before watching"
48+
)
49+
50+
private val terminal = Terminal()
51+
52+
override fun run() {
53+
terminal.println(
54+
bold(cyan("AMPERE")) + " - AniMA Perception & Relay Environment"
55+
)
56+
terminal.println(dim("Connecting to event stream..."))
57+
terminal.println()
58+
59+
// Placeholder for actual implementation
60+
terminal.println(yellow("Watch command invoked with:"))
61+
eventType?.let { terminal.println(" Event type: $it") }
62+
agent?.let { terminal.println(" Agent: $it") }
63+
since?.let { terminal.println(" Since: $it") }
64+
terminal.println(" Limit: $limit")
65+
replay?.let { terminal.println(" Replay: $it") }
66+
67+
terminal.println()
68+
terminal.println(dim("Event streaming will be implemented in subsequent tasks."))
69+
}
70+
}

0 commit comments

Comments
 (0)