@pilllesss/yorn 1.0.17 → 1.0.18
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pilllesss/yorn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "Yorn terminal AI coding agent CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"clean": "shx rm -rf dist",
|
|
21
21
|
"generate-models": "tsx scripts/generate-models.ts --strict",
|
|
22
22
|
"hydrate-model-data": "tsx scripts/generate-models.ts --strict --data-only",
|
|
23
|
-
"copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/providers/data && shx cp -r src/ai/providers/data/. dist/providers/data && shx mkdir -p dist/skills && shx cp -r src/skills/
|
|
23
|
+
"copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/providers/data && shx cp -r src/ai/providers/data/. dist/providers/data && shx mkdir -p dist/skills && shx cp -r src/skills/screenshot src/skills/security-best-practices src/skills/graphify src/skills/agent-browser src/skills/frontend-design src/skills/theme-factory src/skills/add-provider dist/skills",
|
|
24
24
|
"build": "npm run generate-models && node scripts/build.mjs && npm run copy-assets",
|
|
25
25
|
"prepublishOnly": "npm run build",
|
|
26
26
|
"yorn": "tsx src/yorn.ts"
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: goal
|
|
3
|
-
description: Manage the persistent thread goal from IPython. Use to read goal status and budget usage, to start a goal when the user explicitly asks for one, or to mark the active goal complete once its objective is fully achieved.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Goal
|
|
7
|
-
|
|
8
|
-
The thread goal is a persistent objective the harness keeps re-prompting you to
|
|
9
|
-
pursue across turns until it is complete. Goal state (status, token budget,
|
|
10
|
-
usage accounting) lives in the host; this skill is the kernel-side interface to
|
|
11
|
-
it. Call it directly from IPython:
|
|
12
|
-
|
|
13
|
-
```python
|
|
14
|
-
await goal.get()
|
|
15
|
-
await goal.create("ship the release notes", token_budget=200000)
|
|
16
|
-
await goal.complete()
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## API
|
|
20
|
-
|
|
21
|
-
- `await goal.get()` — current goal as a dict: `goal` (or `None` when no goal
|
|
22
|
-
is set), `remaining_tokens`, and `completion_budget_report`. The `goal` dict
|
|
23
|
-
carries `objective`, `status`, `token_budget`, `tokens_used`,
|
|
24
|
-
`time_used_seconds`, and timestamps.
|
|
25
|
-
- `await goal.create(objective, token_budget=None)` — start a new active goal.
|
|
26
|
-
Fails while a goal is still pending (active, paused, or budget-limited); a
|
|
27
|
-
completed or errored goal is replaced by the new one. Only create a goal when
|
|
28
|
-
the user or system/developer instructions explicitly ask for a persistent
|
|
29
|
-
long-running goal; do not infer goals from ordinary tasks. Set `token_budget`
|
|
30
|
-
only when an explicit token budget is requested.
|
|
31
|
-
- `await goal.complete()` — mark the existing goal achieved. Use only when the
|
|
32
|
-
objective has actually been achieved and no required work remains; do not
|
|
33
|
-
call it merely because the budget is nearly exhausted or because you are
|
|
34
|
-
stopping work. When the result includes a `completion_budget_report`, report
|
|
35
|
-
that final usage to the user.
|
|
36
|
-
|
|
37
|
-
## Rules
|
|
38
|
-
|
|
39
|
-
- Goal status transitions other than completion (pause, resume, clear,
|
|
40
|
-
budget-limiting) are controlled by the user and the host; there is no API for
|
|
41
|
-
them here.
|
|
42
|
-
- When an active goal is actually complete, call `await goal.complete()`; do
|
|
43
|
-
not merely say it is done — the harness keeps continuing the goal until the
|
|
44
|
-
completion call arrives.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Kernel-side package for the bundled goal skill. It only talks to the host
|
|
2
|
-
# through rlm.host_request; prime-agent-runtime is always installed in the
|
|
3
|
-
# kernel venv before skills, so it is intentionally not declared as a
|
|
4
|
-
# dependency (it is not published on PyPI).
|
|
5
|
-
[project]
|
|
6
|
-
name = "goal"
|
|
7
|
-
version = "0.1.0"
|
|
8
|
-
description = "Prime Agent goal skill: persistent thread goal control over the host bridge"
|
|
9
|
-
requires-python = ">=3.10"
|
|
10
|
-
dependencies = []
|
|
11
|
-
|
|
12
|
-
[build-system]
|
|
13
|
-
requires = ["hatchling"]
|
|
14
|
-
build-backend = "hatchling.build"
|
|
15
|
-
|
|
16
|
-
[tool.hatch.build.targets.wheel]
|
|
17
|
-
packages = ["src/goal"]
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"""Prime Agent goal skill: manage the persistent thread goal from the kernel.
|
|
2
|
-
|
|
3
|
-
All goal state lives in the TypeScript host; these functions are thin typed
|
|
4
|
-
wrappers over the generic host bridge (`rlm.host_request`). They only work
|
|
5
|
-
inside the Prime Agent IPython kernel.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from __future__ import annotations
|
|
9
|
-
|
|
10
|
-
from typing import Any
|
|
11
|
-
|
|
12
|
-
from rlm import host_request
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
async def get() -> dict[str, Any]:
|
|
16
|
-
"""Read the current thread goal.
|
|
17
|
-
|
|
18
|
-
Returns a dict with `goal` (None when no goal is set), `remaining_tokens`,
|
|
19
|
-
and `completion_budget_report`. The `goal` dict carries the objective,
|
|
20
|
-
status, token budget, and token/elapsed-time usage.
|
|
21
|
-
"""
|
|
22
|
-
return await host_request("goal.get")
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
async def create(objective: str, token_budget: int | None = None) -> dict[str, Any]:
|
|
26
|
-
"""Start a new active thread goal.
|
|
27
|
-
|
|
28
|
-
Fails while a goal is still pending (active, paused, or budget-limited);
|
|
29
|
-
a completed or errored goal is replaced. Only create a goal when the user
|
|
30
|
-
or system/developer instructions explicitly ask for a persistent
|
|
31
|
-
long-running goal. Set `token_budget` only when an explicit token budget is
|
|
32
|
-
requested.
|
|
33
|
-
"""
|
|
34
|
-
if not isinstance(objective, str):
|
|
35
|
-
raise TypeError(f"objective must be str, got {type(objective).__name__}")
|
|
36
|
-
if token_budget is not None and not isinstance(token_budget, int):
|
|
37
|
-
raise TypeError(f"token_budget must be int or None, got {type(token_budget).__name__}")
|
|
38
|
-
payload: dict[str, Any] = {"objective": objective}
|
|
39
|
-
if token_budget is not None:
|
|
40
|
-
payload["token_budget"] = token_budget
|
|
41
|
-
return await host_request("goal.create", payload)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
async def complete() -> dict[str, Any]:
|
|
45
|
-
"""Mark the existing thread goal achieved.
|
|
46
|
-
|
|
47
|
-
Use only when the objective has actually been achieved and no required
|
|
48
|
-
work remains — not because the budget is nearly exhausted or because you
|
|
49
|
-
are stopping work. Pause, resume, and budget-limit transitions are
|
|
50
|
-
controlled by the user and the host.
|
|
51
|
-
"""
|
|
52
|
-
return await host_request("goal.complete")
|