open-index/open-npm huggingface dataset:
npm package: @hakcolt/resources
Description: Add multi languages for your app
Author: Igor Hakcolt
Latest version: 1.2.0

# Resources

It is a **internationalization** tool that will allow you to manage and administer the local messages of your application, even with enriched messages.

## How To Use

We should create a Resource class with your values:

```typescript
const keys = {
  SOMETHING_WAS_WRONG: "SOMETHING_WAS_WRONG",
  MISSING_ATTRIBUTES: "MISSING_ATTRIBUTES",
  ONLY_ENGLISH: "ONLY_ENGLISH"
}

enum LocaleType {
  EN = "en",
  PT_BR = "pt-br"
}

const locals = {
  [LocaleType.EN]: {
    [keys.SOMETHING_WAS_WRONG]: "Unknown Error",
    [keys.MISSING_ATTRIBUTES]: "Missing Attributes: %$s",
    [keys.ONLY_ENGLISH]: "This resource is not defined in another language"
  },
  [LocaleType.PT_BR]: {
    [keys.SOMETHING_WAS_WRONG]: "Erro desconhecido",
    [keys.MISSING_ATTRIBUTES]: "Atributos que falta: %$s. Feito por %$s"
  }
}

const resources = new Resources(locals, Object.values(keys), LocaleType.EN)
```

For use it in any user case, you should do something like:

```typescript
console.log(resources.get(keys.SOMETHING_WAS_WRONG)) // Unknown Error

console.log(resources.getWithParams(keys.MISSING_ATTRIBUTES, "name: string, age: number", "Igor Hakcolt")) // Missing Attributes: name: string, age: number

console.log(resources.get(keys.ONLY_ENGLISH)) // This resource is not defined in another language

resources.language = LocaleType.PT_BR

console.log(resources.get(keys.SOMETHING_WAS_WRONG)) // Erro desconhecido

console.log(resources.getWithParams(keys.MISSING_ATTRIBUTES, "name: string, age: number", "Igor Hakcolt")) // Atributos que faltam: name: string, age: number por Igor Hakcolt

console.log(resources.get(keys.ONLY_ENGLISH)) // This resource is not defined in another language
```
npm package: @hakcolt/result
Description: Response object to your request
Author: Igor Hakcolt
Latest version: 1.2.0

# Result

**Result** is a **tool** that helps us control the flow of our **use cases** and allows us to **manage the response**, be it an **object**, an **array** of objects, a **message** or an **error**.

## How To Use

```typescript
export class GetProductUseCase extends BaseUseCase {
  constructor(
    resources: Resources,
    private readonly healthProvider: IHealthProvider,
    private readonly productQueryService: IProductQueryService,
  ) {
    super(resources);
  }

  async execute(idMask: string): Promise<IResult<ProductDto>> {
    // We create the instance of our type of result at the beginning of the use case.
    const result = new Result<ProductDto>();
    // With the resulting object we can control validations within other functions.
    if (!this.validator.isValidEntry(result, { productMaskId: idMask })) {
      return result;
    }
    const product: Product = await this.productQueryService.getByMaskId(idMask);
    if (!product) {
      // The result object helps us with the error response and the code.
      result.setError(
        this.resources.get(resourceKeys.PRODUCT_DOES_NOT_EXIST),
        applicationStatusCodes.NOT_FOUND,
      );
      return result;
    }
    const productDto = ProductDto.fromJSON(product)
    // The result object also helps you with the response data.
    result.setData(productDto, this.applicationStatusCodes.SUCCESS);
    // And finally you give it back.
    return result;
  }
}
```

The **Result** object may or may not have a **type** of **response**, it fits your needs, and the **Result instance without type** cannot be assigned **data**.

```typescript
const resultWithType = new Result<ProductDto>();
// or
const resultWithoutType = new Result();
```

For clean code you can return validation result and handles the error clean way through **Result** visitor pattern method like:

