@khanglvm/outline-cli 0.2.4 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.6
4
+
5
+ - Accept underscore separators in tool names, so `documents_search` resolves to
6
+ `documents.search` and `oauth_clients_list` to `oauth_clients.list`.
7
+ - Make `documents.info` summary output say that `"view":"full"` returns the
8
+ document text.
9
+
10
+ ## 0.2.5 - 2026-10-18
11
+
12
+ - Changes since `v0.2.4`.
13
+ - Make default tests offline and retain live tests behind `npm run test:integration`.
14
+ - Add credential-free source PR checks and update contributor workflow guidance.
15
+
3
16
  ## 0.2.4 - 2026-10-14
4
17
 
5
18
  - Changes since `v0.2.3`.
package/README.md CHANGED
@@ -50,6 +50,10 @@ outline-cli invoke documents.info \
50
50
  --args '{"id":"<document-id-or-url>","view":"full"}'
51
51
  ```
52
52
 
53
+ Without `"view":"full"`, `documents.info` returns metadata and a short excerpt;
54
+ the result includes a hint on how to get the full text. Tool names also accept
55
+ underscores for dots, such as `documents_search`.
56
+
53
57
  For a pasted `/doc/` URL, `url` is also accepted. Batch reads accept mixed UUIDs,
54
58
  slugs, and document URLs in `ids`. URLs use the selected workspace profile.
55
59
 
@@ -76,6 +80,19 @@ is available with setup and workflow guidance:
76
80
  npx skills add https://github.com/khanglvm/skills --skill outline-cli -y
77
81
  ```
78
82
 
83
+ ## Development
84
+
85
+ Run the CLI smoke check and offline unit tests from a checkout:
86
+
87
+ ```sh
88
+ npm run check
89
+ npm test
90
+ ```
91
+
92
+ These checks need no Outline account. Live workspace tests require explicit
93
+ opt-in with `npm run test:integration`. See the [development guide](docs/DEVELOPMENT.md)
94
+ for account setup, test cleanup, source PR checks, and releases.
95
+
79
96
  ## More help
80
97
 
81
98
  - [Usage guide](https://github.com/khanglvm/outline-cli/blob/main/docs/USAGE.md): profiles, editing, attachments, batch calls, and safe deletion.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanglvm/outline-cli",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "Agent-optimized CLI for Outline API",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,7 +16,8 @@
16
16
  "scripts": {
17
17
  "start": "node ./bin/outline-cli.js",
18
18
  "check": "node ./bin/outline-cli.js --help",
19
- "test": "node --test ./test/**/*.test.js",
19
+ "test": "node --test ./test/*.unit.test.js",
20
+ "test:integration": "node --test ./test/live.integration.test.js",
20
21
  "integrity:refresh": "node ./scripts/generate-entry-integrity.mjs",
21
22
  "release": "node ./scripts/release.mjs",
22
23
  "release:prepare": "node ./scripts/release.mjs --no-publish --no-push"
@@ -3,8 +3,8 @@ export const ENTRY_INTEGRITY_MANIFEST = Object.freeze({
3
3
  version: 1,
4
4
  algorithm: "sha256",
5
5
  signatureAlgorithm: "sha256-salted-manifest-v1",
6
- signature: "473207690cbe47a499645410613964b4fe7a71061f7c032fdfec72c06c4b3145",
7
- generatedAt: "2026-10-14T00:36:00.966Z",
6
+ signature: "2678d128f1ba23fed7976de2d585a4acf0543678a4d218d7ab4386f4d353dec4",
7
+ generatedAt: "2026-11-04T03:17:43.534Z",
8
8
  files: [
9
9
  {
10
10
  "path": "src/action-gate.js",
@@ -60,7 +60,7 @@ export const ENTRY_INTEGRITY_MANIFEST = Object.freeze({
60
60
  },
61
61
  {
62
62
  "path": "src/tools.js",
63
- "sha256": "8fed4d1f1c5e83b4a0e9136d2041b60262e4706426bd8c1c7751cc14dafac41c"
63
+ "sha256": "ffa0f5fd7e916abb92bba62ecc11f4c50f428505b431a660362c5fef4cd2003b"
64
64
  },
65
65
  {
66
66
  "path": "src/tools.mutation.js",
package/src/tools.js CHANGED
@@ -647,6 +647,8 @@ async function documentsListTool(ctx, args) {
647
647
  };
648
648
  }
649
649
 
650
+ const DOCUMENT_TEXT_HINT = 'view=summary returns metadata and a short excerpt only. Pass "view":"full" to get the full document text.';
651
+
650
652
  async function documentsInfoTool(ctx, args) {
651
653
  if (args.url && args.id && normalizeDocumentReference(args.url) !== normalizeDocumentReference(args.id)) {
652
654
  throw new CliError("documents.info id and url must identify the same document");
@@ -698,6 +700,7 @@ async function documentsInfoTool(ctx, args) {
698
700
  const result = compactValue({
699
701
  ...payload,
700
702
  deleteReadReceipt,
703
+ hint: view !== "full" && rawDoc?.text ? DOCUMENT_TEXT_HINT : undefined,
701
704
  });
702
705
 
703
706
  return {
@@ -758,6 +761,7 @@ async function documentsInfoTool(ctx, args) {
758
761
  ok: results.filter((r) => r.ok).length,
759
762
  failed: results.filter((r) => !r.ok).length,
760
763
  items: results,
764
+ ...(view !== "full" && results.some((r) => r.ok) ? { hint: DOCUMENT_TEXT_HINT } : {}),
761
765
  },
762
766
  };
763
767
  }
@@ -1295,6 +1299,25 @@ function toolNameVariants(name) {
1295
1299
  ].filter(Boolean))];
1296
1300
  }
1297
1301
 
1302
+ // Extra lookup forms for a request that wrote a namespace separator as "_"
1303
+ // (documents_search, oauth_clients_list). Tool names mix "." between namespace
1304
+ // and action with "_" inside words, so try turning each single "_" into "."
1305
+ // and also all of them at once.
1306
+ function underscoreSeparatorVariants(name) {
1307
+ const base = canonicalizeToolName(name, { hyphenMode: "underscore" });
1308
+ const variants = new Set();
1309
+ if (!base.includes("_")) {
1310
+ return [];
1311
+ }
1312
+ variants.add(base.replace(/_/g, "."));
1313
+ for (let i = 0; i < base.length; i += 1) {
1314
+ if (base[i] === "_") {
1315
+ variants.add(`${base.slice(0, i)}.${base.slice(i + 1)}`);
1316
+ }
1317
+ }
1318
+ return [...variants];
1319
+ }
1320
+
1298
1321
  function buildCanonicalToolMap() {
1299
1322
  const byCanonical = new Map();
1300
1323
  for (const toolName of Object.keys(TOOLS)) {
@@ -1428,7 +1451,7 @@ export function resolveToolInvocation(name, args = {}) {
1428
1451
  }
1429
1452
 
1430
1453
  const candidates = new Set();
1431
- for (const variant of toolNameVariants(requestedName)) {
1454
+ for (const variant of [...toolNameVariants(requestedName), ...underscoreSeparatorVariants(requestedName)]) {
1432
1455
  const matches = CANONICAL_TOOL_MAP.get(variant) || [];
1433
1456
  for (const match of matches) {
1434
1457
  candidates.add(match);