@starlove/orbit 1.4.1 → 2.0.0
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/Dockerfile +10 -8
- package/README.md +146 -164
- package/dist/full/csp.txt +1 -0
- package/dist/full/fonts/JetBrains_Mono/JetBrainsMono-subset.woff2 +0 -0
- package/dist/full/fonts/JetBrains_Mono/README.txt +5 -0
- package/dist/full/fonts/Mona_Sans/MonaSans-subset.woff2 +0 -0
- package/{public/fonts/Open_Sans → dist/full/fonts/Mona_Sans}/OFL.txt +93 -93
- package/dist/full/fonts/Mona_Sans/README.txt +10 -0
- package/{public/fonts/JetBrains_Mono → dist/full/fonts/Newsreader}/OFL.txt +93 -93
- package/dist/full/fonts/Newsreader/README.txt +8 -0
- package/dist/full/fonts/Newsreader/newsreader.woff2 +0 -0
- package/dist/full/index.html +36 -653
- package/dist/full/js/app.BmuponPJ.js +32 -0
- package/dist/full/js/app.BmuponPJ.js.map +1 -0
- package/dist/full/js/chunk.1fJGQGbW.js +2 -0
- package/dist/full/js/chunk.1fJGQGbW.js.map +1 -0
- package/dist/full/js/chunk.5D7JO2zp.js +2 -0
- package/dist/full/js/chunk.5D7JO2zp.js.map +1 -0
- package/dist/full/js/chunk.BrNn_D79.js +2 -0
- package/dist/full/js/chunk.BrNn_D79.js.map +1 -0
- package/dist/full/js/chunk.CokJXIqM.js +2 -0
- package/dist/full/js/chunk.CokJXIqM.js.map +1 -0
- package/dist/full/js/chunk.D_Haqy6R.js +2 -0
- package/dist/full/js/chunk.D_Haqy6R.js.map +1 -0
- package/dist/full/js/chunk.RO0jsH6I.js +15 -0
- package/dist/full/js/chunk.RO0jsH6I.js.map +1 -0
- package/dist/full/js/chunk.dqWOEtBM.js +2 -0
- package/dist/full/js/chunk.dqWOEtBM.js.map +1 -0
- package/dist/full/js/warm.f260bbbc.js +15 -0
- package/dist/full/orbits-favicon.png +0 -0
- package/dist/full/orbits-logo-bg-wide.png +0 -0
- package/dist/full/orbits-logo-bg.png +0 -0
- package/dist/full/orbits-logo.png +0 -0
- package/dist/full/styles.2b154ffe.css +1 -0
- package/dist/full/vendor/starlove-ui/theme-init.js +66 -0
- package/dist/full/version.json +2 -2
- package/docs/AGENT_GUIDE.md +114 -0
- package/docs/UPDATING.md +249 -64
- package/lib/adapters/indexeddb/blobs.d.ts +3 -0
- package/lib/adapters/indexeddb/blobs.js +54 -0
- package/lib/adapters/indexeddb/database.d.ts +60 -0
- package/lib/adapters/indexeddb/database.js +126 -0
- package/lib/adapters/indexeddb/index.d.ts +5 -0
- package/lib/adapters/indexeddb/index.js +3 -0
- package/lib/adapters/indexeddb/locks.d.ts +14 -0
- package/lib/adapters/indexeddb/locks.js +40 -0
- package/lib/adapters/indexeddb/store.d.ts +40 -0
- package/lib/adapters/indexeddb/store.js +424 -0
- package/lib/adapters/indexeddb/tables.d.ts +43 -0
- package/lib/adapters/indexeddb/tables.js +127 -0
- package/lib/adapters/memory/blobs.d.ts +3 -0
- package/lib/adapters/memory/blobs.js +44 -0
- package/lib/adapters/memory/board.d.ts +41 -0
- package/lib/adapters/memory/board.js +521 -0
- package/lib/adapters/memory/index.d.ts +2 -0
- package/lib/adapters/memory/index.js +2 -0
- package/lib/adapters/memory/search.d.ts +6 -0
- package/lib/adapters/memory/search.js +30 -0
- package/lib/adapters/memory/store.d.ts +34 -0
- package/lib/adapters/memory/store.js +266 -0
- package/lib/adapters/sqlite/backups.d.ts +53 -0
- package/lib/adapters/sqlite/backups.js +232 -0
- package/lib/adapters/sqlite/blobs.d.ts +14 -0
- package/lib/adapters/sqlite/blobs.js +109 -0
- package/lib/adapters/sqlite/board.d.ts +77 -0
- package/lib/adapters/sqlite/board.js +328 -0
- package/lib/adapters/sqlite/database.d.ts +67 -0
- package/lib/adapters/sqlite/database.js +285 -0
- package/lib/adapters/sqlite/index.d.ts +3 -0
- package/lib/adapters/sqlite/index.js +2 -0
- package/lib/adapters/sqlite/lock.d.ts +11 -0
- package/lib/adapters/sqlite/lock.js +34 -0
- package/lib/adapters/sqlite/records.d.ts +54 -0
- package/lib/adapters/sqlite/records.js +546 -0
- package/lib/adapters/sqlite/schema.d.ts +54 -0
- package/lib/adapters/sqlite/schema.js +276 -0
- package/lib/adapters/sqlite/store.d.ts +39 -0
- package/lib/adapters/sqlite/store.js +385 -0
- package/lib/browser/in-page.d.ts +31 -0
- package/lib/browser/in-page.js +46 -0
- package/lib/browser/old-preview.d.ts +13 -0
- package/lib/browser/old-preview.js +80 -0
- package/lib/browser/preview-board.d.ts +8 -0
- package/lib/browser/preview-board.js +69 -0
- package/lib/cli/main.d.ts +7 -0
- package/lib/cli/main.js +343 -0
- package/lib/cli/orbit.d.ts +8 -0
- package/lib/cli/orbit.js +25 -0
- package/lib/client/http.d.ts +38 -0
- package/lib/client/http.js +334 -0
- package/lib/client/local.d.ts +26 -0
- package/lib/client/local.js +190 -0
- package/lib/client/object-url.d.ts +8 -0
- package/lib/client/object-url.js +21 -0
- package/lib/client/types.d.ts +268 -0
- package/lib/client/types.js +8 -0
- package/lib/commands/agent-tools.d.ts +31 -0
- package/lib/commands/agent-tools.js +100 -0
- package/lib/commands/index.d.ts +56 -0
- package/lib/commands/index.js +298 -0
- package/lib/commands/parse.d.ts +73 -0
- package/lib/commands/parse.js +231 -0
- package/lib/commands/present.d.ts +134 -0
- package/lib/commands/present.js +198 -0
- package/lib/commands/session.d.ts +85 -0
- package/lib/commands/session.js +138 -0
- package/lib/commands/verbs.d.ts +35 -0
- package/lib/commands/verbs.js +842 -0
- package/lib/core/actors.d.ts +18 -0
- package/lib/core/actors.js +45 -0
- package/lib/core/agent.d.ts +128 -0
- package/lib/core/agent.js +323 -0
- package/lib/core/boards.d.ts +113 -0
- package/lib/core/boards.js +288 -0
- package/lib/core/bootstrap.d.ts +47 -0
- package/lib/core/bootstrap.js +100 -0
- package/lib/core/bytes.d.ts +10 -0
- package/lib/core/bytes.js +52 -0
- package/lib/core/card-paths.d.ts +25 -0
- package/lib/core/card-paths.js +44 -0
- package/lib/core/context.d.ts +60 -0
- package/lib/core/context.js +42 -0
- package/lib/core/cross-board.d.ts +81 -0
- package/lib/core/cross-board.js +228 -0
- package/lib/core/describe.d.ts +21 -0
- package/lib/core/describe.js +81 -0
- package/lib/core/errors.d.ts +159 -0
- package/lib/core/errors.js +160 -0
- package/lib/core/files.d.ts +79 -0
- package/lib/core/files.js +262 -0
- package/lib/core/history.d.ts +20 -0
- package/lib/core/history.js +53 -0
- package/lib/core/image-types.d.ts +16 -0
- package/lib/core/image-types.js +36 -0
- package/lib/core/model.d.ts +263 -0
- package/lib/core/model.js +34 -0
- package/lib/core/nebula-link.d.ts +14 -0
- package/lib/core/nebula-link.js +39 -0
- package/lib/core/relations.d.ts +58 -0
- package/lib/core/relations.js +112 -0
- package/lib/core/search.d.ts +38 -0
- package/lib/core/search.js +92 -0
- package/lib/core/sessions.d.ts +44 -0
- package/lib/core/sessions.js +158 -0
- package/lib/core/snapshot-schema.d.ts +295 -0
- package/lib/core/snapshot-schema.js +82 -0
- package/lib/core/snapshots.d.ts +75 -0
- package/lib/core/snapshots.js +409 -0
- package/lib/core/states.d.ts +25 -0
- package/lib/core/states.js +126 -0
- package/lib/core/text.d.ts +40 -0
- package/lib/core/text.js +113 -0
- package/lib/core/tickets.d.ts +69 -0
- package/lib/core/tickets.js +311 -0
- package/lib/core/trello.d.ts +17 -0
- package/lib/core/trello.js +269 -0
- package/lib/core/verdicts.d.ts +28 -0
- package/lib/core/verdicts.js +92 -0
- package/lib/core/views.d.ts +95 -0
- package/lib/core/views.js +186 -0
- package/lib/http/app.d.ts +46 -0
- package/lib/http/app.js +491 -0
- package/lib/mcp-server.d.ts +10 -0
- package/lib/mcp-server.js +120 -0
- package/lib/node/assets.d.ts +7 -0
- package/lib/node/assets.js +68 -0
- package/lib/node/data-folder.d.ts +21 -0
- package/lib/node/data-folder.js +34 -0
- package/lib/node/env.d.ts +38 -0
- package/lib/node/env.js +49 -0
- package/lib/node/host-check.d.ts +24 -0
- package/lib/node/host-check.js +53 -0
- package/lib/node/host-services.d.ts +9 -0
- package/lib/node/host-services.js +150 -0
- package/lib/node/local.d.ts +22 -0
- package/lib/node/local.js +61 -0
- package/lib/node/migrate.d.ts +53 -0
- package/lib/node/migrate.js +635 -0
- package/lib/node/package.d.ts +7 -0
- package/lib/node/package.js +14 -0
- package/lib/node/repo-board.d.ts +49 -0
- package/lib/node/repo-board.js +245 -0
- package/lib/node/serve.d.ts +8 -0
- package/lib/node/serve.js +106 -0
- package/lib/orbit.d.ts +47 -0
- package/lib/orbit.js +44 -0
- package/lib/quiet-sqlite-warning.d.ts +1 -0
- package/lib/quiet-sqlite-warning.js +18 -0
- package/lib/store/blob-path.d.ts +6 -0
- package/lib/store/blob-path.js +12 -0
- package/lib/store/conformance.d.ts +52 -0
- package/lib/store/conformance.js +1449 -0
- package/lib/store/search-words.d.ts +10 -0
- package/lib/store/search-words.js +19 -0
- package/lib/store/types.d.ts +452 -0
- package/lib/store/types.js +34 -0
- package/llms.txt +63 -0
- package/package.json +109 -25
- package/src/cli/orbit.js +11 -658
- package/src/mcp-server.js +16 -876
- package/SKILL-ORBIT.md +0 -151
- package/build.mjs +0 -210
- package/dist/full/js/app.4e6fbe20.js +0 -952
- package/dist/full/js/app.4e6fbe20.js.map +0 -7
- package/dist/full/styles.4e60d824.css +0 -1
- package/docs/AGENT_PROTOCOL.md +0 -424
- package/docs/MCP_SETUP.md +0 -54
- package/docs/ORBIT_DISPATCH.md +0 -280
- package/docs/SS-Orbit-Dark.png +0 -0
- package/docs/SS-Orbit-Light.png +0 -0
- package/docs/mcp-client.example.json +0 -13
- package/docs/setup/orbit-init-wizard.md +0 -174
- package/public/apple-touch-icon.png +0 -0
- package/public/cursors/live_arrow.cur +0 -0
- package/public/cursors/live_link.cur +0 -0
- package/public/cursors/live_move.cur +0 -0
- package/public/cursors/live_select.cur +0 -0
- package/public/cursors/live_unavail.cur +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/fonts/Chakra_Petch/ChakraPetch-Bold.ttf +0 -0
- package/public/fonts/Chakra_Petch/ChakraPetch-BoldItalic.ttf +0 -0
- package/public/fonts/Chakra_Petch/ChakraPetch-Italic.ttf +0 -0
- package/public/fonts/Chakra_Petch/ChakraPetch-Light.ttf +0 -0
- package/public/fonts/Chakra_Petch/ChakraPetch-LightItalic.ttf +0 -0
- package/public/fonts/Chakra_Petch/ChakraPetch-Medium.ttf +0 -0
- package/public/fonts/Chakra_Petch/ChakraPetch-MediumItalic.ttf +0 -0
- package/public/fonts/Chakra_Petch/ChakraPetch-Regular.ttf +0 -0
- package/public/fonts/Chakra_Petch/ChakraPetch-SemiBold.ttf +0 -0
- package/public/fonts/Chakra_Petch/ChakraPetch-SemiBoldItalic.ttf +0 -0
- package/public/fonts/Chakra_Petch/OFL.txt +0 -93
- package/public/fonts/Inter/Inter-Italic-VariableFont_opsz,wght.ttf +0 -0
- package/public/fonts/Inter/Inter-VariableFont_opsz,wght.ttf +0 -0
- package/public/fonts/Inter/OFL.txt +0 -93
- package/public/fonts/Inter/README.txt +0 -118
- package/public/fonts/JetBrains_Mono/JetBrainsMono-Italic-VariableFont_wght.ttf +0 -0
- package/public/fonts/JetBrains_Mono/JetBrainsMono-VariableFont_wght.ttf +0 -0
- package/public/fonts/JetBrains_Mono/README.txt +0 -79
- package/public/fonts/OpenRing-Regular.ttf +0 -0
- package/public/fonts/Open_Sans/OpenSans-Italic-VariableFont_wdth,wght.ttf +0 -0
- package/public/fonts/Open_Sans/OpenSans-VariableFont_wdth,wght.ttf +0 -0
- package/public/fonts/Open_Sans/README.txt +0 -100
- package/public/fonts/Orbitron/OFL.txt +0 -93
- package/public/fonts/Orbitron/Orbitron-VariableFont_wght.ttf +0 -0
- package/public/fonts/Orbitron/README.txt +0 -68
- package/public/fonts/Rajdhani/OFL.txt +0 -93
- package/public/fonts/Rajdhani/Rajdhani-Bold.ttf +0 -0
- package/public/fonts/Rajdhani/Rajdhani-Light.ttf +0 -0
- package/public/fonts/Rajdhani/Rajdhani-Medium.ttf +0 -0
- package/public/fonts/Rajdhani/Rajdhani-Regular.ttf +0 -0
- package/public/fonts/Rajdhani/Rajdhani-SemiBold.ttf +0 -0
- package/public/fonts/runescape-uf.ttf +0 -0
- package/public/index.html +0 -769
- package/public/js/actor-labels.js +0 -65
- package/public/js/api.js +0 -39
- package/public/js/app.js +0 -45
- package/public/js/artifact-drawer.js +0 -79
- package/public/js/board-export.js +0 -161
- package/public/js/board-menu.js +0 -374
- package/public/js/card-actions.js +0 -545
- package/public/js/config.js +0 -20
- package/public/js/create-card.js +0 -190
- package/public/js/dom.js +0 -19
- package/public/js/drawer.js +0 -273
- package/public/js/font-preference.js +0 -230
- package/public/js/format.js +0 -433
- package/public/js/help-menu.js +0 -31
- package/public/js/icons.js +0 -16
- package/public/js/kanban.js +0 -694
- package/public/js/local-backend.js +0 -1015
- package/public/js/main.js +0 -161
- package/public/js/modal.js +0 -33
- package/public/js/motion-preference.js +0 -64
- package/public/js/panel.js +0 -58
- package/public/js/router.js +0 -134
- package/public/js/search.js +0 -56
- package/public/js/settings-tabs.js +0 -7
- package/public/js/settings.js +0 -1634
- package/public/js/sse.js +0 -159
- package/public/js/starscape.js +0 -332
- package/public/js/state.js +0 -129
- package/public/js/text-editing.js +0 -128
- package/public/js/theme-preference.js +0 -95
- package/public/js/ticket-detail.js +0 -1516
- package/public/js/ticket-typeahead.js +0 -49
- package/public/js/toast.js +0 -89
- package/public/js/topbar-notes.js +0 -155
- package/public/js/transport.js +0 -22
- package/public/js/typeahead.js +0 -206
- package/public/js/unread.js +0 -121
- package/public/js/update-check.js +0 -58
- package/public/js/url-routes.js +0 -94
- package/public/orbits-favicon.png +0 -0
- package/public/orbits-logo-bg-wide.png +0 -0
- package/public/orbits-logo-bg.png +0 -0
- package/public/orbits-logo.png +0 -0
- package/public/styles.css +0 -7709
- package/src/core/agent.js +0 -387
- package/src/core/agents-md.js +0 -109
- package/src/core/artifacts.js +0 -149
- package/src/core/attachments.js +0 -238
- package/src/core/auth.js +0 -85
- package/src/core/backups.js +0 -142
- package/src/core/board.js +0 -148
- package/src/core/boards.js +0 -409
- package/src/core/bootstrap.js +0 -170
- package/src/core/css-bundle.js +0 -30
- package/src/core/db.js +0 -315
- package/src/core/delete-board.js +0 -163
- package/src/core/dispatch.js +0 -1007
- package/src/core/events.js +0 -314
- package/src/core/http.js +0 -115
- package/src/core/migrate.js +0 -198
- package/src/core/paths.js +0 -55
- package/src/core/provision-repo-board.js +0 -119
- package/src/core/queries.js +0 -246
- package/src/core/registry.js +0 -211
- package/src/core/relations.js +0 -163
- package/src/core/review-verdicts.js +0 -138
- package/src/core/router.js +0 -556
- package/src/core/search.js +0 -183
- package/src/core/seed.js +0 -234
- package/src/core/snapshots.js +0 -692
- package/src/core/states.js +0 -167
- package/src/core/system-picker.js +0 -109
- package/src/core/tickets.js +0 -400
- package/src/core/util.js +0 -106
- package/src/core/version-check.js +0 -154
- package/src/mcp/orbit-client.js +0 -287
- package/src/server.js +0 -115
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One client for every Orbit: `OrbitClient`. `orbit.client(actor)` calls the
|
|
3
|
+
* core in this process (the CLI, `orbit mcp` on a computer); `createHttpClient`
|
|
4
|
+
* calls an Orbit over `fetch` (remote agents, the web app, the Suite). Its
|
|
5
|
+
* methods mirror the JSON API, one route to one method, and each answer is
|
|
6
|
+
* that route's answer.
|
|
7
|
+
*/
|
|
8
|
+
import type { ClaimAnswer, CompleteInput, ContextOptions, ContextPack, Lookup, ReadTicket } from "../core/agent.ts";
|
|
9
|
+
import type { BoardListing, BoardManual, BoardUpdate, NewBoardInput, NewEntryInput, RemovedBoard } from "../core/boards.ts";
|
|
10
|
+
import type { Bootstrap } from "../core/bootstrap.ts";
|
|
11
|
+
import type { CrossBoardRelationAnswer } from "../core/cross-board.ts";
|
|
12
|
+
import type { AttachmentView, StoredArtifact } from "../core/files.ts";
|
|
13
|
+
import type { AgentSession, Board, BoardChange, BoardEntry, Comment, Id, Relation, State } from "../core/model.ts";
|
|
14
|
+
import type { TicketBlockers, TicketRelations } from "../core/relations.ts";
|
|
15
|
+
import type { SearchAnswer, SearchInput } from "../core/search.ts";
|
|
16
|
+
import type { ImportInput, ImportResult } from "../core/snapshots.ts";
|
|
17
|
+
import type { HistoryEntry, NewTicketInput, TicketUpdate } from "../core/tickets.ts";
|
|
18
|
+
import type { NewVerdictInput, VerdictView } from "../core/verdicts.ts";
|
|
19
|
+
import type { TicketView } from "../core/views.ts";
|
|
20
|
+
/** A command line, as `POST /api/cmd` takes it. */
|
|
21
|
+
export interface CommandInput {
|
|
22
|
+
/** The line: `view`, `take #12`, `finish #12`. */
|
|
23
|
+
command?: string;
|
|
24
|
+
/** The words, already split (a shell's argv), instead of `command`. */
|
|
25
|
+
argv?: string[];
|
|
26
|
+
/** Long text: a summary, note, description or question. */
|
|
27
|
+
text?: string;
|
|
28
|
+
/** Answer with JSON data instead of text. */
|
|
29
|
+
json?: boolean;
|
|
30
|
+
/** Refuse anything that changes the board (the `orbit_read` tool). */
|
|
31
|
+
readOnly?: boolean;
|
|
32
|
+
/** How the answer's hints are written: `orbit view` in a shell, `view` elsewhere. */
|
|
33
|
+
transport?: "cli" | "mcp" | "http";
|
|
34
|
+
}
|
|
35
|
+
/** What a command answers: `ok` false means the line was refused, and `text` says how to put it right. */
|
|
36
|
+
export interface CommandReply {
|
|
37
|
+
ok: boolean;
|
|
38
|
+
text: string;
|
|
39
|
+
/** The board the session has chosen, if any. */
|
|
40
|
+
board: string | null;
|
|
41
|
+
kind: "read" | "write";
|
|
42
|
+
data?: unknown;
|
|
43
|
+
}
|
|
44
|
+
export interface VersionInfo {
|
|
45
|
+
current: string;
|
|
46
|
+
deployMode: string;
|
|
47
|
+
selfUpdate: boolean;
|
|
48
|
+
repoUrl: string;
|
|
49
|
+
changesUrl: string;
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
latest: string | null;
|
|
52
|
+
updateAvailable: boolean;
|
|
53
|
+
error: string | null;
|
|
54
|
+
checkedAt: string | null;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* What the computer Orbit runs on can do for the app open on it. A host
|
|
58
|
+
* without one (the browser edition) leaves it out, and its route answers 404.
|
|
59
|
+
*/
|
|
60
|
+
export interface HostServices {
|
|
61
|
+
version?: (options: {
|
|
62
|
+
force: boolean;
|
|
63
|
+
}) => Promise<VersionInfo>;
|
|
64
|
+
/** Starts a self-update, or null when the operator didn't turn it on (the route answers 404). */
|
|
65
|
+
selfUpdate?: () => Record<string, unknown> | null;
|
|
66
|
+
/** Opens a folder picker on this computer; `unsupported` when it has none. */
|
|
67
|
+
pickFolder?: () => Promise<Record<string, unknown> & {
|
|
68
|
+
unsupported?: boolean;
|
|
69
|
+
}>;
|
|
70
|
+
}
|
|
71
|
+
/** The state of a live stream of changes, for a notice when it drops. */
|
|
72
|
+
export type StreamState = "connecting" | "live" | "down";
|
|
73
|
+
export interface ChangesOptions {
|
|
74
|
+
/** Told each time the stream's state changes. In process, it is live at once and stays so. */
|
|
75
|
+
onState?: (state: StreamState) => void;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* An image's address for an `<img>`: a route of the server, or an object URL
|
|
79
|
+
* where the bytes come from no server (the browser edition). Call `release()`
|
|
80
|
+
* when the image is no longer shown, so an object URL's bytes can go.
|
|
81
|
+
*/
|
|
82
|
+
export interface ImageUrl {
|
|
83
|
+
url: string;
|
|
84
|
+
release(): void;
|
|
85
|
+
}
|
|
86
|
+
/** Where to look first for a record named by id (a board's id or slug); a hint naming no board is refused with `board_not_found`. */
|
|
87
|
+
export interface Hint {
|
|
88
|
+
board?: string | null;
|
|
89
|
+
board_id?: Id | null;
|
|
90
|
+
}
|
|
91
|
+
export interface OrbitClient {
|
|
92
|
+
health(): Promise<{
|
|
93
|
+
ok: true;
|
|
94
|
+
}>;
|
|
95
|
+
/** This Orbit's version, and whether a newer one is out (`refresh` checks again now). Refused with `not_found` where the host has no version check. */
|
|
96
|
+
version(options?: {
|
|
97
|
+
refresh?: boolean;
|
|
98
|
+
}): Promise<VersionInfo>;
|
|
99
|
+
/** Starts updating the computer's Orbit. Refused with `not_found` where self-update is off (always in the browser). */
|
|
100
|
+
update(): Promise<Record<string, unknown>>;
|
|
101
|
+
bootstrap(options?: Hint): Promise<Bootstrap>;
|
|
102
|
+
sessions(options?: {
|
|
103
|
+
since?: unknown;
|
|
104
|
+
}): Promise<{
|
|
105
|
+
since: string;
|
|
106
|
+
sessions: AgentSession[];
|
|
107
|
+
}>;
|
|
108
|
+
command(input: CommandInput): Promise<CommandReply>;
|
|
109
|
+
search(board: Hint, query: SearchInput): Promise<SearchAnswer>;
|
|
110
|
+
boards: {
|
|
111
|
+
list(): Promise<{
|
|
112
|
+
boards: BoardListing[];
|
|
113
|
+
}>;
|
|
114
|
+
create(input: NewBoardInput): Promise<Board>;
|
|
115
|
+
update(board: string, patch: BoardUpdate): Promise<Board>;
|
|
116
|
+
remove(board: string, input: {
|
|
117
|
+
confirm_slug?: unknown;
|
|
118
|
+
delete_files?: unknown;
|
|
119
|
+
}): Promise<RemovedBoard>;
|
|
120
|
+
context(board: string, options?: {
|
|
121
|
+
include_struck?: boolean;
|
|
122
|
+
}): Promise<BoardManual>;
|
|
123
|
+
archive(board: string): Promise<{
|
|
124
|
+
tickets: TicketView[];
|
|
125
|
+
}>;
|
|
126
|
+
export(board: string, options?: {
|
|
127
|
+
include_attachments?: boolean;
|
|
128
|
+
}): Promise<Record<string, unknown>>;
|
|
129
|
+
import(input: ImportInput & Hint): Promise<ImportResult>;
|
|
130
|
+
};
|
|
131
|
+
states: {
|
|
132
|
+
create(board: string, input: {
|
|
133
|
+
name?: unknown;
|
|
134
|
+
role?: unknown;
|
|
135
|
+
}): Promise<State>;
|
|
136
|
+
update(id: Id, patch: {
|
|
137
|
+
name?: string;
|
|
138
|
+
is_default?: boolean;
|
|
139
|
+
role?: string | null;
|
|
140
|
+
}, hint?: Hint): Promise<State>;
|
|
141
|
+
reorder(board: string, input: {
|
|
142
|
+
state_ids?: unknown;
|
|
143
|
+
}): Promise<State[]>;
|
|
144
|
+
remove(id: Id, hint?: Hint): Promise<{
|
|
145
|
+
ok: true;
|
|
146
|
+
deleted_state_id: Id;
|
|
147
|
+
}>;
|
|
148
|
+
};
|
|
149
|
+
tickets: {
|
|
150
|
+
create(input: NewTicketInput & Hint): Promise<TicketView>;
|
|
151
|
+
lookup(board: Hint, by: {
|
|
152
|
+
number?: unknown;
|
|
153
|
+
title?: unknown;
|
|
154
|
+
}): Promise<ReadTicket>;
|
|
155
|
+
read(id: Id, hint?: Hint): Promise<ReadTicket>;
|
|
156
|
+
update(id: Id, patch: TicketUpdate, hint?: Hint): Promise<TicketView>;
|
|
157
|
+
archive(id: Id, hint?: Hint): Promise<TicketView>;
|
|
158
|
+
restore(id: Id, hint?: Hint): Promise<TicketView>;
|
|
159
|
+
remove(id: Id, hint?: Hint): Promise<{
|
|
160
|
+
ok: true;
|
|
161
|
+
deleted_id: Id;
|
|
162
|
+
}>;
|
|
163
|
+
context(id: Id, options?: ContextOptions, hint?: Hint): Promise<ContextPack>;
|
|
164
|
+
contextFull(id: Id, options?: ContextOptions, hint?: Hint): Promise<ContextPack>;
|
|
165
|
+
dispatchPacket(id: Id, options?: ContextOptions, hint?: Hint): Promise<Record<string, unknown>>;
|
|
166
|
+
history(id: Id, hint?: Hint): Promise<HistoryEntry[]>;
|
|
167
|
+
relations(id: Id, hint?: Hint): Promise<TicketRelations>;
|
|
168
|
+
blockers(id: Id, hint?: Hint): Promise<TicketBlockers>;
|
|
169
|
+
};
|
|
170
|
+
comments: {
|
|
171
|
+
list(ticketId: Id, hint?: Hint): Promise<{
|
|
172
|
+
ticket_id: Id;
|
|
173
|
+
comments: Comment[];
|
|
174
|
+
}>;
|
|
175
|
+
create(ticketId: Id, input: {
|
|
176
|
+
body?: unknown;
|
|
177
|
+
author?: unknown;
|
|
178
|
+
kind?: unknown;
|
|
179
|
+
}, hint?: Hint): Promise<Comment>;
|
|
180
|
+
update(ticketId: Id, commentId: Id, patch: {
|
|
181
|
+
omitted_for_ai?: unknown;
|
|
182
|
+
}, hint?: Hint): Promise<Comment>;
|
|
183
|
+
};
|
|
184
|
+
attachments: {
|
|
185
|
+
list(ticketId: Id, hint?: Hint): Promise<{
|
|
186
|
+
attachments: AttachmentView[];
|
|
187
|
+
}>;
|
|
188
|
+
create(ticketId: Id, bytes: Uint8Array, meta: {
|
|
189
|
+
mime_type: string;
|
|
190
|
+
original_name?: string;
|
|
191
|
+
}, hint?: Hint): Promise<AttachmentView>;
|
|
192
|
+
/** Its bytes; a type Orbit won't show comes as `application/octet-stream`, with `download_only` set. */
|
|
193
|
+
content(ticketId: Id, attachmentId: Id, hint?: Hint): Promise<{
|
|
194
|
+
bytes: Uint8Array;
|
|
195
|
+
mime_type: string;
|
|
196
|
+
download_only: boolean;
|
|
197
|
+
original_name: string;
|
|
198
|
+
}>;
|
|
199
|
+
/** An address to show the image at (see ImageUrl). */
|
|
200
|
+
url(ticketId: Id, attachmentId: Id, hint?: Hint): Promise<ImageUrl>;
|
|
201
|
+
remove(ticketId: Id, attachmentId: Id, hint?: Hint): Promise<{
|
|
202
|
+
ok: true;
|
|
203
|
+
deleted_id: Id;
|
|
204
|
+
}>;
|
|
205
|
+
};
|
|
206
|
+
artifacts: {
|
|
207
|
+
read(ticketId: Id, path: string, hint?: Hint): Promise<StoredArtifact & {
|
|
208
|
+
content: string;
|
|
209
|
+
}>;
|
|
210
|
+
write(ticketId: Id, input: {
|
|
211
|
+
filename?: unknown;
|
|
212
|
+
path?: unknown;
|
|
213
|
+
content?: unknown;
|
|
214
|
+
}, hint?: Hint): Promise<StoredArtifact>;
|
|
215
|
+
};
|
|
216
|
+
verdicts: {
|
|
217
|
+
list(ticketId: Id, options?: {
|
|
218
|
+
limit?: unknown;
|
|
219
|
+
}, hint?: Hint): Promise<{
|
|
220
|
+
review_verdicts: VerdictView[];
|
|
221
|
+
}>;
|
|
222
|
+
create(ticketId: Id, input: NewVerdictInput, hint?: Hint): Promise<VerdictView>;
|
|
223
|
+
get(id: Id, board: Hint): Promise<VerdictView>;
|
|
224
|
+
};
|
|
225
|
+
entries: {
|
|
226
|
+
create(board: string, input: NewEntryInput): Promise<BoardEntry>;
|
|
227
|
+
update(id: Id, patch: {
|
|
228
|
+
struck?: unknown;
|
|
229
|
+
}, hint?: Hint): Promise<BoardEntry>;
|
|
230
|
+
/** Deletes a struck entry: a person's call (`forbidden` for an agent, `entry_not_struck` for a live one). */
|
|
231
|
+
remove(id: Id, hint?: Hint): Promise<{
|
|
232
|
+
ok: true;
|
|
233
|
+
deleted_id: Id;
|
|
234
|
+
}>;
|
|
235
|
+
};
|
|
236
|
+
relations: {
|
|
237
|
+
/** With `target_board` naming another board (slug or id), a link across boards, made on the waiting card's board. */
|
|
238
|
+
create(input: {
|
|
239
|
+
source_ticket_id?: unknown;
|
|
240
|
+
target_ticket_id?: unknown;
|
|
241
|
+
type?: unknown;
|
|
242
|
+
target_board?: unknown;
|
|
243
|
+
} & Hint): Promise<Relation | CrossBoardRelationAnswer>;
|
|
244
|
+
remove(id: Id, hint?: Hint): Promise<{
|
|
245
|
+
ok: true;
|
|
246
|
+
}>;
|
|
247
|
+
};
|
|
248
|
+
agent: {
|
|
249
|
+
claimNext(board: Hint, filters?: {
|
|
250
|
+
type?: unknown;
|
|
251
|
+
include_epics?: unknown;
|
|
252
|
+
}): Promise<ClaimAnswer>;
|
|
253
|
+
claim(input: Lookup & {
|
|
254
|
+
force?: unknown;
|
|
255
|
+
} & Hint): Promise<ClaimAnswer>;
|
|
256
|
+
checkpoint(input: {
|
|
257
|
+
ticket_id?: unknown;
|
|
258
|
+
message?: unknown;
|
|
259
|
+
} & Hint): Promise<ContextPack>;
|
|
260
|
+
complete(input: CompleteInput & Hint): Promise<ContextPack>;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* A board's committed changes, from any writer: watch() in process, the
|
|
264
|
+
* event stream over HTTP (which reconnects by itself, resuming after the
|
|
265
|
+
* last change heard). Returns the function that stops.
|
|
266
|
+
*/
|
|
267
|
+
changes(board: Id, listener: (change: BoardChange) => void, options?: ChangesOptions): () => void;
|
|
268
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One client for every Orbit: `OrbitClient`. `orbit.client(actor)` calls the
|
|
3
|
+
* core in this process (the CLI, `orbit mcp` on a computer); `createHttpClient`
|
|
4
|
+
* calls an Orbit over `fetch` (remote agents, the web app, the Suite). Its
|
|
5
|
+
* methods mirror the JSON API, one route to one method, and each answer is
|
|
6
|
+
* that route's answer.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orbit's agent surface: two MCP tools that take a command line (orbit_read,
|
|
3
|
+
* orbit_write), the server's `instructions`, and the per-instance llms.txt.
|
|
4
|
+
* All of it is written from the command table (./index.ts), so what agents
|
|
5
|
+
* are told is what runs.
|
|
6
|
+
*/
|
|
7
|
+
/** The `initialize` instructions. Codex reads the first 512 characters first, so all of it fits there. */
|
|
8
|
+
export declare const ORBIT_COMMAND_INSTRUCTIONS: string;
|
|
9
|
+
export interface ToolDefinition {
|
|
10
|
+
name: "orbit_read" | "orbit_write";
|
|
11
|
+
description: string;
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: "object";
|
|
14
|
+
properties: Record<string, {
|
|
15
|
+
type: "string";
|
|
16
|
+
description: string;
|
|
17
|
+
}>;
|
|
18
|
+
required: string[];
|
|
19
|
+
additionalProperties: false;
|
|
20
|
+
};
|
|
21
|
+
annotations: {
|
|
22
|
+
readOnlyHint: boolean;
|
|
23
|
+
destructiveHint?: boolean;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export declare function commandTools(): ToolDefinition[];
|
|
27
|
+
/** The onboarding text an instance serves at /llms.txt: how to connect, then the grammar. */
|
|
28
|
+
export declare function instanceLlmsTxt({ origin, version }: {
|
|
29
|
+
origin: string;
|
|
30
|
+
version: string;
|
|
31
|
+
}): string;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orbit's agent surface: two MCP tools that take a command line (orbit_read,
|
|
3
|
+
* orbit_write), the server's `instructions`, and the per-instance llms.txt.
|
|
4
|
+
* All of it is written from the command table (./index.ts), so what agents
|
|
5
|
+
* are told is what runs.
|
|
6
|
+
*/
|
|
7
|
+
import { COMMANDS } from "./index.js";
|
|
8
|
+
/** The `initialize` instructions. Codex reads the first 512 characters first, so all of it fits there. */
|
|
9
|
+
export const ORBIT_COMMAND_INSTRUCTIONS = [
|
|
10
|
+
"Orbit is the user's kanban board: cards (#12) in lanes. Start with orbit_read `view`.",
|
|
11
|
+
"Loop: orbit_write `take` (next AI Ready card, or `take #12`), do the work, then `finish #12` with a summary in text (it goes to Review).",
|
|
12
|
+
"Unclear? `ask #12` with what's missing, then stop.",
|
|
13
|
+
"The board's rules come with each card you take and win over these defaults: work on a branch, commit locally, never push or deploy.",
|
|
14
|
+
"`help` lists every command."
|
|
15
|
+
].join(" ");
|
|
16
|
+
const isRead = (command) => command.kind === "read";
|
|
17
|
+
/** Short usages for tool descriptions; a command that both reads and writes (boards) appears in each. */
|
|
18
|
+
function usages(kind, skip = []) {
|
|
19
|
+
return COMMANDS.filter((command) => !skip.includes(command.name))
|
|
20
|
+
.map((command) => (command.briefs ? command.briefs[kind] : isRead(command) === (kind === "read") ? command.brief : null))
|
|
21
|
+
.filter((brief) => Boolean(brief))
|
|
22
|
+
.join("; ");
|
|
23
|
+
}
|
|
24
|
+
export function commandTools() {
|
|
25
|
+
return [
|
|
26
|
+
{
|
|
27
|
+
name: "orbit_read",
|
|
28
|
+
description: `Read the user's Orbit board (kanban). One command line. Cards are #n, lanes by name. Commands: ${usages("read")}. Add --json for structured output.`,
|
|
29
|
+
inputSchema: {
|
|
30
|
+
type: "object",
|
|
31
|
+
properties: { command: { type: "string", description: "e.g. view, card #12" } },
|
|
32
|
+
required: ["command"],
|
|
33
|
+
additionalProperties: false
|
|
34
|
+
},
|
|
35
|
+
annotations: { readOnlyHint: true }
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "orbit_write",
|
|
39
|
+
description: "Change the user's Orbit board. One command line; long text (summary, note, description, question) goes in text. " +
|
|
40
|
+
"Loop: take [#n] -> do the work -> finish #n (text: what changed, how you checked; it goes to Review, never Done unless asked). " +
|
|
41
|
+
"Goal unclear: ask #n (text: what's missing), then stop. " +
|
|
42
|
+
`Also: ${usages("write", ["take", "finish", "ask"])}.`,
|
|
43
|
+
inputSchema: {
|
|
44
|
+
type: "object",
|
|
45
|
+
properties: {
|
|
46
|
+
command: { type: "string", description: "e.g. take, move #12 review, finish #12" },
|
|
47
|
+
text: { type: "string", description: "summary, note, description or question" }
|
|
48
|
+
},
|
|
49
|
+
required: ["command"],
|
|
50
|
+
additionalProperties: false
|
|
51
|
+
},
|
|
52
|
+
annotations: { readOnlyHint: false, destructiveHint: false }
|
|
53
|
+
}
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
/** The onboarding text an instance serves at /llms.txt: how to connect, then the grammar. */
|
|
57
|
+
export function instanceLlmsTxt({ origin, version }) {
|
|
58
|
+
const read = COMMANDS.filter(isRead).map((command) => ` ${command.usage}: ${command.summary}`);
|
|
59
|
+
const write = COMMANDS.filter((command) => !isRead(command)).map((command) => ` ${command.usage}: ${command.summary}`);
|
|
60
|
+
return [
|
|
61
|
+
"# Starscape Orbit",
|
|
62
|
+
"",
|
|
63
|
+
`> A kanban board for people and their agents. This instance: ${origin} (Orbit ${version}).`,
|
|
64
|
+
"",
|
|
65
|
+
"## Connect an agent",
|
|
66
|
+
"",
|
|
67
|
+
"MCP (Claude Code, Codex, Cursor, Goose, Hermes); needs Orbit installed where the agent runs (`npm i -g @starlove/orbit`):",
|
|
68
|
+
"",
|
|
69
|
+
"```",
|
|
70
|
+
`claude mcp add orbit --scope user -e ORBIT_MODE=remote -e ORBIT_API_URL=${origin} -e ORBIT_AGENT_NAME=<your-name> -- orbit mcp`,
|
|
71
|
+
"```",
|
|
72
|
+
"",
|
|
73
|
+
"It gives two tools: orbit_read and orbit_write, each taking one command line (long text in `text`).",
|
|
74
|
+
"",
|
|
75
|
+
"A shell works too, with no MCP at all:",
|
|
76
|
+
"",
|
|
77
|
+
"```",
|
|
78
|
+
`export ORBIT_MODE=remote ORBIT_API_URL=${origin} ORBIT_AGENT_NAME=<your-name>`,
|
|
79
|
+
"orbit view",
|
|
80
|
+
'orbit take && orbit finish 12 -m "what changed; how you checked"',
|
|
81
|
+
"```",
|
|
82
|
+
"",
|
|
83
|
+
`Or HTTP: POST ${origin}/api/cmd with {"command": "view", "board": "<slug>", "text": "..."}; headers x-orbit-actor-type: agent and x-orbit-agent-name: <your-name>.`,
|
|
84
|
+
"",
|
|
85
|
+
"## Commands",
|
|
86
|
+
"",
|
|
87
|
+
"Cards are #n (or board#n, or the link orbit:card/<board>/<n>); lanes by name; priorities are words. Add --json for structured output.",
|
|
88
|
+
"",
|
|
89
|
+
"Read:",
|
|
90
|
+
...read,
|
|
91
|
+
"",
|
|
92
|
+
"Write:",
|
|
93
|
+
...write,
|
|
94
|
+
"",
|
|
95
|
+
"## The loop",
|
|
96
|
+
"",
|
|
97
|
+
'take (the next AI Ready card, or take #n) -> do the work -> finish #n with what changed and how you checked it; the card goes to Review. If the goal or "done" is unclear: ask #n with what\'s missing, then stop. The board\'s rules arrive with each card you take and win over your defaults. Never edit Orbit\'s SQLite files.',
|
|
98
|
+
""
|
|
99
|
+
].join("\n");
|
|
100
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The command language: one grammar table (COMMANDS) that the CLI, both MCP
|
|
3
|
+
* tools (`orbit_read`, `orbit_write`) and `POST /api/cmd` all run, and from
|
|
4
|
+
* which help, the MCP tool descriptions and `/llms.txt` are written.
|
|
5
|
+
*
|
|
6
|
+
* Whether a line reads or writes is decided from its parsed words, before it
|
|
7
|
+
* runs, so no option can move a write past `orbit_read`'s check.
|
|
8
|
+
*/
|
|
9
|
+
import type { Actor } from "../core/model.ts";
|
|
10
|
+
import type { CommandInput, CommandReply } from "../client/types.ts";
|
|
11
|
+
import type { Args, FlagKind } from "./parse.ts";
|
|
12
|
+
import type { Session, Transport } from "./session.ts";
|
|
13
|
+
import type { Outcome } from "./verbs.ts";
|
|
14
|
+
export { createSession, repoBoardFromRequest } from "./session.ts";
|
|
15
|
+
export type { RepoChoice, RepoSource, Session, Transport } from "./session.ts";
|
|
16
|
+
export { cardLink, parseCardRef, shellSafe, tokenize } from "./parse.ts";
|
|
17
|
+
export { agentLines } from "./verbs.ts";
|
|
18
|
+
export type Kind = "read" | "write";
|
|
19
|
+
export interface Command {
|
|
20
|
+
name: string;
|
|
21
|
+
/** Its line in the MCP tools' descriptions; null to leave it out. */
|
|
22
|
+
brief?: string | null;
|
|
23
|
+
/** Lines for each tool, when the command both reads and writes. */
|
|
24
|
+
briefs?: {
|
|
25
|
+
read: string;
|
|
26
|
+
write: string;
|
|
27
|
+
};
|
|
28
|
+
aliases: string[];
|
|
29
|
+
/** Read or write, from the parsed words when it depends on them. */
|
|
30
|
+
kind: Kind | ((positional: string[], session: Session) => Kind);
|
|
31
|
+
/** How a refusal from orbit_read names the command. */
|
|
32
|
+
label?: (positional: string[]) => string;
|
|
33
|
+
/** A refusal from orbit_read that says more than "send it with orbit_write". */
|
|
34
|
+
readOnlyText?: (positional: string[]) => string | null;
|
|
35
|
+
usage: string;
|
|
36
|
+
summary: string;
|
|
37
|
+
/** Takes long text (-m, the text field). */
|
|
38
|
+
text?: boolean;
|
|
39
|
+
flags?: Record<string, FlagKind>;
|
|
40
|
+
run: (session: Session, args: Args) => Promise<Outcome>;
|
|
41
|
+
}
|
|
42
|
+
export declare const COMMANDS: readonly Command[];
|
|
43
|
+
/** `help` (or `help <command>`) for an actor and transport, without a data folder: it reads no board. */
|
|
44
|
+
export declare function helpText(actor: Actor, transport: Transport, words?: string[]): Promise<{
|
|
45
|
+
ok: boolean;
|
|
46
|
+
text: string;
|
|
47
|
+
}>;
|
|
48
|
+
/** A command by name or alias. */
|
|
49
|
+
export declare function commandNamed(word: string): Command | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Runs one command line. Never throws for a mistake in the line: that comes
|
|
52
|
+
* back as ok false with a text that says how to put it right.
|
|
53
|
+
*/
|
|
54
|
+
export declare function runCommand(input: CommandInput & {
|
|
55
|
+
line?: string;
|
|
56
|
+
}, session: Session): Promise<CommandReply>;
|