codeer-cli 0.1.5__py3-none-any.whl → 0.1.6__py3-none-any.whl

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.
codeer_cli/cli.py CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  codeer check
4
4
  codeer agent list|get|apply|diff|versions
5
- codeer kb list|files|upload|faq-list|faq-get|faq-create|faq-update|faq-delete
5
+ codeer kb list|files|upload|node-rename|node-delete|faq-list|faq-get|faq-create|faq-update|faq-delete
6
6
  codeer eval list|label-list|label-create|label-update|label-delete|case-update|case-delete|evaluators|evaluator-create|evaluator-update|run|export|reconcile|cases-apply|rubrics|rubrics-apply
7
7
  codeer history list|get|conversations|negative-feedback
8
8
  """
@@ -28,6 +28,7 @@ Safe workflow for coding agents:
28
28
  codeer agent list
29
29
  codeer agent get <agent-id> --full
30
30
  codeer kb list
31
+ codeer kb files --kb-id <kb-id>
31
32
  codeer eval list --agent <agent-id>
32
33
  codeer eval label-list
33
34
  codeer eval case-update --case <case-id> --input "..." --dry-run
@@ -43,6 +44,8 @@ Preview mutations before applying:
43
44
  codeer eval cases-apply --agent <agent-id> --cases eval_cases.json --dry-run
44
45
  codeer eval rubrics-apply --rubrics rubrics.json --dry-run
45
46
  codeer kb upload --dir kb --name "Product KB" --dry-run
47
+ codeer kb node-rename --node-id <node-id> --name "New Name" --dry-run
48
+ codeer kb node-delete --node-id <node-id> --dry-run
46
49
  codeer kb faq-create --context-object-id <snapshot-object-id> --question "..." --dry-run
47
50
 
48
51
  Use --out <path> for large raw artifacts; stdout defaults to compact summaries.
codeer_cli/commands/kb.py CHANGED
@@ -87,6 +87,21 @@ def register(subparsers):
87
87
  p.add_argument("--poll-timeout", type=int, default=POLL_TIMEOUT)
88
88
  p.set_defaults(func=run_upload)
89
89
 
90
+ p = sub.add_parser("node-rename", help="Rename a KB root, folder, or file node; run --dry-run first")
91
+ p.add_argument("--node-id", required=True, help="KnowledgeNode UUID")
92
+ p.add_argument("--name", required=True, help="New display name")
93
+ p.add_argument("--dry-run", action="store_true",
94
+ help="Print intended request without writing server state.")
95
+ p.add_argument("--out", default=None, help="Write result JSON to this file too")
96
+ p.set_defaults(func=run_node_rename)
97
+
98
+ p = sub.add_parser("node-delete", help="Delete a KB root, folder, or file node and descendants; run --dry-run first")
99
+ p.add_argument("--node-id", required=True, help="KnowledgeNode UUID")
100
+ p.add_argument("--dry-run", action="store_true",
101
+ help="Print intended request without writing server state.")
102
+ p.add_argument("--out", default=None, help="Write result JSON to this file too")
103
+ p.set_defaults(func=run_node_delete)
104
+
90
105
  p = sub.add_parser("faq-list", help="List Context Object FAQ entries")
91
106
  p.add_argument("--context-object-id", type=int, default=None,
92
107
  help="Filter to a KB file snapshot_object_id")
@@ -413,6 +428,72 @@ def run_upload(args, client) -> int:
413
428
  return 0 if not not_ready else 1
414
429
 
415
430
 
431
+ def run_node_rename(args, client) -> int:
432
+ workspace_id, organization_id = client.resolve_scope()
433
+ path = f"/external/knowledge-bases/nodes/{args.node_id}"
434
+ body = {"name": args.name}
435
+ if args.dry_run:
436
+ return _dry_run(
437
+ args.out,
438
+ {
439
+ "dry_run": True,
440
+ "operation": "kb_node_rename",
441
+ "method": "PATCH",
442
+ "path": path,
443
+ "workspace_id": workspace_id,
444
+ "organization_id": organization_id,
445
+ "node_id": args.node_id,
446
+ "body": body,
447
+ "would_write_server_state": True,
448
+ "next_step": "Review this summary, then rerun without --dry-run after approval.",
449
+ },
450
+ )
451
+
452
+ response = strip_noisy_fields(
453
+ kb_mod.update_node(
454
+ client,
455
+ organization_id=organization_id,
456
+ workspace_id=workspace_id,
457
+ node_id=args.node_id,
458
+ name=args.name,
459
+ )
460
+ )
461
+ _print_and_write(args.out, response)
462
+ return 0
463
+
464
+
465
+ def run_node_delete(args, client) -> int:
466
+ workspace_id, organization_id = client.resolve_scope()
467
+ path = f"/external/knowledge-bases/nodes/{args.node_id}"
468
+ if args.dry_run:
469
+ return _dry_run(
470
+ args.out,
471
+ {
472
+ "dry_run": True,
473
+ "operation": "kb_node_delete",
474
+ "method": "DELETE",
475
+ "path": path,
476
+ "workspace_id": workspace_id,
477
+ "organization_id": organization_id,
478
+ "node_id": args.node_id,
479
+ "deletes_descendants": True,
480
+ "would_write_server_state": True,
481
+ "next_step": "Review this summary, then rerun without --dry-run after approval.",
482
+ },
483
+ )
484
+
485
+ response = strip_noisy_fields(
486
+ kb_mod.delete_node(
487
+ client,
488
+ organization_id=organization_id,
489
+ workspace_id=workspace_id,
490
+ node_id=args.node_id,
491
+ )
492
+ )
493
+ _print_and_write(args.out, response)
494
+ return 0
495
+
496
+
416
497
  def run_faq_list(args, client) -> int:
417
498
  faqs = kb_mod.list_context_obj_faqs(
418
499
  client,
codeer_cli/kb.py CHANGED
@@ -138,6 +138,16 @@ def update_node(
138
138
  return client.patch(f"{_base(organization_id, workspace_id)}/nodes/{node_id}", json=body)
139
139
 
140
140
 
141
+ def delete_node(
142
+ client: CodeerClient,
143
+ *,
144
+ organization_id: str,
145
+ workspace_id: str,
146
+ node_id: str,
147
+ ) -> dict:
148
+ return client.delete(f"{_base(organization_id, workspace_id)}/nodes/{node_id}")
149
+
150
+
141
151
  def upload_file(
142
152
  client: CodeerClient,
143
153
  *,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeer-cli
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Command line tools for managing Codeer agents over the Codeer API.
5
5
  Project-URL: Homepage, https://www.codeer.ai
6
6
  Author: Codeer.AI
@@ -180,6 +180,20 @@ paths containing `*` so the shell passes the wildcard to the CLI. Advanced
180
180
  settings can still be passed through `--config-json`; explicit crawler flags
181
181
  override matching JSON keys.
182
182
 
183
+ ## KB node rename and delete
184
+
185
+ Knowledge Base roots, folders, and files are all KnowledgeNodes. Use
186
+ `codeer kb list` and `codeer kb files` to find node IDs, then preview mutations
187
+ with `--dry-run`:
188
+
189
+ ```bash
190
+ codeer kb node-rename --node-id <node-id> --name "New Name" --dry-run
191
+ codeer kb node-delete --node-id <node-id> --dry-run
192
+ ```
193
+
194
+ `node-delete` deletes the target node and all descendants. Review the dry-run
195
+ output before rerunning without `--dry-run`.
196
+
183
197
  ## Context Object FAQ
184
198
 
185
199
  Use Context Object FAQ entries to route high-value questions to a canonical KB
@@ -2,12 +2,12 @@ codeer_cli/__init__.py,sha256=-0gL8upoSsLAnXAfcRrwqZYJbwG0knzQoFf94O7Nc7c,1817
2
2
  codeer_cli/_validate.py,sha256=pKUJa2TyTpERx5xmiYNZRn7tFqDxLZ2fF1rHAf1oz14,5415
3
3
  codeer_cli/agents.py,sha256=diodgiGhXlowEi8sbCzcSK1qSeCLF2fBe6QBs3Sq_x8,5617
4
4
  codeer_cli/chats.py,sha256=YVrZJhoa-d67o6tzX6riGXsbA-ehyhOxrZ8zRCcJNro,2675
5
- codeer_cli/cli.py,sha256=1sdsWJxpAQhz9UrKGUi4EGoBBkvrPUvj8aiimnllFro,4259
5
+ codeer_cli/cli.py,sha256=g-WR2D5MkaUdc13ZrpRCavXD1940CHE9eBELC034tic,4443
6
6
  codeer_cli/client.py,sha256=LpHVqf1IYNg1wFfIHnO9q4xg2h3IiGOitzCnvwB-Bcw,9809
7
7
  codeer_cli/constants.py,sha256=D1pV3wCoqYybrKGKeoupYjjFWLfaFviKp1yL7oh6Qso,2323
8
8
  codeer_cli/eval_.py,sha256=z9RXFiYXOEHPKIh31nbooNe_WmlJ-L63GWBDw3CJhmM,15614
9
9
  codeer_cli/histories.py,sha256=tk28git_peX4x703CIDU8u72JtlGaytyrtlHfxlK-7A,5979
10
- codeer_cli/kb.py,sha256=--0MvZJ2OsIbzLh-4TQ-wR7dVK42eaXw-L0qDGFOaxg,10417
10
+ codeer_cli/kb.py,sha256=Ad4h65NByq5Rq5BTeMghLTKlWRhmOC2jxL0BaTGX3EM,10631
11
11
  codeer_cli/parse.py,sha256=qrjZn0MUTjGfucp4cwxy8Pt7WS-0x15kK5F7kWTY8Ps,21818
12
12
  codeer_cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  codeer_cli/commands/_util.py,sha256=VOB_HMWYzHFNY1ElLOED1HB6fpFpsniqH6Yx3VUlMrY,1644
@@ -15,9 +15,9 @@ codeer_cli/commands/agent.py,sha256=amvfVVrbPOkbYKCGvA6EJB30C-aY6WSdfR7u7FklXbs,
15
15
  codeer_cli/commands/check.py,sha256=lTxolx1mIJ8jldPhJ5FXqie9nbCLVOO-sDPOHTSy1-w,3817
16
16
  codeer_cli/commands/eval_cmd.py,sha256=3Fi_dwpoJ2hceitACunPtR2kVZ84WT2r_CyL-MaJaMw,62902
17
17
  codeer_cli/commands/history.py,sha256=Jv7t0GhSZcbZ8OuIXZT34CixXt7ECEVP3nZ-WW_Ya9E,12026
18
- codeer_cli/commands/kb.py,sha256=r93lKTlQAQ5gdiJpfEptx7l3ue589_k-p386DruT7eI,25295
18
+ codeer_cli/commands/kb.py,sha256=kVEinBVM6NN8_0djOqIQErh46dLmArwFngXMNzvGeAI,28345
19
19
  codeer_cli/commands/profile.py,sha256=IdlXC_6cqobsfN3JRrAnt-1OgBUsIFneS9QtR4Un6Kc,6521
20
- codeer_cli-0.1.5.dist-info/METADATA,sha256=F8WrVVhh8XbCBe6QNdnrxYO7mS6rGw_C58nf7as9jlY,5524
21
- codeer_cli-0.1.5.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
22
- codeer_cli-0.1.5.dist-info/entry_points.txt,sha256=-nXIrlm5SR5r7gg3y8AS0tN66MwmvNHsrlwLNQNGD50,47
23
- codeer_cli-0.1.5.dist-info/RECORD,,
20
+ codeer_cli-0.1.6.dist-info/METADATA,sha256=HDNq9yUPii8TA-KRxu3Mh0sScklObu3pl9OvUthgsdg,5981
21
+ codeer_cli-0.1.6.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
22
+ codeer_cli-0.1.6.dist-info/entry_points.txt,sha256=-nXIrlm5SR5r7gg3y8AS0tN66MwmvNHsrlwLNQNGD50,47
23
+ codeer_cli-0.1.6.dist-info/RECORD,,