@firfi/huly-mcp 0.1.44 → 0.1.45

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/index.cjs CHANGED
@@ -83046,20 +83046,20 @@ var require_rest = __commonJS({
83046
83046
  __export2(rest_exports, {
83047
83047
  RestClientImpl: () => RestClientImpl,
83048
83048
  connectRest: () => connectRest2,
83049
- createRestClient: () => createRestClient
83049
+ createRestClient: () => createRestClient2
83050
83050
  });
83051
83051
  module2.exports = __toCommonJS2(rest_exports);
83052
83052
  var import_core42 = require_lib4();
83053
83053
  var import_platform2 = require_lib();
83054
83054
  var import_utils14 = require_utils9();
83055
83055
  var import_utils22 = require_utils10();
83056
- function createRestClient(endpoint, workspaceId, token) {
83056
+ function createRestClient2(endpoint, workspaceId, token) {
83057
83057
  return new RestClientImpl(endpoint, workspaceId, token);
83058
83058
  }
83059
- __name(createRestClient, "createRestClient");
83059
+ __name(createRestClient2, "createRestClient");
83060
83060
  async function connectRest2(url4, options) {
83061
83061
  const { endpoint, token, workspaceId } = await (0, import_utils14.getWorkspaceToken)(url4, options);
83062
- return createRestClient(endpoint, workspaceId, token);
83062
+ return createRestClient2(endpoint, workspaceId, token);
83063
83063
  }
83064
83064
  __name(connectRest2, "connectRest");
83065
83065
  var rateLimitError = "rate-limit";
@@ -154184,7 +154184,7 @@ var HulyClient = class _HulyClient extends Context_exports.Tag("@hulymcp/HulyCli
154184
154184
  _HulyClient,
154185
154185
  Effect_exports.gen(function* () {
154186
154186
  const config3 = yield* HulyConfigService;
154187
- const { client, markupOps } = yield* connectRestWithRetry({
154187
+ const { accountUuid, client, markupOps } = yield* connectRestWithRetry({
154188
154188
  url: config3.url,
154189
154189
  auth: config3.auth,
154190
154190
  workspace: config3.workspace
@@ -154197,6 +154197,7 @@ var HulyClient = class _HulyClient extends Context_exports.Tag("@hulymcp/HulyCli
154197
154197
  })
154198
154198
  });
154199
154199
  const operations = {
154200
+ getAccountUuid: () => accountUuid,
154200
154201
  findAll: (_class, query, options) => withClient(
154201
154202
  (client2) => client2.findAll(_class, query, options),
154202
154203
  "findAll failed"
@@ -154260,6 +154261,8 @@ var HulyClient = class _HulyClient extends Context_exports.Tag("@hulymcp/HulyCli
154260
154261
  const notImplemented = (name) => () => Effect_exports.die(new Error(`${name} not implemented in test layer`));
154261
154262
  const noopFetchMarkup = () => Effect_exports.succeed("");
154262
154263
  const defaultOps = {
154264
+ // AccountUuid is a double-branded string type with no public constructor
154265
+ getAccountUuid: () => "test-account-uuid",
154263
154266
  findAll: noopFindAll,
154264
154267
  findOne: noopFindOne,
154265
154268
  createDoc: notImplemented("createDoc"),
@@ -154301,6 +154304,8 @@ var connectRest = async (config3) => {
154301
154304
  authOptions,
154302
154305
  serverConfig
154303
154306
  );
154307
+ const restClient = (0, import_api_client.createRestClient)(endpoint, workspaceId, token);
154308
+ const account = await restClient.getAccount();
154304
154309
  const client = await (0, import_api_client.createRestTxOperations)(endpoint, workspaceId, token);
154305
154310
  const markupOps = createMarkupOps(
154306
154311
  config3.url,
@@ -154308,7 +154313,7 @@ var connectRest = async (config3) => {
154308
154313
  token,
154309
154314
  serverConfig.COLLABORATOR_URL
154310
154315
  );
154311
- return { client, markupOps };
154316
+ return { client, accountUuid: account.uuid, markupOps };
154312
154317
  };
154313
154318
  var connectRestWithRetry = (config3) => connectWithRetry(() => connectRest(config3), "Connection failed");
154314
154319
 
@@ -174027,7 +174032,7 @@ var PostHog = class extends PostHogBackendClient {
174027
174032
  };
174028
174033
 
174029
174034
  // src/version.ts
174030
- var VERSION = true ? "0.1.43" : "0.0.0-dev";
174035
+ var VERSION = true ? "0.1.45" : "0.0.0-dev";
174031
174036
 
174032
174037
  // src/telemetry/posthog.ts
174033
174038
  var POSTHOG_API_KEY = "phc_TGfFqCGdnF0p68wuFzd5WSw1IsBvOJW0YgoMJDyZPjm";
@@ -174951,7 +174956,8 @@ var createTeamspace = (params) => Effect_exports.gen(function* () {
174951
174956
  description: params.description ?? "",
174952
174957
  private: params.private ?? false,
174953
174958
  archived: false,
174954
- members: [],
174959
+ members: [client.getAccountUuid()],
174960
+ owners: [client.getAccountUuid()],
174955
174961
  icon: documentPlugin.icon.Teamspace,
174956
174962
  type: documentPlugin.spaceType.DefaultTeamspaceType
174957
174963
  };
@@ -179161,7 +179167,8 @@ var createChannel = (params) => Effect_exports.gen(function* () {
179161
179167
  description: "",
179162
179168
  private: params.private ?? false,
179163
179169
  archived: false,
179164
- members: []
179170
+ members: [client.getAccountUuid()],
179171
+ owners: [client.getAccountUuid()]
179165
179172
  };
179166
179173
  yield* client.createDoc(
179167
179174
  chunter.class.Channel,
@@ -182601,7 +182608,8 @@ var createProject = (params) => Effect_exports.gen(function* () {
182601
182608
  name: params.name,
182602
182609
  description: params.description ?? "",
182603
182610
  private: params.private ?? false,
182604
- members: [],
182611
+ members: [client.getAccountUuid()],
182612
+ owners: [client.getAccountUuid()],
182605
182613
  archived: false,
182606
182614
  identifier: params.identifier,
182607
182615
  sequence: 0,