mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-13 22:37:29 +00:00
Add credential sharing openspec
This commit is contained in:
parent
de517ba9b7
commit
a0314eb774
23 changed files with 616 additions and 132 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@logicsrc/tui",
|
||||
"version": "0.1.0",
|
||||
"description": "CommandBoard.run terminal UI.",
|
||||
"description": "LogicSRC terminal UI.",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
|
@ -11,7 +11,6 @@
|
|||
"dependencies": {
|
||||
"@logicsrc/plugin-core": "file:../plugin-core",
|
||||
"@logicsrc/plugin-coinpay": "file:../../plugins/coinpay",
|
||||
"@logicsrc/plugin-sh1pt": "file:../../plugins/sh1pt",
|
||||
"@logicsrc/plugin-ugig": "file:../../plugins/ugig"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { createPluginRegistry } from "@logicsrc/plugin-core";
|
||||
import { coinPayPlugin } from "@logicsrc/plugin-coinpay";
|
||||
import { sh1ptPlugin } from "@logicsrc/plugin-sh1pt";
|
||||
import { uGigPlugin } from "@logicsrc/plugin-ugig";
|
||||
|
||||
export interface TuiState {
|
||||
|
|
@ -19,11 +18,11 @@ const defaultState: TuiState = {
|
|||
|
||||
export function renderTui(state: Partial<TuiState> = {}) {
|
||||
const view = { ...defaultState, ...state };
|
||||
const registry = createPluginRegistry([coinPayPlugin, uGigPlugin, sh1ptPlugin]);
|
||||
const registry = createPluginRegistry([coinPayPlugin, uGigPlugin]);
|
||||
const plugins = registry.snapshot().plugins;
|
||||
|
||||
return [
|
||||
"┌─ CommandBoard.run ──────────────────────────────────────────┐",
|
||||
"┌─ LogicSRC TUI ──────────────────────────────────────────────┐",
|
||||
`│ DID: ${pad(view.did, 17)} Board: ${pad(view.board, 7)} Rep: ${String(view.reputation).padEnd(3)} Balance: ${pad(view.balance, 6)} │`,
|
||||
"├───────────────┬─────────────────────────────────────────────┤",
|
||||
"│ Boards │ Feed │",
|
||||
|
|
@ -31,7 +30,6 @@ export function renderTui(state: Partial<TuiState> = {}) {
|
|||
"│ /agents │ [POST] New agent plugin idea │",
|
||||
"│ /qa │ [RUN] qa-agent completed task_123 │",
|
||||
"│ /jobs │ [uGig] Senior AI Engineer remote │",
|
||||
"│ /projects │ [sh1pt] Release action published │",
|
||||
"├───────────────┴─────────────────────────────────────────────┤",
|
||||
"│ Plugins: " + plugins.map((plugin) => `${plugin.name} ${plugin.enabled ? "enabled" : "disabled"}`).join(" | ").padEnd(50) + " │",
|
||||
"│ Enter: open p: post t: task a: agents w: wallet q: quit │",
|
||||
|
|
@ -40,7 +38,7 @@ export function renderTui(state: Partial<TuiState> = {}) {
|
|||
}
|
||||
|
||||
export function renderPluginStatus() {
|
||||
const registry = createPluginRegistry([coinPayPlugin, uGigPlugin, sh1ptPlugin]);
|
||||
const registry = createPluginRegistry([coinPayPlugin, uGigPlugin]);
|
||||
return registry
|
||||
.snapshot()
|
||||
.plugins.map((plugin) => `${plugin.id.padEnd(8)} ${plugin.enabled ? "enabled" : "disabled"} ${plugin.type.join(", ")}`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue