@versatly/workgraph 0.2.0 → 0.3.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/dist/cli.js CHANGED
@@ -1,22 +1,27 @@
1
1
  import {
2
2
  bases_exports,
3
3
  board_exports,
4
+ clawdapus_exports,
4
5
  command_center_exports,
6
+ integration_exports,
7
+ onboard_exports,
8
+ search_qmd_adapter_exports,
9
+ skill_exports,
10
+ trigger_exports,
11
+ workspace_exports
12
+ } from "./chunk-E3QU5Y53.js";
13
+ import {
5
14
  dispatch_exports,
6
15
  graph_exports,
7
16
  ledger_exports,
8
- onboard_exports,
17
+ mcp_server_exports,
9
18
  orientation_exports,
10
19
  policy_exports,
11
20
  query_exports,
12
21
  registry_exports,
13
- search_qmd_adapter_exports,
14
- skill_exports,
15
22
  store_exports,
16
- thread_exports,
17
- trigger_exports,
18
- workspace_exports
19
- } from "./chunk-XUMA4O2Z.js";
23
+ thread_exports
24
+ } from "./chunk-65ZMX2WM.js";
20
25
 
21
26
  // src/cli.ts
22
27
  import fs from "fs";
@@ -512,6 +517,40 @@ addWorkspaceOption(
512
517
  ]
513
518
  )
514
519
  );
520
+ var integrationCmd = program.command("integration").description("Manage optional third-party integrations");
521
+ addWorkspaceOption(
522
+ integrationCmd.command("list").description("List supported optional integrations").option("--json", "Emit structured JSON output")
523
+ ).action(
524
+ (opts) => runCommand(
525
+ opts,
526
+ () => ({
527
+ integrations: integration_exports.listIntegrations()
528
+ }),
529
+ (result) => result.integrations.map((integration) => `${integration.id} (${integration.defaultTitle}) -> ${integration.defaultSourceUrl}`)
530
+ )
531
+ );
532
+ addWorkspaceOption(
533
+ integrationCmd.command("install <integrationName>").description("Install an optional integration into this workspace").option("-a, --actor <name>", "Agent name", DEFAULT_ACTOR).option("--owner <name>", "Skill owner override").option("--title <title>", "Skill title to store in workgraph").option("--source-url <url>", "Source URL override for integration content").option("--force", "Overwrite an existing imported integration skill").option("--json", "Emit structured JSON output")
534
+ ).action(
535
+ (integrationName, opts) => runCommand(
536
+ opts,
537
+ () => installNamedIntegration(resolveWorkspacePath(opts), integrationName, opts),
538
+ renderInstalledIntegrationResult
539
+ )
540
+ );
541
+ addWorkspaceOption(
542
+ integrationCmd.command("clawdapus").description("Import Clawdapus SKILL.md into this workspace").option("-a, --actor <name>", "Agent name", DEFAULT_ACTOR).option("--owner <name>", "Skill owner override").option("--title <title>", "Skill title to store in workgraph", "clawdapus").option(
543
+ "--source-url <url>",
544
+ "Source URL for Clawdapus SKILL.md",
545
+ clawdapus_exports.DEFAULT_CLAWDAPUS_SKILL_URL
546
+ ).option("--force", "Overwrite an existing imported Clawdapus skill").option("--json", "Emit structured JSON output")
547
+ ).action(
548
+ (opts) => runCommand(
549
+ opts,
550
+ () => installNamedIntegration(resolveWorkspacePath(opts), "clawdapus", opts),
551
+ renderInstalledIntegrationResult
552
+ )
553
+ );
515
554
  var ledgerCmd = program.command("ledger").description("Inspect the append-only workgraph ledger");
516
555
  addWorkspaceOption(
517
556
  ledgerCmd.command("show").description("Show recent ledger entries").option("-n, --count <n>", "Number of entries", "20").option("--actor <name>", "Filter by actor").option("--json", "Emit structured JSON output")
@@ -933,6 +972,39 @@ addWorkspaceOption(
933
972
  (result) => [`Run created: ${result.run.id} [${result.run.status}]`]
934
973
  )
935
974
  );
