Skip to content

Commit 9427732

Browse files
authored
Migrating towards the Plan Engine concept away from Control Plane (#184)
* Migrate "control plane" to "plan engine" and simplify related messaging. * Bumped Orra JS and Python to version 0.2.1 and updated READMEs plus related details. * Updated the examples to match the latest from the Plan Engine. * Updated the conformance suite to match the latest from the Plan Engine. * Added release docs. * Dockerfile now refers to plan-engine binary. * modules now refer to planengine.
1 parent 74b6b99 commit 9427732

File tree

111 files changed

+877
-610
lines changed

Some content is hidden

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

111 files changed

+877
-610
lines changed

.github/workflows/pr-checks.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
types: [opened, synchronize, reopened]
66
branches:
77
- main
8-
- manta-ray
98

109
jobs:
1110
test:
@@ -18,28 +17,28 @@ jobs:
1817
- name: Set up Go
1918
uses: actions/setup-go@v4
2019
with:
21-
go-version: '1.21'
20+
go-version: '1.22'
2221
check-latest: true
2322
cache: true
2423

2524
- name: Install dependencies
2625
run: |
27-
cd controlplane
26+
cd planengine
2827
go mod download
2928
3029
- name: Run tests
3130
run: |
32-
cd controlplane
31+
cd planengine
3332
make test
3433
3534
- name: Run static analysis
3635
run: |
37-
cd controlplane
36+
cd planengine
3837
make vet
3938
4039
- name: Check formatting
4140
run: |
42-
cd controlplane
41+
cd planengine
4342
make fmt
4443
if [ -n "$(git status --porcelain)" ]; then
4544
echo "Code is not properly formatted. Please run 'make fmt' locally and commit changes."
@@ -56,12 +55,12 @@ jobs:
5655
- name: Set up Go
5756
uses: actions/setup-go@v4
5857
with:
59-
go-version: '1.21'
58+
go-version: '1.22'
6059
cache: true
6160

6261
- name: golangci-lint
6362
run: |
64-
cd controlplane
63+
cd planengine
6564
make lint
6665
6766
build:
@@ -75,10 +74,10 @@ jobs:
7574
- name: Set up Go
7675
uses: actions/setup-go@v4
7776
with:
78-
go-version: '1.21'
77+
go-version: '1.22'
7978
cache: true
8079

8180
- name: Build
8281
run: |
83-
cd controlplane
82+
cd planengine
8483
make build

.github/workflows/release.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ name: Release Management
33
on:
44
push:
55
tags:
6-
- 'cli-v*.*.*-*' # e.g. cli-v0.1.0-narwhal
7-
- 'cp-v*.*.*-*' # e.g. cp-v0.1.0-narwhal
8-
- 'sdk-v*.*.*-*' # e.g. sdk-v0.1.0-narwhal
9-
- 'v*.*.*-*' # e.g. v0.1.0-narwhal
6+
- 'cli-v*.*.*-*' # e.g. cli-v0.1.0
7+
- 'peng-v*.*.*-*' # e.g. peng-v0.1.0
8+
- 'sdk-v*.*.*-*' # e.g. sdk-v0.1.0
9+
- 'v*.*.*-*' # e.g. v0.1.0
1010

1111
workflow_dispatch: # This is crucial for manual runs
1212
inputs:
1313
test_tag:
14-
description: 'Tag to simulate (e.g., v0.1.0-narwhal)'
14+
description: 'Tag to simulate (e.g., v0.1.0)'
1515
required: true
16-
default: 'v0.1.0-narwhal'
16+
default: 'v0.1.0'
1717
debug:
1818
description: 'Enable debug logging'
1919
required: false
@@ -27,7 +27,7 @@ jobs:
2727
release_type: ${{ steps.release_type.outputs.type }}
2828
version: ${{ steps.release_type.outputs.version }} # Make sure this matches
2929
has_cli: ${{ steps.check_changelog.outputs.has_cli }}
30-
has_controlplane: ${{ steps.check_changelog.outputs.has_controlplane }}
30+
has_planengine: ${{ steps.check_changelog.outputs.has_planengine }}
3131
has_sdk: ${{ steps.check_changelog.outputs.has_sdk }}
3232
steps:
3333
- uses: actions/checkout@v4
@@ -63,9 +63,9 @@ jobs:
6363
if [[ $TEST_TAG == cli-v* ]]; then
6464
echo "type=cli" >> $GITHUB_OUTPUT
6565
echo "version=${TEST_TAG#cli-v}" >> $GITHUB_OUTPUT
66-
elif [[ $TEST_TAG == cp-v* ]]; then
66+
elif [[ $TEST_TAG == peng-v* ]]; then
6767
echo "type=controlplane" >> $GITHUB_OUTPUT
68-
echo "version=${TEST_TAG#cp-v}" >> $GITHUB_OUTPUT
68+
echo "version=${TEST_TAG#peng-v}" >> $GITHUB_OUTPUT
6969
elif [[ $TEST_TAG == sdk-v* ]]; then
7070
echo "type=sdk" >> $GITHUB_OUTPUT
7171
echo "version=${TEST_TAG#sdk-v}" >> $GITHUB_OUTPUT
@@ -79,9 +79,9 @@ jobs:
7979
if [[ $TAG == cli-v* ]]; then
8080
echo "type=cli" >> $GITHUB_OUTPUT
8181
echo "version=${TAG#cli-v}" >> $GITHUB_OUTPUT
82-
elif [[ $TAG == cp-v* ]]; then
82+
elif [[ $TAG == peng-v* ]]; then
8383
echo "type=controlplane" >> $GITHUB_OUTPUT
84-
echo "version=${TAG#cp-v}" >> $GITHUB_OUTPUT
84+
echo "version=${TAG#peng-v}" >> $GITHUB_OUTPUT
8585
elif [[ $TAG == sdk-v* ]]; then
8686
echo "type=sdk" >> $GITHUB_OUTPUT
8787
echo "version=${TAG#sdk-v}" >> $GITHUB_OUTPUT
@@ -116,16 +116,16 @@ jobs:
116116
echo "No CLI changelog found"
117117
fi
118118
119-
# Check Control Plane changelog
120-
echo "Checking for Control Plane changelog at: releases/controlplane/versions/${VERSION}.md"
121-
if [ -f "releases/controlplane/versions/${VERSION}.md" ]; then
122-
echo "has_controlplane=true" >> $GITHUB_OUTPUT
123-
echo "Found Control Plane changelog"
119+
# Check Plan Engine changelog
120+
echo "Checking for Plan Engine changelog at: releases/planengine/versions/${VERSION}.md"
121+
if [ -f "releases/planengine/versions/${VERSION}.md" ]; then
122+
echo "has_planengine=true" >> $GITHUB_OUTPUT
123+
echo "Found Plan Engine changelog"
124124
echo "Content:"
125-
cat "releases/controlplane/versions/${VERSION}.md"
125+
cat "releases/planengine/versions/${VERSION}.md"
126126
else
127-
echo "has_controlplane=false" >> $GITHUB_OUTPUT
128-
echo "No Control Plane changelog found"
127+
echo "has_planengine=false" >> $GITHUB_OUTPUT
128+
echo "No Plan Engine changelog found"
129129
fi
130130
131131
# Check SDK changelog
@@ -143,7 +143,7 @@ jobs:
143143
# Debug output all flags
144144
echo "Final output flags:"
145145
echo "has_cli: $(cat $GITHUB_OUTPUT | grep has_cli || echo 'not set')"
146-
echo "has_controlplane: $(cat $GITHUB_OUTPUT | grep has_controlplane || echo 'not set')"
146+
echo "has_planengine: $(cat $GITHUB_OUTPUT | grep has_planengine || echo 'not set')"
147147
echo "has_sdk: $(cat $GITHUB_OUTPUT | grep has_sdk || echo 'not set')"
148148
149149
build-cli:
@@ -279,7 +279,7 @@ jobs:
279279
if [ "$RELEASE_TYPE" = "full" ]; then
280280
# Only add notes if the component has changes
281281
[ "${{ needs.prepare-release.outputs.has_cli }}" = "true" ] && add_component_notes "cli" "$VERSION" || echo "Skipping CLI notes"
282-
[ "${{ needs.prepare-release.outputs.has_controlplane }}" = "true" ] && add_component_notes "controlplane" "$VERSION" || echo "Skipping Control Plane notes" # Fixed from control-plane to controlplane
282+
[ "${{ needs.prepare-release.outputs.has_planengine }}" = "true" ] && add_component_notes "controlplane" "$VERSION" || echo "Skipping Plan Engine notes" # Fixed from control-plane to controlplane
283283
[ "${{ needs.prepare-release.outputs.has_sdk }}" = "true" ] && add_component_notes "sdks" "$VERSION" || echo "Skipping SDK notes"
284284
else
285285
add_component_notes "$RELEASE_TYPE" "$VERSION"
@@ -333,7 +333,7 @@ jobs:
333333
run: |
334334
# Create all changelog directories
335335
mkdir -p releases/cli
336-
mkdir -p releases/controlplane
336+
mkdir -p releases/planengine
337337
mkdir -p releases/sdks
338338
339339
# CLI Changelog
@@ -342,10 +342,10 @@ jobs:
342342
find "releases/cli/versions" -name "*.md" -type f -print0 | sort -zr | xargs -0 -I {} bash -c 'cat {} >> releases/cli/CHANGELOG.md; echo "" >> releases/cli/CHANGELOG.md'
343343
fi
344344

345-
# Control Plane Changelog
346-
echo "# Control Plane Changelog" > releases/controlplane/CHANGELOG.md
347-
if [ -d "releases/controlplane/versions" ]; then
348-
find "releases/controlplane/versions" -name "*.md" -type f -print0 | sort -zr | xargs -0 -I {} bash -c 'cat {} >> releases/controlplane/CHANGELOG.md; echo "" >> releases/controlplane/CHANGELOG.md'
345+
# Plan Engine Changelog
346+
echo "# Plan Engine Changelog" > releases/planengine/CHANGELOG.md
347+
if [ -d "releases/planengine/versions" ]; then
348+
find "releases/planengine/versions" -name "*.md" -type f -print0 | sort -zr | xargs -0 -I {} bash -c 'cat {} >> releases/planengine/CHANGELOG.md; echo "" >> releases/planengine/CHANGELOG.md'
349349
fi
350350

351351
# SDK Changelog

CONTRIBUTING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ If you are a first-time contributor and want some help getting started, feel fre
88

99
* Ezo Saleh - [e@orra.dev](mailto:e@orra.dev?subject=Orra Contribution Help)
1010

11-
## Temporary Guide for Contributions in Private Alpha
12-
13-
* Contributions are by invitation only as determined by the core maintainers.
14-
* Write access to the repo will be made available temporarily and removed after the PR is merged.
15-
* Aside from the Fork+Pull model, please follow the [normal contributions guide](#guide-for-contributions).
16-
1711
## Guide for Contributions
1812

1913
* We use the usual Fork+Pull model (more info here: [https://help.github.com/articles/using-pull-requests/](https://help.github.com/articles/using-pull-requests/))

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ The Plan Engine ensures:
224224

225225
- 🛒 [E-commerce AI Assistant (JavaScript)](examples/ecommerce-agent-app) - E-commerce customer service with a delivery specialized agent
226226
- 👻 [Ghostwriters (Python)](examples/crewai-ghostwriters) - Content generation example showcasing how to use Orra with [CrewAI](https://www.crewai.com) 🆕🎉
227-
- 📣 [Echo Service (JavaScript)](examples/echo-js) - Simple example showing core concepts using JS
228-
- 📣 [Echo Service (Python)](examples/echo-python) - Simple example showing core concepts using Python
227+
- 📣 [Echo Tools as Service (JavaScript)](examples/echo-js) - Simple example showing core concepts using JS
228+
- 📣 [Echo Tools as Service (Python)](examples/echo-python) - Simple example showing core concepts using Python
229229

230230
### Docs and Guides
231231

@@ -252,7 +252,7 @@ The Plan Engine ensures:
252252
**Connect With Us:**
253253

254254
- [GitHub Discussions](https://github.com/orra-dev/orra/discussions) - Share your experience and ideas
255-
- Office Hours - Weekly calls with the team
255+
- [Office Hours](https://cal.com/orra-dev/office-hours) - Weekly calls with the team every Friday
256256

257257
## License
258258

cli/cmd/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ func newConfigCmd(opts *CliOpts) *cobra.Command {
3030
func newResetConfigCmd(opts *CliOpts) *cobra.Command {
3131
return &cobra.Command{
3232
Use: "reset",
33-
Short: "Reset existing config",
34-
Long: "Reset config after control plane restart",
33+
Short: "Reset existing orra config",
34+
Long: "Hard reset of all orra config",
3535
RunE: func(cmd *cobra.Command, args []string) error {
3636
if err := config.ResetConfig(opts.ConfigPath); err != nil {
3737
return fmt.Errorf("failed to save config: %w", err)

cli/cmd/projects.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func newProjectCreateCmd(opts *CliOpts) *cobra.Command {
3535
cmd := &cobra.Command{
3636
Use: "add [name]",
3737
Short: "Add a new project",
38-
Long: `Add a new project so the control plane can orchestrate your app.`,
38+
Long: `Add a new project so the Plan Engine can coordinate your multi-agent application.`,
3939
Args: cobra.ExactArgs(1),
4040
RunE: func(cmd *cobra.Command, args []string) error {
4141
projectName := args[0]
@@ -44,29 +44,29 @@ func newProjectCreateCmd(opts *CliOpts) *cobra.Command {
4444
}
4545

4646
if serverAddr == "" {
47-
serverAddr = DefaultControlPlaneServerAddr
47+
serverAddr = DefaultPlanEngineServerAddr
4848
}
4949

5050
if _, exists := opts.Config.Projects[projectName]; exists {
5151
return fmt.Errorf("project name %s already exists", projectName)
5252
}
5353

54-
// Create project in control plane (includes initial API key)
54+
// Add project to Plan Engine (includes initial API key)
5555
client := opts.ApiClient.SetBaseUrl(serverAddr)
5656
ctx, cancel := context.WithTimeout(cmd.Context(), client.GetTimeout())
5757
defer cancel()
5858

59-
project, err := client.CreateProject(ctx, projectName)
59+
project, err := client.AddProject(ctx, projectName)
6060
if err != nil {
61-
return fmt.Errorf("failed to create project - %w", err)
61+
return fmt.Errorf("failed to add project - %w", err)
6262
}
6363

64-
if err := config.SaveNewProject(opts.ConfigPath, projectName, project.ID, project.CliAPIKey, serverAddr); err != nil {
64+
if err := config.AddNewProject(opts.ConfigPath, projectName, project.ID, project.CliAPIKey, serverAddr); err != nil {
6565
return fmt.Errorf("failed to save new project config: %w", err)
6666
}
6767

68-
fmt.Printf("Project %s created successfully\n\n", projectName)
69-
fmt.Println("To orchestrate your app:")
68+
fmt.Printf("Project %s added successfully\n\n", projectName)
69+
fmt.Println("To coordinate your project:")
7070
fmt.Println(" orra webhooks add [valid webhook url]")
7171
fmt.Println(" orra api-keys gen [api key name]")
7272
return nil

cli/cmd/root.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import (
1717
)
1818

1919
const (
20-
DefaultControlPlaneServerAddr = "http://localhost:8005"
21-
CurrentMarker = "*"
22-
ListMarker = "-"
20+
DefaultPlanEngineServerAddr = "http://localhost:8005"
21+
CurrentMarker = "*"
22+
ListMarker = "-"
2323
)
2424

2525
type CliOpts struct {

cli/cmd/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func newVersionCmd(_ *CliOpts) *cobra.Command {
1717
Use: "version",
1818
Short: "Print the client and server version information",
1919
RunE: func(cmd *cobra.Command, args []string) error {
20-
fmt.Println("Client Version: v0.2.1")
20+
fmt.Println("Client Version: v0.2.2")
2121
// TODO: Implement server version check
2222
return nil
2323
},

cli/internal/api/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Webhook struct {
3030
Url string `json:"url"`
3131
}
3232

33-
// Client manages communication with the control plane API
33+
// Client manages communication with the plan engine API
3434
type Client struct {
3535
baseURL string
3636
apiKey string
@@ -260,7 +260,7 @@ func (c *Client) GetTimeout() time.Duration {
260260
return c.httpClient.Timeout
261261
}
262262

263-
func (c *Client) CreateProject(ctx context.Context, name string) (*Project, error) {
263+
func (c *Client) AddProject(ctx context.Context, name string) (*Project, error) {
264264
var project Project
265265
var apiErr ErrorResponse
266266

cli/internal/config/config.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ type Config struct {
2727
}
2828

2929
const (
30-
defaultControlPlaneServer = "http://localhost:8005"
31-
defaultConfigDir = ".orra"
32-
defaultConfigFile = "config.json"
33-
dirPerm = 0755 // rwxr-xr-x
34-
filePerm = 0666
30+
defaultPlanEngineServer = "http://localhost:8005"
31+
defaultConfigDir = ".orra"
32+
defaultConfigFile = "config.json"
33+
dirPerm = 0755 // rwxr-xr-x
34+
filePerm = 0666
3535
)
3636

3737
func getDefaultConfigPath() (string, error) {
@@ -99,7 +99,7 @@ func GetProject(config *Config, projectName string) (*ProjectConfig, string, err
9999
return nil, "", fmt.Errorf("current project %s not found", config.CurrentProject)
100100
}
101101

102-
func SaveNewProject(configPath, projectName, projectID, cliAPIKey, serverAddr string) error {
102+
func AddNewProject(configPath, projectName, projectID, cliAPIKey, serverAddr string) error {
103103
if configPath == "" {
104104
var err error
105105
configPath, err = getDefaultConfigPath()
@@ -114,7 +114,7 @@ func SaveNewProject(configPath, projectName, projectID, cliAPIKey, serverAddr st
114114
}
115115

116116
if serverAddr == "" {
117-
serverAddr = defaultControlPlaneServer
117+
serverAddr = defaultPlanEngineServer
118118
}
119119

120120
config.Projects[projectName] = ProjectConfig{

docs/actions.md

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

33
## Understanding Actions
44

5-
Actions are high-level instructions that Orra's control plane decomposes into tasks that execute against selected services and agents to complete a job. Think of actions as user/machine jobs that need to be fulfilled by your system.
5+
Actions are high-level instructions that Orra's Plan Engine decomposes into tasks that execute against selected services, tools as services and agents to complete a job. Think of actions as user/machine jobs that need to be fulfilled by your system.
66

77
## Submitting Actions
88

@@ -19,7 +19,7 @@ orra verify run "Estimate order delivery and notify customer" \
1919
-d orderId:ORD456 \
2020
-d customerId:ABC123
2121

22-
# Specify webhook for results (assumes the control plane is running with docker compose)
22+
# Specify webhook for results (assumes the Plane Engine is running with docker compose)
2323
orra verify run "Process refund request ensuring it is not fraudulent" \
2424
-w http://host.docker.internal:3000/webhooks/results \
2525
-d orderId:ORD789
@@ -199,10 +199,10 @@ orra inspect o_fdhdhjhashah
199199
}
200200
```
201201

202-
This orchestration might involve multiple services:
202+
This orchestration might involve multiple services, tools as services and agents:
203203
- Payment processing service
204-
- Inventory management service
204+
- Inventory management tool as a service
205205
- Delivery scheduling agent
206-
- Customer notification service
206+
- Customer notification tool as a service
207207

208-
Orra handles the complexity of coordinating these services while you focus on implementing their core logic.
208+
Orra handles the complexity of coordinating these components while you focus on implementing their core logic.

0 commit comments

Comments
 (0)