@semiont/cli 0.3.5 → 0.3.6

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +64 -43
  2. package/package.json +8 -8
package/dist/cli.mjs CHANGED
@@ -5718,8 +5718,11 @@ var init_inference_service = __esm({
5718
5718
  [COMMAND_CAPABILITY_ANNOTATIONS.START]: "false",
5719
5719
  [COMMAND_CAPABILITY_ANNOTATIONS.STOP]: "false",
5720
5720
  [COMMAND_CAPABILITY_ANNOTATIONS.RESTART]: "false",
5721
- [COMMAND_CAPABILITY_ANNOTATIONS.PROVISION]: "false",
5722
- [COMMAND_CAPABILITY_ANNOTATIONS.CONFIGURE]: "false"
5721
+ [COMMAND_CAPABILITY_ANNOTATIONS.CONFIGURE]: "false",
5722
+ // Ollama supports provision (model pulling) even when external — only Anthropic doesn't
5723
+ ...this.inferenceType !== "ollama" ? {
5724
+ [COMMAND_CAPABILITY_ANNOTATIONS.PROVISION]: "false"
5725
+ } : {}
5723
5726
  } : {}
5724
5727
  }
5725
5728
  };
@@ -5856,6 +5859,13 @@ var init_service_factory = __esm({
5856
5859
  return new MCPService(name, platform, envConfig, serviceConfig, runtimeFlags);
5857
5860
  case "proxy":
5858
5861
  return new ProxyService("proxy", platform, envConfig, serviceConfig, runtimeFlags);
5862
+ case "inference": {
5863
+ const inferenceType = serviceConfig.inferenceType;
5864
+ if (!inferenceType) {
5865
+ throw new Error(`inference service config is missing 'inferenceType'`);
5866
+ }
5867
+ return new InferenceService(name, platform, envConfig, serviceConfig, runtimeFlags, inferenceType);
5868
+ }
5859
5869
  default:
5860
5870
  throw new Error(
5861
5871
  `Unknown service type: '${name}'. Supported services: ${SUPPORTED_SERVICES.join(", ")}`
@@ -6257,17 +6267,16 @@ function checkContainerRuntime(runtime) {
6257
6267
  }
6258
6268
  }
6259
6269
  function findPortOwner(port) {
6260
- const { execFileSync: execFileSync43 } = __require("child_process");
6261
6270
  try {
6262
6271
  if (process.platform === "darwin" || process.platform === "linux") {
6263
- const out = execFileSync43("lsof", ["-ti", `:${port}`], { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] });
6272
+ const out = execFileSync4("lsof", ["-ti", `:${port}`], { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] });
6264
6273
  const pids = out.trim().split("\n").filter(Boolean);
6265
6274
  if (pids.length > 0) return `PID ${pids.join(", ")}`;
6266
6275
  }
6267
6276
  } catch {
6268
6277
  }
6269
6278
  try {
6270
- const out = execFileSync43("fuser", [`${port}/tcp`], { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] });
6279
+ const out = execFileSync4("fuser", [`${port}/tcp`], { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] });
6271
6280
  const pids = out.trim().split(/\s+/).filter(Boolean);
6272
6281
  if (pids.length > 0) return `PID ${pids.join(", ")}`;