975
+ addWorkspaceOption(
976
+ dispatchCmd.command("create-execute <objective>").description("Create and execute a run with autonomous multi-agent coordination").option("-a, --actor <name>", "Actor", DEFAULT_ACTOR).option("--adapter <name>", "Adapter name", "cursor-cloud").option("--idempotency-key <key>", "Idempotency key").option("--agents <actors>", "Comma-separated agent identities for autonomous execution").option("--max-steps <n>", "Maximum scheduler steps", "200").option("--step-delay-ms <ms>", "Delay between scheduling steps", "25").option("--space <spaceRef>", "Restrict execution to one space").option("--no-checkpoint", "Skip automatic checkpoint generation after execution").option("--json", "Emit structured JSON output")
977
+ ).action(
978
+ (objective, opts) => runCommand(
979
+ opts,
980
+ async () => {
981
+ const workspacePath = resolveWorkspacePath(opts);
982
+ return {
983
+ run: await dispatch_exports.createAndExecuteRun(
984
+ workspacePath,
985
+ {
986
+ actor: opts.actor,
987
+ adapter: opts.adapter,
988
+ objective,
989
+ idempotencyKey: opts.idempotencyKey
990
+ },
991
+ {
992
+ agents: csv(opts.agents),
993
+ maxSteps: Number.parseInt(String(opts.maxSteps), 10),
994
+ stepDelayMs: Number.parseInt(String(opts.stepDelayMs), 10),
995
+ space: opts.space,
996
+ createCheckpoint: opts.checkpoint
997
+ }
998
+ )
999
+ };
1000
+ },
1001
+ (result) => [
1002
+ `Run executed: ${result.run.id} [${result.run.status}]`,
1003
+ ...result.run.output ? [`Output: ${result.run.output}`] : [],
1004
+ ...result.run.error ? [`Error: ${result.run.error}`] : []
1005
+ ]
1006
+ )
1007
+ );
936
1008
  addWorkspaceOption(
937
1009
  dispatchCmd.command("list").description("List runs").option("--status <status>", "queued|running|succeeded|failed|cancelled").option("--limit <n>", "Result limit").option("--json", "Emit structured JSON output")
938
1010
  ).action(
@@ -964,6 +1036,31 @@ addWorkspaceOption(
964
1036
  (result) => [`${result.run.id} [${result.run.status}]`]
965
1037
  )
966
1038
  );
1039
+ addWorkspaceOption(
1040
+ dispatchCmd.command("execute <runId>").description("Execute a queued/running run via adapter autonomous scheduling").option("-a, --actor <name>", "Actor", DEFAULT_ACTOR).option("--agents <actors>", "Comma-separated agent identities").option("--max-steps <n>", "Maximum scheduler steps", "200").option("--step-delay-ms <ms>", "Delay between scheduling steps", "25").option("--space <spaceRef>", "Restrict execution to one space").option("--no-checkpoint", "Skip automatic checkpoint generation after execution").option("--json", "Emit structured JSON output")
1041
+ ).action(
1042
+ (runId, opts) => runCommand(
1043
+ opts,
1044
+ async () => {
1045
+ const workspacePath = resolveWorkspacePath(opts);
1046
+ return {
1047
+ run: await dispatch_exports.executeRun(workspacePath, runId, {
1048
+ actor: opts.actor,
1049
+ agents: csv(opts.agents),
1050
+ maxSteps: Number.parseInt(String(opts.maxSteps), 10),
1051
+ stepDelayMs: Number.parseInt(String(opts.stepDelayMs), 10),
1052
+ space: opts.space,
1053
+ createCheckpoint: opts.checkpoint
1054
+ })
1055
+ };
1056
+ },
1057
+ (result) => [
1058
+ `Run executed: ${result.run.id} [${result.run.status}]`,
1059
+ ...result.run.output ? [`Output: ${result.run.output}`] : [],
1060
+ ...result.run.error ? [`Error: ${result.run.error}`] : []
1061
+ ]
1062
+ )
1063
+ );
967
1064
  addWorkspaceOption(
968
1065
  dispatchCmd.command("followup <runId> <input>").description("Send follow-up input to a run").option("-a, --actor <name>", "Actor", DEFAULT_ACTOR).option("--json", "Emit structured JSON output")
969
1066
  ).action(
@@ -1107,7 +1204,19 @@ addWorkspaceOption(
1107
1204
  (result) => [`Updated onboarding: ${result.onboarding.path} [${String(result.onboarding.fields.status)}]`]
1108
1205
  )
1109
1206
  );
