summaryrefslogtreecommitdiff
path: root/core/ninep/ctl.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-19 11:42:48 -0300
committerGabriel Schneider <[email protected]>2026-11-19 11:42:48 -0300
commit71d8744b41dec56d835e30f531b96fede5d610a1 (patch)
tree31e2a06fdcfd467d12454cde8be5a477765701b5 /core/ninep/ctl.zig
parenteae5736ad923731135dd35b3783c90a3358bd0fa (diff)
parent4569aefd55d04f434f2e2ed5e6e4a511a414cdc7 (diff)
downloadpardes-71d8744b41dec56d835e30f531b96fede5d610a1.tar.gz
pardes-71d8744b41dec56d835e30f531b96fede5d610a1.zip
integration: the one client loop that the soak runs, with the tape as the handle a step is given: pardes-runners-b (10b: runtime/client.zig run by the terminal's client, the window's and the soak; a client's clipboard and links its own frontend's; an input sent before it is applied) and pardes-handle-1 (the handle's steps 0 to 2: p.tape, the directory listing and the file system read through the tape they are handed), merged without a conflict; gates in the coordinator's ledger
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/ninep/ctl.zig')
-rw-r--r--core/ninep/ctl.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/ninep/ctl.zig b/core/ninep/ctl.zig
index 81600582..a4f16597 100644
--- a/core/ninep/ctl.zig
+++ b/core/ninep/ctl.zig
@@ -571,7 +571,7 @@ fn checkBuiltin(p: *Pardes, req: Req, line: []const u8, scope: builtins.Scope) ?
.callstack_depth => arg.len == 0 or (std.fmt.parseInt(u8, arg, 10) catch 0) -% 1 < pardes.lsp.callstack_max_depth,
else => probe: {
var probe = p.settings;
- break :probe probe.apply(setting, if (arg.len > 0) arg else null, p.sessionHome());
+ break :probe probe.apply(p.tape, setting, if (arg.len > 0) arg else null, p.sessionHome());
},
};
if (takes) return null;
@@ -679,13 +679,13 @@ pub fn writePager(p: *Pardes, req: Req) Reply {
}
if (dir.len > 0) if (pardes.filesystem.localPath(dir)) |local| {
// A file there is no directory, ENOTDIR; nothing there, ENOENT.
- if (exec_line.kindOf(local) != .directory) {
- if (exec_line.kindOf(local) != null)
+ if (exec_line.kindOf(p.tape, local) != .directory) {
+ if (exec_line.kindOf(p.tape, local) != null)
return tree.failText(req.tag, E.NOTDIR, std.fmt.bufPrint(&p.fs.ename, "pager: {s}: not a directory", .{dir[0..@min(dir.len, 256)]}) catch &p.fs.ename); // cut to ename's 320
return tree.failText(req.tag, E.NOENT, std.fmt.bufPrint(&p.fs.ename, "pager: {s}: no such directory", .{dir[0..@min(dir.len, 256)]}) catch &p.fs.ename); // cut to ename's 320
}
// Nor one that may not be written, as a file's name there is refused.
- if (pardes.filesystem.deniedAbove(local))
+ if (p.tape.value(.denied, pardes.filesystem.deniedAbove, .{local}))
return tree.failText(req.tag, E.PERM, std.fmt.bufPrint(&p.fs.ename, "pager: {s}: permission denied", .{dir[0..@min(dir.len, 256)]}) catch &p.fs.ename); // cut to ename's 320
};
const id = pardes.panes.Output.openPager(p, p.view().active, dir) catch |err|
@@ -773,7 +773,7 @@ pub fn writeRoot(p: *Pardes, req: Req) Reply {
if (!apply) continue;
// ponytail: read on the 9P task, a small local file; a big
// one would want pardes.turn's yield.
- const bytes = fs.readFile(p.gpa, path) catch |err| return refuseQuoting(p, req, @errorName(err), path, "");
+ const bytes = fs.readFile(p.tape, p.gpa, path) catch |err| return refuseQuoting(p, req, @errorName(err), path, "");
defer p.gpa.free(bytes);
_ = pardes.Handover.adopt(p, bytes) catch |err| return refuseQuoting(p, req, @errorName(err), path, "");
continue;