Compare commits

..
27 changed files with 259 additions and 1210 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
{
"monorepoCommit": "099bb9f5d64bce50b20b6cb51d5333f009b8d418",
"monorepoCommit": "15b93e42825a3f8055f6305999a12c5b1cc73330",
"sourcePath": "quixos-instance/packages/todo-runtime"
}
+8
View File
@@ -0,0 +1,8 @@
{
"messages": {
"org.quixos.web-studio.SearchDocument": {
"module": "../messages.js",
"export": "searchDocumentBinding"
}
}
}
+6 -7
View File
@@ -1,14 +1,13 @@
# Generated by qx-scaffold-v1
package_id: "package:todo-runtime"
package_revision_id: "package:todo-runtime@1"
runtime_protocol_version: "quixos-capabilities-v1"
exports: { export_id: "export:todo-runtime:complete" runtime_symbol: "complete" }
exports: { export_id: "export:todo-runtime:reopen" runtime_symbol: "reopen" }
exports: { export_id: "export:todo-runtime:archive" runtime_symbol: "archive" }
exports: { export_id: "export:todo-runtime:display-label-get" runtime_symbol: "displayLabelGet" }
exports: { export_id: "export:todo-runtime:display-label-watch" runtime_symbol: "displayLabelWatch" }
exports: { export_id: "export:todo-runtime:display-label-watch-stop" runtime_symbol: "displayLabelWatchStop" }
exports: { export_id: "export:todo-runtime:search-document-get" runtime_symbol: "searchDocumentGet" }
exports: { export_id: "export:todo-runtime:search-document-watch" runtime_symbol: "searchDocumentWatch" }
exports: { export_id: "export:todo-runtime:search-document-watch-stop" runtime_symbol: "searchDocumentWatchStop" }
exports: { export_id: "export:todo-runtime:display-label-get" runtime_symbol: "displayLabel.get" }
exports: { export_id: "export:todo-runtime:display-label-watch" runtime_symbol: "displayLabel.watch" }
exports: { export_id: "export:todo-runtime:display-label-watch-stop" runtime_symbol: "displayLabel.watchStop" }
exports: { export_id: "export:todo-runtime:search-document-get" runtime_symbol: "searchDocument.get" }
exports: { export_id: "export:todo-runtime:search-document-watch" runtime_symbol: "searchDocument.watch" }
exports: { export_id: "export:todo-runtime:search-document-watch-stop" runtime_symbol: "searchDocument.watchStop" }
exports: { export_id: "export:todo-runtime:create-task" runtime_symbol: "createTask" }
Generated
+7 -7
View File
@@ -37,17 +37,17 @@
"quixosNixHelpers": {
"flake": false,
"locked": {
"lastModified": 1789444178,
"narHash": "sha256-/a560j65vYLy/gcwa662cJLo09C14Kj6YjvItC+Ugfo=",
"ref": "refs/tags/quixos-reachability/6657af7ca0501454f27032141c57dd09e7ecd79c",
"rev": "6657af7ca0501454f27032141c57dd09e7ecd79c",
"revCount": 27,
"lastModified": 1789354913,
"narHash": "sha256-vCdz/2jZ15GpA7YkmjLGOuO/LoZIeI8v7joDD5EI0oE=",
"ref": "refs/tags/quixos-reachability/8b2a224698da3659dd9a81e237dfe79238ee2836",
"rev": "8b2a224698da3659dd9a81e237dfe79238ee2836",
"revCount": 18,
"type": "git",
"url": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git"
},
"original": {
"ref": "refs/tags/quixos-reachability/6657af7ca0501454f27032141c57dd09e7ecd79c",
"rev": "6657af7ca0501454f27032141c57dd09e7ecd79c",
"ref": "refs/tags/quixos-reachability/8b2a224698da3659dd9a81e237dfe79238ee2836",
"rev": "8b2a224698da3659dd9a81e237dfe79238ee2836",
"type": "git",
"url": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git"
}
+2 -2
View File
@@ -6,7 +6,7 @@
flake-utils.url = "github:numtide/flake-utils";
quixosNixHelpers = {
url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git?ref=refs/tags/quixos-reachability/6657af7ca0501454f27032141c57dd09e7ecd79c&rev=6657af7ca0501454f27032141c57dd09e7ecd79c";
url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git?ref=refs/tags/quixos-reachability/8b2a224698da3659dd9a81e237dfe79238ee2836&rev=8b2a224698da3659dd9a81e237dfe79238ee2836";
flake = false;
};
};
@@ -18,7 +18,7 @@
quixosHelpers.mkCaminoTsYarnNixifyFlake {
inherit inputs nixpkgs flake-utils;
packageRoot = ./.;
migrationEntrypoint = "dist/migrate.js";
bindingOptions = builtins.fromJSON (builtins.readFile ./bindings.json);
promptName = "todo-runtime";
bundle = {
entry = "dist/server.js";
+1 -1
View File
@@ -12,7 +12,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@quixos/camino-package-runtime": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=d3d050d9cb84421fd8043ebe34fd0cae9132f6a2"
"@quixos/camino-package-runtime": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=110e41b268c8ac309e6757f2af3331de417ff9b0"
},
"devDependencies": {
"@types/node": "^24",
+18 -9
View File
@@ -1,31 +1,40 @@
import interface TaskData;
external atom Task id "atom:task";
package TodoRuntime id "package:todo-runtime" revision "package:todo-runtime@1" {
operation complete id "export:todo-runtime:complete" : unit -> string mode call receiver atom Task requires {
interface data id "port:todo-runtime:data" : TaskData;
state status id "port:todo-actions:status" : string [read, write];
};
operation reopen id "export:todo-runtime:reopen" : unit -> string mode call receiver atom Task requires {
interface data id "port:todo-runtime:data" : TaskData;
state status id "port:todo-actions:status" : string [read, write];
};
operation archive id "export:todo-runtime:archive" : unit -> string mode call receiver atom Task requires {
interface data id "port:todo-runtime:data" : TaskData;
state status id "port:todo-actions:status" : string [read, write];
};
operation displayLabelGet id "export:todo-runtime:display-label-get" : unit -> string mode call receiver atom Task requires {
interface data id "port:todo-runtime:data" : TaskData;
state title id "port:todo-label:title" : string [read];
state status id "port:todo-label:status" : string [read];
state priority id "port:todo-label:priority" : string [read];
};
operation displayLabelWatch id "export:todo-runtime:display-label-watch" : unit -> watch-handle mode watch-start emits string receiver atom Task requires {
interface data id "port:todo-runtime:data" : TaskData;
state title id "port:todo-label:title" : string [read];
state status id "port:todo-label:status" : string [read];
state priority id "port:todo-label:priority" : string [read];
};
operation displayLabelWatchStop id "export:todo-runtime:display-label-watch-stop" : watch-handle -> unit mode watch-stop receiver atom Task;
operation searchDocumentGet id "export:todo-runtime:search-document-get" : unit -> message "org.quixos.web-studio.SearchDocument" mode call receiver atom Task requires {
interface data id "port:todo-runtime:data" : TaskData;
state title id "port:todo-search:title" : string [read];
state status id "port:todo-search:status" : string [read];
state priority id "port:todo-search:priority" : string [read];
state dueDate id "port:todo-search:due-date" : string [read];
};
operation searchDocumentWatch id "export:todo-runtime:search-document-watch" : unit -> watch-handle mode watch-start emits message "org.quixos.web-studio.SearchDocument" receiver atom Task requires {
interface data id "port:todo-runtime:data" : TaskData;
state title id "port:todo-search:title" : string [read];
state status id "port:todo-search:status" : string [read];
state priority id "port:todo-search:priority" : string [read];
state dueDate id "port:todo-search:due-date" : string [read];
};
operation searchDocumentWatchStop id "export:todo-runtime:search-document-watch-stop" : watch-handle -> unit mode watch-stop receiver atom Task;
constructor createTask id "export:todo-runtime:create-task" constructs Task : string requires {
interface data id "port:todo-runtime:data" : TaskData;
state title id "port:todo-constructor:title" : string [write];
};
}
-12
View File
@@ -1,12 +0,0 @@
{
"backend": "typescript",
"bindingOutput": "src/gen/qx.ts",
"options": {
"messages": {
"org.quixos.web-studio.SearchDocument": {
"module": "../messages.js",
"export": "searchDocumentBinding"
}
}
}
}
+1 -5
View File
@@ -1,10 +1,6 @@
quixos-lock version 1 {
quixos source {
repository "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos.git";
commit "099bb9f5d64bce50b20b6cb51d5333f009b8d418";
}
interface TaskData source {
repository "https://repos.quixos.org/quixos-templates/interface-task-data.git";
commit "18b334a3a35cb68f27788444aaf530d9e8052df7";
commit "15b93e42825a3f8055f6305999a12c5b1cc73330";
}
}
-6
View File
@@ -1,6 +0,0 @@
{
"generatedBy": "qx-scaffold-v1",
"schemaVersion": 1,
"contracts": {},
"migrations": []
}
-4
View File
@@ -1,4 +0,0 @@
{
"generatedBy": "qx-scaffold-v1",
"nixifyPluginUrl": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/yarn-plugin-nixify-patched/raw/commit/4528fdd20b30d869262443b3f044549810e75fb8/dist/yarn-plugin-nixify.js"
}
+194 -1097
View File
File diff suppressed because one or more lines are too long
-2
View File
@@ -1,2 +0,0 @@
// This adapter keeps the implementation file hand-authored.
export {archive as handler} from "../task.impl.js";
-2
View File
@@ -1,2 +0,0 @@
// This adapter keeps the implementation file hand-authored.
export {complete as handler} from "../task.impl.js";
-2
View File
@@ -1,2 +0,0 @@
// This adapter keeps the implementation file hand-authored.
export {createTask as handler} from "../task.impl.js";
-2
View File
@@ -1,2 +0,0 @@
// This adapter keeps the implementation file hand-authored.
export {displayLabel as handler} from "../task.impl.js";
-2
View File
@@ -1,2 +0,0 @@
// This adapter keeps the implementation file hand-authored.
export {displayLabel as handler} from "../task.impl.js";
-2
View File
@@ -1,2 +0,0 @@
// This adapter keeps the implementation file hand-authored.
export {stopWatch as handler} from "../task.impl.js";
-2
View File
@@ -1,2 +0,0 @@
// This adapter keeps the implementation file hand-authored.
export {reopen as handler} from "../task.impl.js";
-2
View File
@@ -1,2 +0,0 @@
// This adapter keeps the implementation file hand-authored.
export {searchDocument as handler} from "../task.impl.js";
-2
View File
@@ -1,2 +0,0 @@
// This adapter keeps the implementation file hand-authored.
export {searchDocument as handler} from "../task.impl.js";
-2
View File
@@ -1,2 +0,0 @@
// This adapter keeps the implementation file hand-authored.
export {stopWatch as handler} from "../task.impl.js";
-3
View File
@@ -1,3 +0,0 @@
// Generated by qx-scaffold-v1
import {serveMigration} from "@quixos/camino-package-runtime";
await serveMigration({});
+10 -25
View File
@@ -1,25 +1,10 @@
// Generated by qx-scaffold-v1
import {servePackageRuntime} from "@quixos/camino-package-runtime";
import {createRuntime} from "./gen/qx.js";
import {handler as impl0} from "./impl/complete.js";
import {handler as impl1} from "./impl/reopen.js";
import {handler as impl2} from "./impl/archive.js";
import {handler as impl3} from "./impl/displayLabelGet.js";
import {handler as impl4} from "./impl/displayLabelWatch.js";
import {handler as impl5} from "./impl/displayLabelWatchStop.js";
import {handler as impl6} from "./impl/searchDocumentGet.js";
import {handler as impl7} from "./impl/searchDocumentWatch.js";
import {handler as impl8} from "./impl/searchDocumentWatchStop.js";
import {handler as impl9} from "./impl/createTask.js";
servePackageRuntime(createRuntime({
"complete": impl0,
"reopen": impl1,
"archive": impl2,
"displayLabelGet": impl3,
"displayLabelWatch": impl4,
"displayLabelWatchStop": impl5,
"searchDocumentGet": impl6,
"searchDocumentWatch": impl7,
"searchDocumentWatchStop": impl8,
"createTask": impl9,
}));
import { servePackageRuntime } from "@quixos/camino-package-runtime";
import { createRuntime, type Implementation } from "./gen/qx.js";
import { archive, complete, createTask, displayLabel, reopen, searchDocument, stopWatch } from "./task.impl.js";
const implementation: Implementation = {
complete, reopen, archive, createTask,
displayLabelGet: displayLabel, displayLabelWatch: displayLabel, displayLabelWatchStop: stopWatch,
searchDocumentGet: searchDocument, searchDocumentWatch: searchDocument, searchDocumentWatchStop: stopWatch,
};
servePackageRuntime(createRuntime(implementation));
+6 -6
View File
@@ -1,24 +1,24 @@
import type { Contexts } from "./gen/qx.js";
export const complete = async ({ ports }: Contexts["complete"]) => {
await ports.data["status.set"]("DONE");
await ports.status.set("DONE");
return "DONE";
};
export const reopen = async ({ ports }: Contexts["reopen"]) => {
await ports.data["status.set"]("OPEN");
await ports.status.set("OPEN");
return "OPEN";
};
export const archive = async ({ ports }: Contexts["archive"]) => {
await ports.data["status.set"]("ARCHIVED");
await ports.status.set("ARCHIVED");
return "ARCHIVED";
};
export const displayLabel = { kind: "derived" as const, get: async ({ ports }: Contexts["displayLabelGet"]) => {
const [title, status, priority] = await Promise.all([ports.data["title.get"](), ports.data["status.get"](), ports.data["priority.get"]()]);
const [title, status, priority] = await Promise.all([ports.title.get(), ports.status.get(), ports.priority.get()]);
const priorityText = priority && priority !== "NORMAL" ? ` ${priority.toLowerCase()}` : "";
return `[${status || "OPEN"}]${priorityText} ${title || "Untitled task"}`;
}};
export const searchDocument = { kind: "derived" as const, get: async ({ ports }: Contexts["searchDocumentGet"]) => {
const [title, status, priority, dueDate] = await Promise.all([ports.data["title.get"](), ports.data["status.get"](), ports.data["priority.get"](), ports.data["dueDate.get"]()]);
const [title, status, priority, dueDate] = await Promise.all([ports.title.get(), ports.status.get(), ports.priority.get(), ports.dueDate.get()]);
return {
title: title || "Untitled task",
subtitle: `Task · ${status || "OPEN"}${dueDate ? ` · due ${dueDate}` : ""}`,
@@ -26,7 +26,7 @@ export const searchDocument = { kind: "derived" as const, get: async ({ ports }:
};
}};
export const createTask = async ({ ports, input, objectId }: Contexts["createTask"]) => {
await ports.data["title.set"](input.trim() || "Untitled task");
await ports.title.set(input.trim() || "Untitled task");
return objectId;
};
export const stopWatch = () => null;
+1 -1
View File
@@ -159,7 +159,7 @@ cacheEntries = {
"@bufbuild/protobuf@npm:2.12.1" = { filename = "@bufbuild-protobuf-npm-2.12.1-d8afb467b3-2d40cfe4ec.zip"; hash = "sha512-LUDP5Ow7sOPwarLih3HcXcVm6qywVfvok9dWIbBAfQJy1I9ApJCtR97YOe1UFRThr3G7E68CSzrjbvDFbVbdqQ=="; };
"@connectrpc/connect-node@npm:2.1.2" = { filename = "@connectrpc-connect-node-npm-2.1.2-021434d5d5-ba8b0c9384.zip"; hash = "sha512-uosMk4TDgps3eqeoJtwM1Qpgk1J9LscBRgSRKDYzbqlgSitazqQrEEd/i+RWnknd7WbKD8d/X1sCcDXgKeE+qQ=="; };
"@connectrpc/connect@npm:2.1.2" = { filename = "@connectrpc-connect-npm-2.1.2-ab34825de3-4e15000890.zip"; hash = "sha512-ThUACJAjt1Lv1E+pQKWuHh+gDhvrxLoM7ScruTWSDYw7hbd0UOZErUQruMqaJ1sMFxNviWuo7/A2F4Ex2wHWFQ=="; };
"@quixos/camino-package-runtime@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=d3d050d9cb84421fd8043ebe34fd0cae9132f6a2" = { filename = "@quixos-camino-package-runtime-https-08b8790f1a-5bde059ead.zip"; hash = "sha512-W94Fnq0rn4MyBqRUUhH0ZcTzVv9MfF59dHtwpFLhg+/jK4QG5wi/uNgRR3xEVszpN8yrBWO6uiJGlkGmNnrczA=="; };
"@quixos/camino-package-runtime@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=110e41b268c8ac309e6757f2af3331de417ff9b0" = { filename = "@quixos-camino-package-runtime-https-5a5a438f14-75b1ffcea9.zip"; hash = "sha512-dbH/zqm6gwFck1pSrJAEXNUl6wfHpOL+jj4IwdHCyf5VOMKInCLr73Yx9NYUvqn3zw3AOfdm/8bUeTz2Htxo/A=="; };
"@types/node@npm:24.13.3" = { filename = "@types-node-npm-24.13.3-b512a0bbeb-a5bc08f49b.zip"; hash = "sha512-pbwI9JuVgdzcqQ4CzXcZejx5mECAdmSULlzVFhpVPU0q6AZPfjKUQQ10jX0Ji1wYSL5/pQwG8pxBk6sWvk5Z6w=="; };
"@typescript/typescript-linux-arm64@npm:7.0.2" = { filename = "@typescript-typescript-linux-arm64-npm-7.0.2-9cacfc53a0-10c0.zip"; hash = "sha512-s4c7nGT/lQIw6x0IfrL0b3ECy/D0g7UoDLdiIWJoM6EGXk5N/dmXdxUdA8Cr3hV/3nO2BYKTQ6Ai8/zGhiSQ3A=="; };
"@typescript/typescript-linux-x64@npm:7.0.2" = { filename = "@typescript-typescript-linux-x64-npm-7.0.2-8dd7ff8d24-10c0.zip"; hash = "sha512-k9EUK5CZ3OOPnyslp8SAAonHJpnpPmlaulppI/NmFyCzNs3UN/TLPUkyQia3KIxgbyTzKoXI5L5fl8Uj9bJ7Cg=="; };
+4 -4
View File
@@ -31,14 +31,14 @@ __metadata:
languageName: node
linkType: hard
"@quixos/camino-package-runtime@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=d3d050d9cb84421fd8043ebe34fd0cae9132f6a2":
"@quixos/camino-package-runtime@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=110e41b268c8ac309e6757f2af3331de417ff9b0":
version: 0.1.0
resolution: "@quixos/camino-package-runtime@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=d3d050d9cb84421fd8043ebe34fd0cae9132f6a2"
resolution: "@quixos/camino-package-runtime@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=110e41b268c8ac309e6757f2af3331de417ff9b0"
dependencies:
"@bufbuild/protobuf": "npm:^2.12.1"
"@connectrpc/connect": "npm:^2.1.2"
"@connectrpc/connect-node": "npm:^2.1.2"
checksum: 10c0/5bde059ead2b9f833206a4545211f465c4f356ff4c7c5e7d747b70a452e183efe32b8406e708bfb8d811477c4456cce937ccab0563baba22469641a6367adccc
checksum: 10c0/75b1ffcea9ba83015c935a52ac90045cd525eb07c7a4e2fe8e3e08c1d1c2c9fe5538c2889c22ebef7631f4d614bea9f7cf0dc039f766ffc6d4793cf61edc68fc
languageName: node
linkType: hard
@@ -46,7 +46,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@quixos/todo-runtime@workspace:."
dependencies:
"@quixos/camino-package-runtime": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=d3d050d9cb84421fd8043ebe34fd0cae9132f6a2"
"@quixos/camino-package-runtime": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=110e41b268c8ac309e6757f2af3331de417ff9b0"
"@types/node": "npm:^24"
typescript: "npm:^7.0.2"
bin: