robisie 0.2.0 → 0.2.1
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/CHANGELOG.md +16 -0
- package/dist/commands.js +5 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/disk-guard.d.ts +20 -0
- package/dist/disk-guard.js +63 -0
- package/dist/engine/bundle-report.json +11 -11
- package/dist/engine/tick.cjs +465 -382
- package/dist/k3-codex-role.js +4 -1
- package/dist/k3-helper-cli.js +28 -2
- package/dist/roles.d.ts +1 -1
- package/docs/README.en.md +5 -3
- package/docs/README.md +5 -3
- package/docs/RELEASE-0.1.0.md +1 -0
- package/package.json +1 -1
package/dist/k3-codex-role.js
CHANGED
|
@@ -52,7 +52,10 @@ export function runK3CodexRole(bundle, options, spawn = spawnSync) {
|
|
|
52
52
|
}
|
|
53
53
|
const argv = ["exec", "--json", "--ephemeral", "--skip-git-repo-check", "--ignore-user-config", "--ignore-rules",
|
|
54
54
|
"--model", bundle.execution.model, "-c", `model_reasoning_effort=${JSON.stringify(bundle.execution.effort)}`,
|
|
55
|
-
"-C", options.cwd,
|
|
55
|
+
"-C", options.cwd,
|
|
56
|
+
"-s", options.sandbox,
|
|
57
|
+
...(options.sandbox === "workspace-write" ? ["-c", "sandbox_workspace_write.writable_roots=[]",
|
|
58
|
+
"-c", "sandbox_workspace_write.exclude_slash_tmp=true"] : []), "-"];
|
|
56
59
|
let result;
|
|
57
60
|
try {
|
|
58
61
|
result = spawn(options.binary, argv, { input: bundle.instructions, encoding: "utf8", cwd: options.cwd,
|
package/dist/k3-helper-cli.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import { accessSync, constants, lstatSync, mkdirSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
2
3
|
import { basename, delimiter, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
3
4
|
import { fileURLToPath } from "node:url";
|
|
4
5
|
import { cancelK3CodexJob, readK3CodexJob, startK3CodexJob } from "./k3-codex-job.js";
|
|
@@ -42,6 +43,23 @@ function repositoryRoot(cwd) {
|
|
|
42
43
|
return cwd;
|
|
43
44
|
}
|
|
44
45
|
}
|
|
46
|
+
function gitWorktreePaths(root, cwd, env) {
|
|
47
|
+
const marker = lstatSync(join(root, ".git"), { throwIfNoEntry: false });
|
|
48
|
+
if (!marker || marker.isDirectory())
|
|
49
|
+
return undefined;
|
|
50
|
+
if (!marker.isFile())
|
|
51
|
+
invalid();
|
|
52
|
+
// Metadata must describe cwd, never a Git context injected through the environment.
|
|
53
|
+
const gitEnv = { ...env };
|
|
54
|
+
for (const key of Object.keys(gitEnv))
|
|
55
|
+
if (key.startsWith("GIT_"))
|
|
56
|
+
delete gitEnv[key];
|
|
57
|
+
const gitPath = (flag) => realpathSync(execFileSync("git", ["rev-parse", "--path-format=absolute", flag], {
|
|
58
|
+
cwd, env: gitEnv, encoding: "utf8", timeout: 5000, maxBuffer: 64 * 1024, stdio: ["ignore", "pipe", "ignore"],
|
|
59
|
+
}).replace(/\r?\n$/, ""));
|
|
60
|
+
const gitDir = gitPath("--git-dir"), commonDir = gitPath("--git-common-dir");
|
|
61
|
+
return { gitDir, commonDir };
|
|
62
|
+
}
|
|
45
63
|
function executable(path) {
|
|
46
64
|
if (!statSync(path).isFile())
|
|
47
65
|
invalid("EACCES");
|
|
@@ -118,7 +136,8 @@ export async function runK3HelperCli(args, env = process.env) {
|
|
|
118
136
|
const cwd = realpathSync(resolve(values.get("--cwd") ?? process.cwd()));
|
|
119
137
|
if (!statSync(cwd).isDirectory())
|
|
120
138
|
invalid();
|
|
121
|
-
const
|
|
139
|
+
const root = repositoryRoot(cwd);
|
|
140
|
+
const stateRelative = relative(root, physical(stateDir));
|
|
122
141
|
if (!stateRelative || (!stateRelative.startsWith(`..${sep}`) && stateRelative !== ".." && !isAbsolute(stateRelative)))
|
|
123
142
|
invalid();
|
|
124
143
|
if (probe) {
|
|
@@ -136,6 +155,13 @@ export async function runK3HelperCli(args, env = process.env) {
|
|
|
136
155
|
const instructions = readFileSync(resolve(cwd, values.get("--prompt-file")), "utf8");
|
|
137
156
|
if (!instructions.trim())
|
|
138
157
|
invalid();
|
|
158
|
+
const discoveredGit = gitWorktreePaths(root, cwd, env);
|
|
159
|
+
if (discoveredGit)
|
|
160
|
+
for (const gitRoot of [discoveredGit.gitDir, discoveredGit.commonDir]) {
|
|
161
|
+
const stateRelative = relative(gitRoot, physical(stateDir));
|
|
162
|
+
if (!stateRelative || (!stateRelative.startsWith(`..${sep}`) && stateRelative !== ".." && !isAbsolute(stateRelative)))
|
|
163
|
+
invalid();
|
|
164
|
+
}
|
|
139
165
|
const handle = await startK3CodexJob({ disposition: "READY", instructions,
|
|
140
166
|
execution: { provider: "codex", model: values.get("--model"), effort: values.get("--effort") } }, { binary, cwd, env: { ...env, CODEX_HOME: codexHome }, sandbox: values.has("--write") ? "workspace-write" : "read-only",
|
|
141
167
|
timeoutMs: 2700000 }, stateDir);
|
package/dist/roles.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface Role {
|
|
|
17
17
|
export declare function rolesDir(): string;
|
|
18
18
|
export declare function parseRole(file: Role["file"], text: string): Role;
|
|
19
19
|
export declare function loadRoles(dir?: string): Role[];
|
|
20
|
-
export declare const MANAGED_LINE = "<!-- robisie:managed 0.2.
|
|
20
|
+
export declare const MANAGED_LINE = "<!-- robisie:managed 0.2.1 \u2014 plik zarz\u0105dzany przez `npx robisie`; `npx robisie uninstall` go usunie -->";
|
|
21
21
|
export type AgentFlavor = "claude" | "codex" | "opencode";
|
|
22
22
|
/** How the operator starts the Builder for one card in its own session (the card id is not a secret). */
|
|
23
23
|
export declare function builderStartCommand(flavor: AgentFlavor, codexRolePath?: string): string;
|
package/docs/README.en.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# robisie — from account to accepted card (package 0.2.
|
|
1
|
+
# robisie — from account to accepted card (package 0.2.1)
|
|
2
2
|
|
|
3
3
|
Polski: [README.md](README.md).
|
|
4
4
|
|
|
@@ -19,6 +19,8 @@ The human prepares Node.js 24+ (release used for checks: 24.3.0), npm, internet
|
|
|
19
19
|
|
|
20
20
|
Prepare an empty directory on disk. You do not need a website or your own `package.json`; the Node.js step below creates it before installation. This is the agents' working directory, separate from the dashboard project.
|
|
21
21
|
|
|
22
|
+
The client engine HOLDs work when free space on the installation volume falls below **15 GiB**. Clearing an active HOLD needs **18 GiB** free (hysteresis) — in the 15–18 GiB band a fresh admission is allowed, but an active HOLD does not clear. `npx robisie doctor` prints the measured free space and both thresholds.
|
|
23
|
+
|
|
22
24
|
<!-- sekcja: konto -->
|
|
23
25
|
<a id="konto"></a>
|
|
24
26
|
## Account and first project
|
|
@@ -214,7 +216,7 @@ The human runs this in a terminal with the correct environment, in the installat
|
|
|
214
216
|
npx robisie doctor
|
|
215
217
|
```
|
|
216
218
|
|
|
217
|
-
Doctor checks the contract, project reads, configuration, roles, helper startup
|
|
219
|
+
Doctor checks the contract, project reads, configuration, roles, helper startup, `ROBISIE_KEY`, and free disk on the installation volume. For disk it prints HOLD below 15 GiB and unblock hysteresis from 18 GiB; below 15 GiB it exits 1. It shows the map: null or mixed assignments give exit 1; return to the complete shared-provider assignment in init. “Wszystko działa” means those checks passed, without proving the whole work loop.
|
|
218
220
|
|
|
219
221
|
Doctor runs the helper file via node, the agent via npx. `ROBISIE_PROJECT_CONTEXT` selects context later and does not change cwd for package lookup. Start the agent in the installation directory and ask it to list available tools from BOTH servers: `client-launch-context` (`get_launch_context`, `get_project_context`, `run_project_check`, `prepare_review`, `create_review_receipt`, `verify_stored_review`) and `ceo-client-launcher` (`spawn_builder`, `verify_review_receipt`). Result: both servers available with all these tools in that session. Do not call spawn_builder just as a probe. If a helper is missing, return to the installation cwd, check the local version and configuration, run init/doctor, then start a fresh agent session. Doctor alone does not confirm provider tool availability.
|
|
220
222
|
|
|
@@ -447,7 +449,7 @@ CLI messages remain in Polish. Match the message, then follow the English explan
|
|
|
447
449
|
Generate a new worker key; in zsh/bash run `unset ROBISIE_KEY`, then init with the hidden prompt.
|
|
448
450
|
- **brak-odczytu** — `Ten klucz nie ma uprawnień do odczytu tablicy (np. rola seeder).`
|
|
449
451
|
Select worker in Connect; `unset ROBISIE_KEY`, then init with the hidden prompt.
|
|
450
|
-
- **major** — `Wersja kontraktu serwera (2.0.0) nie pasuje do paczki robisie 0.2.
|
|
452
|
+
- **major** — `Wersja kontraktu serwera (2.0.0) nie pasuje do paczki robisie 0.2.1 (obsługuje 1.x).`
|
|
451
453
|
Example of a MAJOR mismatch: install a release compatible with the server contract.
|
|
452
454
|
- **brak-env** — `Zmienna ROBISIE_KEY nie jest ustawiona — role i agenci jej potrzebują.`
|
|
453
455
|
Check profile support; with --no-shell/another shell load the key file into the session environment as shown in init, then doctor.
|
package/docs/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# robisie — od konta do odebranej karty (paczka 0.2.
|
|
1
|
+
# robisie — od konta do odebranej karty (paczka 0.2.1)
|
|
2
2
|
|
|
3
3
|
English: [README.en.md](README.en.md).
|
|
4
4
|
|
|
@@ -21,6 +21,8 @@ Człowiek przygotowuje Node.js 24+ (wydanie użyte przy sprawdzeniach: 24.3.0),
|
|
|
21
21
|
|
|
22
22
|
Przygotuj pusty katalog na dysku. Nie potrzebujesz strony ani własnego pliku `package.json`; przed instalacją utworzy go poniższy krok Node.js. To katalog pracy agentów, niezależny od projektu w panelu.
|
|
23
23
|
|
|
24
|
+
Silnik klienta wstrzymuje pracę (HOLD) gdy wolne miejsce na wolumenie instalacji spadnie poniżej **15 GiB**. Odblokowanie aktywnego HOLD wymaga histerezy **18 GiB** wolnego — w paśmie 15–18 GiB nowe wejście jest dopuszczone, ale aktywny HOLD nie znika. `npx robisie doctor` pokazuje zmierzoną wartość oraz oba progi.
|
|
25
|
+
|
|
24
26
|
<!-- sekcja: konto -->
|
|
25
27
|
<a id="konto"></a>
|
|
26
28
|
## Konto i pierwszy projekt
|
|
@@ -214,7 +216,7 @@ Człowiek w terminalu z poprawnym środowiskiem, w katalogu instalacji:
|
|
|
214
216
|
npx robisie doctor
|
|
215
217
|
```
|
|
216
218
|
|
|
217
|
-
Doctor sprawdza kontrakt, odczyt projektów, konfigurację, role, start pomocników
|
|
219
|
+
Doctor sprawdza kontrakt, odczyt projektów, konfigurację, role, start pomocników, `ROBISIE_KEY` oraz wolne miejsce na dysku instalacji. Przy dysku wypisuje HOLD poniżej 15 GiB i histerezę odblokowania od 18 GiB; poniżej 15 GiB kończy się exit 1. Pokazuje mapę: null lub mieszana mapa daje exit 1; wróć do pełnego przypisania jednego dostawcy w sekcji init. „Wszystko działa” oznacza powodzenie tych kontroli, nie pełnej pętli pracy.
|
|
218
220
|
|
|
219
221
|
Doctor uruchamia plik pomocnika przez node, agent przez npx. `ROBISIE_PROJECT_CONTEXT` wybiera kontekst później i nie zmienia cwd szukania paczki. Uruchom agenta w katalogu instalacji i poproś o wyświetlenie dostępnych narzędzi OBU serwerów: `client-launch-context` (`get_launch_context`, `get_project_context`, `run_project_check`, `prepare_review`, `create_review_receipt`, `verify_stored_review`) oraz `ceo-client-launcher` (`spawn_builder`, `verify_review_receipt`). Wynik: oba serwery dostępne z kompletem tych narzędzi w sesji. Nie uruchamiaj spawn_builder tylko dla próby. Przy braku pomocnika wróć do cwd instalacji, sprawdź lokalną wersję i konfigurację, uruchom init/doctor, potem nową sesję agenta. Sam doctor nie potwierdza dostępności narzędzi u dostawcy.
|
|
220
222
|
|
|
@@ -447,7 +449,7 @@ Komunikaty CLI pozostają po polsku. Dopasuj komunikat, a potem wykonaj wskazan
|
|
|
447
449
|
Wygeneruj nowy klucz worker; w zsh/bash wykonaj `unset ROBISIE_KEY`, potem init z ukrytym pytaniem.
|
|
448
450
|
- **brak-odczytu** — `Ten klucz nie ma uprawnień do odczytu tablicy (np. rola seeder).`
|
|
449
451
|
Wybierz worker w Connect; `unset ROBISIE_KEY`, potem init z ukrytym pytaniem.
|
|
450
|
-
- **major** — `Wersja kontraktu serwera (2.0.0) nie pasuje do paczki robisie 0.2.
|
|
452
|
+
- **major** — `Wersja kontraktu serwera (2.0.0) nie pasuje do paczki robisie 0.2.1 (obsługuje 1.x).`
|
|
451
453
|
Przykład niezgodnego MAJOR: zainstaluj wydanie zgodne z kontraktem serwera.
|
|
452
454
|
- **brak-env** — `Zmienna ROBISIE_KEY nie jest ustawiona — role i agenci jej potrzebują.`
|
|
453
455
|
Sprawdź obsługę profilu; przy --no-shell/innej powłoce wczytaj plik klucza do środowiska sesji jak w init, potem doctor.
|
package/docs/RELEASE-0.1.0.md
CHANGED
package/package.json
CHANGED