```typescript
async execute(args: ActionDto): Promise<IResult> {
    const result = new Result();

    if (!this.isValidRequest(result, args)) return result;

    /*...*/

    return result;
}
```

The **Result** object can help you in unit tests as shown below:

```typescript
it("should return a 400 error if quantity is null or zero", async () => {
  itemDto.quantity = null;
  const result = await addUseCase.execute({ userUid, itemDto });
  expect(result.success).toBeFalsy();
  expect(result.error).toBe(
    resources.getWithParams(resourceKeys.SOME_PARAMETERS_ARE_MISSING, "quantity: string"),
  );
  expect(result.statusCode).toBe(resultCodes.BAD_REQUEST);
});
```
npm package: @hakcolt/validator
Description: Validate external properties to avoid errors
Author: Igor Hakcolt
Latest version: 1.2.0

# Validator

The **validator** is a **dynamic tool** and with it you will be able to **validate any type of object and/or parameters** that your use case **requires as input**, in addition to also being able to **validate email, passwords and so on**.

## How To Use

```typescript
/*...*/
  const missingAttributes = validation.validateObject(this, ["firstName:string", "lastName:string", "email:string", "gender:string", "password:string"])

  if (missingAttributes.length) {
    result.setError(resources.getWithParams(plurals.MISSING_ATRIBUTES, validation.formatMissingAttributes(missingAttributes)), 400)
    return false
    }

  if (!validation.validatePassword(this.password)) {
    result.setError(resources.get(strings.INVALID_PASSWORD), 400)
    return false
  }

  const genders = Object.values(Gender)
  if (!genders.includes(this.gender as Gender)) {
    result.setError(resources.get(strings.INVALID_GENDER), 400)
    return false
  }

  if (!validation.validateEmail(this.email)) {
    result.setError(resources.get(strings.INVALID_EMAIL), 400)
    return false
  }

  return true
/*...*/
```
npm package: @hakenshi/agentic-backlog-mcp-server
Description: Local-first MCP backlog server for AI agents
Latest version: 0.1.4

# Agentic Backlog MCP Server

Local-first MCP server for AI backlog management.

This package runs over `stdio` (Node.js) and forwards MCP tool calls to a running backlog API.

## Exposed tools

- `backlog.identify_project`
- `backlog.health`
- `backlog.version`
- `backlog.list_projects`
- `backlog.get_project`
- `backlog.get_kanban_url`
- `backlog.create_task`
- `backlog.list_tasks`
- `backlog.get_task`
- `backlog.find_tasks_by_title`
- `backlog.update_task`
- `backlog.update_task_by_title`
- `backlog.delete_task`
- `backlog.update_task_status`
- `backlog.add_task_note`
- `backlog.plan_from_context`
- `backlog.get_focus`
- `backlog.claim_task`
- `backlog.release_task`
- `backlog.restore_task`
- `backlog.get_board`
- `backlog.get_console_table`

## Requirements

- Node.js 18+

## Environment

```bash
BACKLOG_REQUEST_TIMEOUT_MS=1800
BACKLOG_API_FAIL_FAST_MS=15000
BACKLOG_API_FAILURE_THRESHOLD=1
```

## Run locally

```bash
npm install
npm run build
npm start
```

For development:

```bash
npm run dev
```

## MCP config example

`.mcp.json` file:

```json
{
  "mcp": {
     "agentic-backlog": {
      "command": "npx",
      "args": ["-y", "@hakenshi/agentic-backlog-mcp-server"]
    }
  }
}
```

The MCP server is pinned to `http://127.0.0.1:38081/api`.

## Notes

- This server uses `stdio` transport only.
- Do not use `console.log` in MCP stdio mode (stdout breaks JSON-RPC). Logs must go to `stderr`.
- `backlog.delete_task` requires explicit `confirm: "DELETE"`.
- `backlog.plan_from_context` is preview-only by default. Set `apply: true` to persist changes.
- API resilience is fail-fast: when repeated timeout/5xx errors happen, the server opens a short circuit window and returns immediate 503 errors so agent runs do not stall.