@koi-language/koi 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -11
- package/package.json +4 -4
- package/src/cli/koi.js +14 -17
package/README.md
CHANGED
|
@@ -73,17 +73,20 @@ This will install KOI to `~/.koi` and add the `koi` command to your PATH.
|
|
|
73
73
|
|
|
74
74
|
## Editor Support
|
|
75
75
|
|
|
76
|
-
### VS Code
|
|
77
|
-
|
|
78
|
-
Get **syntax highlighting** and language support for `.koi` files:
|
|
76
|
+
### VS Code
|
|
79
77
|
|
|
80
78
|
```bash
|
|
81
|
-
#
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
# From the Koi repository root
|
|
80
|
+
ln -s "$(pwd)/vscode-koi-extension" ~/.vscode/extensions/koi-lang
|
|
81
|
+
# Restart VS Code
|
|
82
|
+
```
|
|
85
83
|
|
|
86
|
-
|
|
84
|
+
### Cursor
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# From the Koi repository root
|
|
88
|
+
ln -s "$(pwd)/vscode-koi-extension" ~/.cursor/extensions/koi-lang
|
|
89
|
+
# Restart Cursor
|
|
87
90
|
```
|
|
88
91
|
|
|
89
92
|
**Features:**
|
|
@@ -91,9 +94,9 @@ ln -s "$(pwd)" ~/.cursor/extensions/koi-lang # Cursor
|
|
|
91
94
|
- 🎨 Custom "Koi Dark" theme
|
|
92
95
|
- 🔤 Auto-closing brackets and quotes
|
|
93
96
|
- 📝 Special playbook highlighting
|
|
94
|
-
-
|
|
97
|
+
- 🔍 Go to Definition support
|
|
95
98
|
|
|
96
|
-
See [
|
|
99
|
+
**For more installation methods and troubleshooting:** See the [Editor Setup Guide](doc/00-editor-setup.md).
|
|
97
100
|
|
|
98
101
|
## GitHub Syntax Highlighting
|
|
99
102
|
|
|
@@ -530,8 +533,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
|
530
533
|
|
|
531
534
|
- **Documentation**: [doc/](doc/) - Comprehensive guides
|
|
532
535
|
- **Quick Start**: [QUICKSTART.md](QUICKSTART.md) - 2-minute setup
|
|
536
|
+
- **Editor Setup**: [doc/00-editor-setup.md](doc/00-editor-setup.md) - VS Code & Cursor
|
|
533
537
|
- **Examples**: [examples/](examples/) - Working code samples
|
|
534
|
-
- **VSCode Extension**: [vscode-koi-extension/](vscode-koi-extension/)
|
|
535
538
|
- **AI Assistant Guide**: [CLAUDE.md](CLAUDE.md) - Architecture and patterns
|
|
536
539
|
- **Syntax Highlighting**: [LINGUIST.md](LINGUIST.md) - GitHub support status
|
|
537
540
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koi-language/koi",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Koi - Agent-first language. Calm orchestration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/runtime/index.js",
|
|
@@ -65,14 +65,14 @@
|
|
|
65
65
|
"openai": "^6.16.0",
|
|
66
66
|
"peggy": "^5.0.6",
|
|
67
67
|
"source-map": "^0.7.6",
|
|
68
|
+
"tsx": "^4.21.0",
|
|
69
|
+
"typescript": "^5.9.3",
|
|
68
70
|
"ws": "^8.19.0"
|
|
69
71
|
},
|
|
70
72
|
"devDependencies": {
|
|
71
73
|
"@types/jest": "^30.0.0",
|
|
72
74
|
"@types/node": "^25.0.10",
|
|
73
75
|
"jest": "^30.2.0",
|
|
74
|
-
"ts-jest": "^29.4.6"
|
|
75
|
-
"tsx": "^4.21.0",
|
|
76
|
-
"typescript": "^5.9.3"
|
|
76
|
+
"ts-jest": "^29.4.6"
|
|
77
77
|
}
|
|
78
78
|
}
|
package/src/cli/koi.js
CHANGED
|
@@ -489,30 +489,27 @@ async function initProject(projectName) {
|
|
|
489
489
|
package "${projectName}"
|
|
490
490
|
|
|
491
491
|
role Worker { can execute }
|
|
492
|
-
role Lead { can delegate }
|
|
493
492
|
|
|
494
|
-
Agent
|
|
495
|
-
|
|
496
|
-
const name = args.name
|
|
497
|
-
return { message: "Hello from ${projectName}, " + name + "!" }
|
|
498
|
-
}
|
|
499
|
-
}
|
|
493
|
+
Agent Greeter : Worker {
|
|
494
|
+
llm default = { provider: "openai", model: "gpt-4o-mini" }
|
|
500
495
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
}
|
|
496
|
+
on greet(args: Json) {
|
|
497
|
+
playbook """
|
|
498
|
+
Generate a friendly and creative greeting for \${args.name}.
|
|
504
499
|
|
|
505
|
-
|
|
506
|
-
|
|
500
|
+
The greeting should:
|
|
501
|
+
- Start with "Hello"
|
|
502
|
+
- Include the person's name
|
|
503
|
+
- Add a motivational message or fun fact
|
|
504
|
+
- Be brief (2-3 sentences)
|
|
507
505
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
return result
|
|
506
|
+
Respond in JSON format:
|
|
507
|
+
{ "greeting": "your greeting here", "emoji": "an appropriate emoji" }
|
|
508
|
+
"""
|
|
512
509
|
}
|
|
513
510
|
}
|
|
514
511
|
|
|
515
|
-
run
|
|
512
|
+
run Greeter.greet({ name: "World" })
|
|
516
513
|
`;
|
|
517
514
|
|
|
518
515
|
fs.writeFileSync(path.join(projectPath, 'src', 'main.koi'), exampleCode);
|