1110
- program.parse();
1207
+ var mcpCmd = program.command("mcp").description("Run Workgraph MCP server");
1208
+ addWorkspaceOption(
1209
+ mcpCmd.command("serve").description("Serve stdio MCP tools/resources for this workspace").option("-a, --actor <name>", "Default actor for MCP write tools", DEFAULT_ACTOR).option("--read-only", "Disable all MCP write tools")
1210
+ ).action(async (opts) => {
1211
+ const workspacePath = resolveWorkspacePath(opts);
1212
+ console.error(`Starting MCP server for workspace: ${workspacePath}`);
1213
+ await mcp_server_exports.startWorkgraphMcpServer({
1214
+ workspacePath,
1215
+ defaultActor: opts.actor,
1216
+ readOnly: !!opts.readOnly
1217
+ });
1218
+ });
1219
+ await program.parseAsync();
1111
1220
  function addWorkspaceOption(command) {
1112
1221
  return command.option("-w, --workspace <path>", "Workgraph workspace path").option("--vault <path>", "Alias for --workspace").option("--shared-vault <path>", "Shared vault path (e.g. mounted via Tailscale)");
1113
1222
  }
@@ -1134,6 +1243,22 @@ function csv(value) {
1134
1243
  if (!value) return void 0;
1135
1244
  return String(value).split(",").map((s) => s.trim()).filter(Boolean);
1136
1245
  }