6273
6282
  } catch {
@@ -27325,7 +27334,7 @@ var require_package = __commonJS({
27325
27334
  "package.json"(exports, module) {
27326
27335
  module.exports = {
27327
27336
  name: "@semiont/cli",
27328
- version: "0.3.5",
27337
+ version: "0.3.6",
27329
27338
  description: "Semiont CLI - Unified environment management tool",
27330
27339
  _comment: "AWS SDK dependencies (@aws-sdk/*) are only used by platforms/aws",
27331
27340
  type: "module",
@@ -27389,15 +27398,15 @@ var require_package = __commonJS({
27389
27398
  "@aws-sdk/client-secrets-manager": "^3.600.0",
27390
27399
  "@aws-sdk/client-sts": "^3.859.0",
27391
27400
  "@aws-sdk/client-wafv2": "^3.859.0",
27392
- "@semiont/api-client": "^0.3.5",
27393
- "@semiont/content": "^0.3.5",
27394
- "@semiont/core": "^0.3.5",
27395
- "@semiont/event-sourcing": "^0.3.5",
27396
- "@semiont/graph": "^0.3.5",
27397
- "@semiont/make-meaning": "^0.3.5",
27401
+ "@semiont/api-client": "^0.3.6",
27402
+ "@semiont/content": "^0.3.6",
27403
+ "@semiont/core": "^0.3.6",
27404
+ "@semiont/event-sourcing": "^0.3.6",
27405
+ "@semiont/graph": "^0.3.6",
27406
+ "@semiont/make-meaning": "^0.3.6",
27398
27407
  "@vitest/ui": "4.0.18",
27399
27408
  arg: "^5.0.2",
27400
- argon2: "^0.43.0",
27409
+ argon2: "^0.44.0",
27401
27410
  express: "^5.2.1",
27402
27411
  ink: "^6.8.0",
27403
27412
  "js-yaml": "^4.1.0",
@@ -27504,11 +27513,8 @@ username = "\${NEO4J_USERNAME}"
27504
27513
  password = "\${NEO4J_PASSWORD}"
27505
27514
  database = "\${NEO4J_DATABASE}"
27506
27515
 
27507
- [environments.local.inference]
27516
+ [environments.local.inference.anthropic]
27508
27517
  platform = "external"
27509
- type = "anthropic"
27510
- model = "claude-sonnet-4-5-20250929"
27511
- maxTokens = 8192
27512
27518
  endpoint = "https://api.anthropic.com"
27513
27519
  apiKey = "\${ANTHROPIC_API_KEY}"
27514
27520
 
@@ -30029,6 +30035,18 @@ function resolveServiceDeployments(serviceNames, config) {
30029
30035
  }
30030
30036
  const platformInfos = [];
30031
30037
  for (const serviceName of serviceNames) {
30038
+ if (serviceName === "inference") {
30039
+ const inferenceProviders = config.inference ?? {};
30040
+ for (const [providerType, providerConfig] of Object.entries(inferenceProviders)) {
30041
+ const platform2 = providerConfig?.platform?.type ?? providerConfig?.platform ?? "external";
30042
+ platformInfos.push({
30043
+ name: "inference",
30044
+ platform: platform2,
30045
+ config: { ...providerConfig, inferenceType: providerType }
30046
+ });
30047
+ }
30048
+ continue;
30049
+ }
30032
30050
  const serviceConfig = config.services?.[serviceName];
30033
30051
  if (!serviceConfig) {
30034
30052
  const availableServices = Object.keys(config.services || {});
@@ -30038,12 +30056,6 @@ function resolveServiceDeployments(serviceNames, config) {
30038
30056
  } else {
30039
30057
  console.warn(` No services configured in this environment`);
30040
30058
  }
30041
- console.warn(` To fix: Add [environments.${environment}.${serviceName}] to ~/.semiontconfig or .semiont/config`);
30042
- console.warn(` Example configuration:`);
30043
- console.warn(` "${serviceName}": {`);
30044
- console.warn(` "platform": { "type": "container" },`);
30045
- console.warn(` "port": 3000`);
30046
- console.warn(` }`);
30047
30059
  console.warn("");
30048
30060
  continue;
30049
30061
  }
@@ -30089,31 +30101,38 @@ async function checkServiceSupportsCommand(serviceName, command, envConfig) {
30089
30101
  }
30090
30102
  const { getAvailableEnvironments: getAvailableEnvironments2 } = await Promise.resolve().then(() => (init_config_loader(), config_loader_exports));
30091
30103
  const availableEnvironments = getAvailableEnvironments2();
30092
- const deployment = deployments[0];
30093
- const service = ServiceFactory.create(
30094
- serviceName,
30095
- deployment.platform,
30096
- {
30097
- projectRoot,
30098
- environment: parseEnvironment2(environment, availableEnvironments),
30099
- verbose: false,
30100
- quiet: true,
30101
- dryRun: false
30102
- },
30103
- envConfig,
30104
- {
30105
- ...deployment.config,
30106
- platform: { type: deployment.platform }
30104
+ for (const deployment of deployments) {
30105
+ const service = ServiceFactory.create(
30106
+ serviceName,
30107
+ deployment.platform,
30108
+ {
30109
+ projectRoot,
30110
+ environment: parseEnvironment2(environment, availableEnvironments),
30111
+ verbose: false,
30112
+ quiet: true,
30113
+ dryRun: false
30114
+ },
30115
+ envConfig,
30116
+ {
30117
+ ...deployment.config,
30118
+ platform: { type: deployment.platform }
30119
+ }
30120
+ );
30121
+ const requirements = service.getRequirements();
30122
+ if (serviceSupportsCommand(requirements.annotations, command)) {
30123
+ return true;
30107
30124
  }
30108
- );
30109
- const requirements = service.getRequirements();
30110
- return serviceSupportsCommand(requirements.annotations, command);
30125
+ }
30126
+ return false;
30111
30127
  } catch {
30112
30128
  return false;
30113
30129
  }
30114
30130
  }
30115
30131
  async function getServicesWithCapability(capability, envConfig) {
30116
30132
  const allServices = Object.keys(envConfig.services || {});
30133
+ if (envConfig.inference && Object.keys(envConfig.inference).length > 0) {
30134
+ allServices.push("inference");
30135
+ }
30117
30136
  const isServiceCommand = await commandRequiresServices(capability);
30118
30137
  if (!isServiceCommand && capability !== "restore") {
30119
30138
  return [];
@@ -30140,6 +30159,9 @@ async function resolveServiceSelector(selector, capability, envConfig) {
30140
30159
  return getServicesWithCapability(capability, envConfig);
30141
30160
  }
30142
30161
  const availableServices = Object.keys(envConfig.services || {});
30162
+ if (envConfig.inference && Object.keys(envConfig.inference).length > 0) {
30163
+ availableServices.push("inference");
30164
+ }
30143
30165
  if (availableServices.includes(selector)) {
30144
30166
  const capableServices = await getServicesWithCapability(capability, envConfig);
30145
30167
  if (capableServices.includes(selector)) {
@@ -30150,8 +30172,7 @@ async function resolveServiceSelector(selector, capability, envConfig) {
30150
30172
  } else {
30151
30173
  throw new Error(
30152
30174
  `Unknown service '${selector}' in environment '${environment}'
30153
- Available services: ${availableServices.join(", ")}
30154
- To fix: Add '[environments.${environment}.${selector}]' to ~/.semiontconfig`
30175
+ Available services: ${availableServices.join(", ")}`
30155
30176
  );
30156
30177
  }
30157
30178
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semiont/cli",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Semiont CLI - Unified environment management tool",
5
5
  "_comment": "AWS SDK dependencies (@aws-sdk/*) are only used by platforms/aws",
6
6
  "type": "module",
@@ -64,15 +64,15 @@
64
64
  "@aws-sdk/client-secrets-manager": "^3.600.0",
65
65
  "@aws-sdk/client-sts": "^3.859.0",
66
66
  "@aws-sdk/client-wafv2": "^3.859.0",
67
- "@semiont/api-client": "0.3.5",
68
- "@semiont/content": "0.3.5",
69
- "@semiont/core": "0.3.5",
70
- "@semiont/event-sourcing": "0.3.5",
71
- "@semiont/graph": "0.3.5",
72
- "@semiont/make-meaning": "0.3.5",
67
+ "@semiont/api-client": "0.3.6",
68
+ "@semiont/content": "0.3.6",
69
+ "@semiont/core": "0.3.6",
70
+ "@semiont/event-sourcing": "0.3.6",
71
+ "@semiont/graph": "0.3.6",
72
+ "@semiont/make-meaning": "0.3.6",
73
73
  "@vitest/ui": "4.0.18",
74
74
  "arg": "^5.0.2",
75
- "argon2": "^0.43.0",
75
+ "argon2": "^0.44.0",
76
76
  "express": "^5.2.1",
77
77
  "ink": "^6.8.0",
78
78
  "js-yaml": "^4.1.0",