1246
+ function installNamedIntegration(workspacePath, integrationName, opts) {
1247
+ return integration_exports.installIntegration(workspacePath, integrationName, {
1248
+ actor: opts.actor,
1249
+ owner: opts.owner,
1250
+ title: opts.title,
1251
+ sourceUrl: opts.sourceUrl,
1252
+ force: !!opts.force
1253
+ });
1254
+ }
1255
+ function renderInstalledIntegrationResult(result) {
1256
+ return [
1257
+ `${result.replacedExisting ? "Updated" : "Installed"} ${result.provider} integration skill: ${result.skill.path}`,
1258
+ `Source: ${result.sourceUrl}`,
1259
+ `Status: ${String(result.skill.fields.status)}`
1260
+ ];
1261
+ }
1137
1262
  function parseScalar(value) {
1138
1263
  if (value === "true") return true;
1139
1264
  if (value === "false") return false;
@@ -1173,9 +1298,9 @@ function wantsJson(opts) {
1173
1298
  if (process.env.WORKGRAPH_JSON === "1") return true;
1174
1299
  return false;
1175
1300
  }
1176
- function runCommand(opts, action, renderText) {
1301
+ async function runCommand(opts, action, renderText) {
1177
1302
  try {
1178
- const result = action();
1303
+ const result = await action();
1179
1304
  if (wantsJson(opts)) {
1180
1305
  console.log(JSON.stringify({ ok: true, data: result }, null, 2));
1181
1306
  return;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ export { m as mcpServer } from './mcp-server-fU6U6ht8.js';
2
+ import '@modelcontextprotocol/sdk/server/mcp.js';
3
+
1
4
  /**
2
5
  * Workgraph type definitions.
3
6
  */
@@ -693,7 +696,7 @@ declare namespace policy {
693
696
  }
694
697
 
695
698
  /**
696
- * Runtime dispatch contract (MVP local adapter).
699
+ * Runtime dispatch contract with adapter-backed execution.
697
700
  */
698
701
 
699
702
  interface DispatchCreateInput {
@@ -703,6 +706,14 @@ interface DispatchCreateInput {
703
706
  context?: Record<string, unknown>;
704
707
  idempotencyKey?: string;
705
708
  }
709
+ interface DispatchExecuteInput {
710
+ actor: string;
711
+ agents?: string[];
712
+ maxSteps?: number;
713
+ stepDelayMs?: number;
714
+ space?: string;
715
+ createCheckpoint?: boolean;
716
+ }
706
717
  declare function createRun(workspacePath: string, input: DispatchCreateInput): DispatchRun;
707
718
  declare function status(workspacePath: string, runId: string): DispatchRun;
708
719
  declare function followup(workspacePath: string, runId: string, actor: string, input: string): DispatchRun;
@@ -710,15 +721,21 @@ declare function stop(workspacePath: string, runId: string, actor: string): Disp
710
721
  declare function markRun(workspacePath: string, runId: string, actor: string, nextStatus: Exclude<RunStatus, 'queued'>, options?: {
711
722
  output?: string;
712
723
  error?: string;
724
+ contextPatch?: Record<string, unknown>;
713
725
  }): DispatchRun;
714
726
  declare function logs(workspacePath: string, runId: string): DispatchRun['logs'];
715
727
  declare function listRuns(workspacePath: string, options?: {
716
728
  status?: RunStatus;
717
729
  limit?: number;
718
730
  }): DispatchRun[];
731
+ declare function executeRun(workspacePath: string, runId: string, input: DispatchExecuteInput): Promise<DispatchRun>;
732
+ declare function createAndExecuteRun(workspacePath: string, createInput: DispatchCreateInput, executeInput?: Omit<DispatchExecuteInput, 'actor'>): Promise<DispatchRun>;
719
733
 
720
734
  type dispatch_DispatchCreateInput = DispatchCreateInput;
735
+ type dispatch_DispatchExecuteInput = DispatchExecuteInput;
736
+ declare const dispatch_createAndExecuteRun: typeof createAndExecuteRun;
721
737
  declare const dispatch_createRun: typeof createRun;
738
+ declare const dispatch_executeRun: typeof executeRun;
722
739
  declare const dispatch_followup: typeof followup;
723
740
  declare const dispatch_listRuns: typeof listRuns;
724
741
  declare const dispatch_logs: typeof logs;
@@ -726,7 +743,7 @@ declare const dispatch_markRun: typeof markRun;
726
743
  declare const dispatch_status: typeof status;
727
744
  declare const dispatch_stop: typeof stop;
728
745
  declare namespace dispatch {
729
- export { type dispatch_DispatchCreateInput as DispatchCreateInput, dispatch_createRun as createRun, dispatch_followup as followup, dispatch_listRuns as listRuns, dispatch_logs as logs, dispatch_markRun as markRun, dispatch_status as status, dispatch_stop as stop };
746
+ export { type dispatch_DispatchCreateInput as DispatchCreateInput, type dispatch_DispatchExecuteInput as DispatchExecuteInput, dispatch_createAndExecuteRun as createAndExecuteRun, dispatch_createRun as createRun, dispatch_executeRun as executeRun, dispatch_followup as followup, dispatch_listRuns as listRuns, dispatch_logs as logs, dispatch_markRun as markRun, dispatch_status as status, dispatch_stop as stop };
730
747
  }
731
748
 
732
749
  /**
@@ -811,4 +828,120 @@ declare namespace trigger {
811
828
  export { type trigger_FireTriggerOptions as FireTriggerOptions, type trigger_FireTriggerResult as FireTriggerResult, trigger_fireTrigger as fireTrigger };
812
829
  }
813
830
 
814
- export { type DispatchRun, type FieldDefinition, type LedgerChainState, type LedgerEntry, type LedgerIndex, type LedgerOp, type PolicyParty, type PolicyRegistry, type PrimitiveInstance, type PrimitiveQueryFilters, type PrimitiveTypeDefinition, type Registry, type RunStatus, THREAD_STATUS_TRANSITIONS, type ThreadStatus, type WorkgraphBrief, type WorkgraphStatusSnapshot, type WorkgraphWorkspaceConfig, bases, board, commandCenter, dispatch, graph, ledger, onboard, orientation, policy, query, registry, searchQmdAdapter, skill, store, thread, trigger, workspace };
831
+ interface SkillIntegrationProvider {
832
+ id: string;
833
+ defaultTitle: string;
834
+ defaultSourceUrl: string;
835
+ distribution: string;
836
+ defaultTags: string[];
837
+ userAgent?: string;
838
+ }
839
+ interface InstallSkillIntegrationOptions {
840
+ actor: string;
841
+ owner?: string;
842
+ title?: string;
843
+ sourceUrl?: string;
844
+ force?: boolean;
845
+ status?: WriteSkillOptions['status'];
846
+ tags?: string[];
847
+ fetchSkillMarkdown?: (sourceUrl: string) => Promise<string>;
848
+ }
849
+ interface InstallSkillIntegrationResult {
850
+ provider: string;
851
+ skill: PrimitiveInstance;
852
+ sourceUrl: string;
853
+ importedAt: string;
854
+ replacedExisting: boolean;
855
+ }
856
+ declare function installSkillIntegration(workspacePath: string, provider: SkillIntegrationProvider, options: InstallSkillIntegrationOptions): Promise<InstallSkillIntegrationResult>;
857
+ declare function fetchSkillMarkdownFromUrl(sourceUrl: string, userAgent?: string): Promise<string>;
858
+
859
+ declare const DEFAULT_CLAWDAPUS_SKILL_URL = "https://raw.githubusercontent.com/mostlydev/clawdapus/master/skills/clawdapus/SKILL.md";
860
+ declare const CLAWDAPUS_INTEGRATION_PROVIDER: SkillIntegrationProvider;
861
+ type InstallClawdapusSkillOptions = InstallSkillIntegrationOptions;
862
+ type InstallClawdapusSkillResult = InstallSkillIntegrationResult;
863
+ declare function installClawdapusSkill(workspacePath: string, options: InstallClawdapusSkillOptions): Promise<InstallClawdapusSkillResult>;
864
+ declare function fetchClawdapusSkillMarkdown(sourceUrl: string): Promise<string>;
865
+
866
+ declare const clawdapus_CLAWDAPUS_INTEGRATION_PROVIDER: typeof CLAWDAPUS_INTEGRATION_PROVIDER;
867
+ declare const clawdapus_DEFAULT_CLAWDAPUS_SKILL_URL: typeof DEFAULT_CLAWDAPUS_SKILL_URL;
868
+ type clawdapus_InstallClawdapusSkillOptions = InstallClawdapusSkillOptions;
869
+ type clawdapus_InstallClawdapusSkillResult = InstallClawdapusSkillResult;
870
+ declare const clawdapus_fetchClawdapusSkillMarkdown: typeof fetchClawdapusSkillMarkdown;
871
+ declare const clawdapus_installClawdapusSkill: typeof installClawdapusSkill;
872
+ declare namespace clawdapus {
873
+ export { clawdapus_CLAWDAPUS_INTEGRATION_PROVIDER as CLAWDAPUS_INTEGRATION_PROVIDER, clawdapus_DEFAULT_CLAWDAPUS_SKILL_URL as DEFAULT_CLAWDAPUS_SKILL_URL, type clawdapus_InstallClawdapusSkillOptions as InstallClawdapusSkillOptions, type clawdapus_InstallClawdapusSkillResult as InstallClawdapusSkillResult, clawdapus_fetchClawdapusSkillMarkdown as fetchClawdapusSkillMarkdown, clawdapus_installClawdapusSkill as installClawdapusSkill };
874
+ }
875
+
876
+ interface IntegrationDescriptor {
877
+ id: string;
878
+ description: string;
879
+ defaultTitle: string;
880
+ defaultSourceUrl: string;
881
+ }
882
+ declare function listIntegrations(): IntegrationDescriptor[];
883
+ declare function installIntegration(workspacePath: string, integrationId: string, options: InstallSkillIntegrationOptions): Promise<InstallSkillIntegrationResult>;
884
+
885
+ type integration_IntegrationDescriptor = IntegrationDescriptor;
886
+ declare const integration_installIntegration: typeof installIntegration;
887
+ declare const integration_listIntegrations: typeof listIntegrations;
888
+ declare namespace integration {
889
+ export { type integration_IntegrationDescriptor as IntegrationDescriptor, integration_installIntegration as installIntegration, integration_listIntegrations as listIntegrations };
890
+ }
891
+
892
+ interface DispatchAdapterCreateInput {
893
+ actor: string;
894
+ objective: string;
895
+ idempotencyKey?: string;
896
+ context?: Record<string, unknown>;
897
+ }
898
+ interface DispatchAdapterRunStatus {
899
+ runId: string;
900
+ status: RunStatus;
901
+ }
902
+ interface DispatchAdapterLogEntry {
903
+ ts: string;
904
+ level: 'info' | 'warn' | 'error';
905
+ message: string;
906
+ }
907
+ interface DispatchAdapterExecutionInput {
908
+ workspacePath: string;
909
+ runId: string;
910
+ actor: string;
911
+ objective: string;
912
+ context?: Record<string, unknown>;
913
+ agents?: string[];
914
+ maxSteps?: number;
915
+ stepDelayMs?: number;
916
+ space?: string;
917
+ createCheckpoint?: boolean;
918
+ isCancelled?: () => boolean;
919
+ }
920
+ interface DispatchAdapterExecutionResult {
921
+ status: RunStatus;
922
+ output?: string;
923
+ error?: string;
924
+ logs: DispatchAdapterLogEntry[];
925
+ metrics?: Record<string, unknown>;
926
+ }
927
+ interface DispatchAdapter {
928
+ name: string;
929
+ create(input: DispatchAdapterCreateInput): Promise<DispatchAdapterRunStatus>;
930
+ status(runId: string): Promise<DispatchAdapterRunStatus>;
931
+ followup(runId: string, actor: string, input: string): Promise<DispatchAdapterRunStatus>;
932
+ stop(runId: string, actor: string): Promise<DispatchAdapterRunStatus>;
933
+ logs(runId: string): Promise<DispatchAdapterLogEntry[]>;
934
+ execute?(input: DispatchAdapterExecutionInput): Promise<DispatchAdapterExecutionResult>;
935
+ }
936
+
937
+ declare class CursorCloudAdapter implements DispatchAdapter {
938
+ name: string;
939
+ create(_input: DispatchAdapterCreateInput): Promise<DispatchAdapterRunStatus>;
940
+ status(runId: string): Promise<DispatchAdapterRunStatus>;
941
+ followup(runId: string, _actor: string, _input: string): Promise<DispatchAdapterRunStatus>;
942
+ stop(runId: string, _actor: string): Promise<DispatchAdapterRunStatus>;
943
+ logs(_runId: string): Promise<DispatchAdapterLogEntry[]>;
944
+ execute(input: DispatchAdapterExecutionInput): Promise<DispatchAdapterExecutionResult>;
945
+ }
946
+
947
+ export { CursorCloudAdapter, type DispatchAdapter, type DispatchAdapterCreateInput, type DispatchAdapterExecutionInput, type DispatchAdapterExecutionResult, type DispatchAdapterLogEntry, type DispatchAdapterRunStatus, type DispatchRun, type FieldDefinition, type InstallSkillIntegrationOptions, type InstallSkillIntegrationResult, type LedgerChainState, type LedgerEntry, type LedgerIndex, type LedgerOp, type PolicyParty, type PolicyRegistry, type PrimitiveInstance, type PrimitiveQueryFilters, type PrimitiveTypeDefinition, type Registry, type RunStatus, type SkillIntegrationProvider, THREAD_STATUS_TRANSITIONS, type ThreadStatus, type WorkgraphBrief, type WorkgraphStatusSnapshot, type WorkgraphWorkspaceConfig, bases, board, clawdapus, commandCenter, dispatch, fetchSkillMarkdownFromUrl, graph, installSkillIntegration, integration, ledger, onboard, orientation, policy, query, registry, searchQmdAdapter, skill, store, thread, trigger, workspace };
package/dist/index.js CHANGED
@@ -1,31 +1,45 @@
1
1
  import {
2
- THREAD_STATUS_TRANSITIONS,
3
2
  bases_exports,
4
3
  board_exports,
4
+ clawdapus_exports,
5
5
  command_center_exports,
6
+ fetchSkillMarkdownFromUrl,
7
+ installSkillIntegration,
8
+ integration_exports,
9
+ onboard_exports,
10
+ search_qmd_adapter_exports,
11
+ skill_exports,
12
+ trigger_exports,
13
+ workspace_exports
14
+ } from "./chunk-E3QU5Y53.js";
15
+ import {
16
+ CursorCloudAdapter,
17
+ THREAD_STATUS_TRANSITIONS,
6
18
  dispatch_exports,
7
19
  graph_exports,
8
20
  ledger_exports,
9
- onboard_exports,
21
+ mcp_server_exports,
10
22
  orientation_exports,
11
23
  policy_exports,
12
24
  query_exports,
13
25
  registry_exports,
14
- search_qmd_adapter_exports,
15
- skill_exports,
16
26
  store_exports,
17
- thread_exports,
18
- trigger_exports,
19
- workspace_exports
20
- } from "./chunk-XUMA4O2Z.js";
27
+ thread_exports
28
+ } from "./chunk-65ZMX2WM.js";
21
29
  export {
30
+ CursorCloudAdapter,
22
31
  THREAD_STATUS_TRANSITIONS,
23
32
  bases_exports as bases,
24
33
  board_exports as board,
34
+ clawdapus_exports as clawdapus,
25
35
  command_center_exports as commandCenter,
26
36
  dispatch_exports as dispatch,
37
+ fetchSkillMarkdownFromUrl,
27
38
  graph_exports as graph,
39
+ installSkillIntegration,
40
+ integration_exports as integration,
28
41
  ledger_exports as ledger,
42
+ mcp_server_exports as mcpServer,
29
43
  onboard_exports as onboard,
30
44
  orientation_exports as orientation,
31
45
  policy_exports as policy,
@@ -0,0 +1,20 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+
3
+ interface WorkgraphMcpServerOptions {
4
+ workspacePath: string;
5
+ defaultActor?: string;
6
+ readOnly?: boolean;
7
+ name?: string;
8
+ version?: string;
9
+ }
10
+ declare function createWorkgraphMcpServer(options: WorkgraphMcpServerOptions): McpServer;
11
+ declare function startWorkgraphMcpServer(options: WorkgraphMcpServerOptions): Promise<McpServer>;
12
+
13
+ type mcpServer_WorkgraphMcpServerOptions = WorkgraphMcpServerOptions;
14
+ declare const mcpServer_createWorkgraphMcpServer: typeof createWorkgraphMcpServer;
15
+ declare const mcpServer_startWorkgraphMcpServer: typeof startWorkgraphMcpServer;
16
+ declare namespace mcpServer {
17
+ export { type mcpServer_WorkgraphMcpServerOptions as WorkgraphMcpServerOptions, mcpServer_createWorkgraphMcpServer as createWorkgraphMcpServer, mcpServer_startWorkgraphMcpServer as startWorkgraphMcpServer };
18
+ }
19
+
20
+ export { type WorkgraphMcpServerOptions as W, createWorkgraphMcpServer as c, mcpServer as m, startWorkgraphMcpServer as s };
@@ -0,0 +1,2 @@
1
+ import '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export { W as WorkgraphMcpServerOptions, c as createWorkgraphMcpServer, s as startWorkgraphMcpServer } from './mcp-server-fU6U6ht8.js';
@@ -0,0 +1,8 @@
1
+ import {
2
+ createWorkgraphMcpServer,
3
+ startWorkgraphMcpServer
4
+ } from "./chunk-65ZMX2WM.js";
5
+ export {
6
+ createWorkgraphMcpServer,
7
+ startWorkgraphMcpServer
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versatly/workgraph",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Agent-first workgraph workspace for multi-agent coordination with dynamic primitives, append-only ledger, and markdown-native storage.",
5
5
  "workspaces": [
6
6
  "packages/*"
@@ -14,6 +14,10 @@
14
14
  "types": "./dist/index.d.ts",
15
15
  "import": "./dist/index.js"
16
16
  },
17
+ "./mcp-server": {
18
+ "types": "./dist/mcp-server.d.ts",
19
+ "import": "./dist/mcp-server.js"
20
+ },
17
21
  "./cli": {
18
22
  "types": "./dist/cli.d.ts",
19
23
  "import": "./dist/cli.js"
@@ -30,7 +34,7 @@
30
34
  "SKILL.md"
31
35
  ],
32
36
  "scripts": {
33
- "build": "tsup src/index.ts src/cli.ts --format esm --dts --clean",
37
+ "build": "tsup src/index.ts src/cli.ts src/mcp-server.ts --format esm --dts --clean",
34
38
  "build:packages": "npm run build --workspaces --if-present",
35
39
  "typecheck": "tsc --noEmit",
36
40
  "typecheck:packages": "npm run typecheck --workspaces --if-present",
@@ -63,9 +67,11 @@
63
67
  "node": ">=18"
64
68
  },
65
69
  "dependencies": {
70
+ "@modelcontextprotocol/sdk": "^1.27.1",
66
71
  "commander": "^12.0.0",
67
72
  "gray-matter": "^4.0.3",
68
- "yaml": "^2.8.1"
73
+ "yaml": "^2.8.1",
74
+ "zod": "^4.3.6"
69
75
  },
70
76
  "devDependencies": {
71
77
  "@types/node": "^20.11.0",