better-notion 1.7.0__py3-none-any.whl → 1.8.0__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.
@@ -5,6 +5,15 @@ system that AI agents can consume to understand how to work with the system.
5
5
 
6
6
  This is the SINGLE SOURCE OF TRUTH for agents documentation. All other
7
7
  documentation (CLI help, website, etc.) should be derived from this schema.
8
+
9
+ IMPORTANT - Command signatures use IDs not names:
10
+ - Organization creation: --name (name), --slug (optional)
11
+ - Project creation: --name, --org-id (requires organization PAGE ID)
12
+ - Version creation: --name, --project-id (requires project PAGE ID)
13
+ - Task creation: --title, --version-id (requires version PAGE ID)
14
+
15
+ You must get entity IDs from previous command responses before creating
16
+ child entities.
8
17
  """
9
18
 
10
19
  from better_notion._cli.docs.base import (
@@ -45,7 +54,7 @@ ORGANIZATIONS_DB_SCHEMA = {
45
54
  }
46
55
  },
47
56
  "example_creation": {
48
- "command": "notion pages create --parent ORG_DB_ID --title 'WareflowX'",
57
+ "command": "notion agents orgs create --name 'WareflowX' --slug 'wareflowx'",
49
58
  "properties": {
50
59
  "Name": "WareflowX",
51
60
  "Slug": "wareflowx",
@@ -66,7 +75,7 @@ PROJECTS_DB_SCHEMA = {
66
75
  "type": "relation",
67
76
  "required": True,
68
77
  "target": "Organizations",
69
- "description": "Organization this project belongs to"
78
+ "description": "Organization this project belongs to (requires org PAGE ID)"
70
79
  },
71
80
  "Status": {
72
81
  "type": "select",
@@ -81,12 +90,13 @@ PROJECTS_DB_SCHEMA = {
81
90
  }
82
91
  },
83
92
  "example_creation": {
84
- "command": "notion pages create --parent PROJECTS_DB_ID --title 'Website Redesign'",
93
+ "command": "notion agents projects create --name 'Website Redesign' --org-id ORG_PAGE_ID",
85
94
  "properties": {
86
95
  "Name": "Website Redesign",
87
96
  "Organization": "ORG_PAGE_ID",
88
97
  "Status": "Active"
89
- }
98
+ },
99
+ "note": "ORG_PAGE_ID comes from 'notion agents orgs create' response (id field)"
90
100
  }
91
101
  }
92
102
 
@@ -102,13 +112,13 @@ VERSIONS_DB_SCHEMA = {
102
112
  "type": "relation",
103
113
  "required": True,
104
114
  "target": "Projects",
105
- "description": "Project this version belongs to"
115
+ "description": "Project this version belongs to (requires project PAGE ID)"
106
116
  },
107
117
  "Status": {
108
118
  "type": "select",
109
119
  "required": False,
110
- "options": ["Planned", "In Progress", "Released", "Archived"],
111
- "default": "Planned"
120
+ "options": ["Planning", "In Progress", "Released", "Archived"],
121
+ "default": "Planning"
112
122
  },
113
123
  "Release Date": {
114
124
  "type": "date",
@@ -117,12 +127,13 @@ VERSIONS_DB_SCHEMA = {
117
127
  }
118
128
  },
119
129
  "example_creation": {
120
- "command": "notion pages create --parent VERSIONS_DB_ID --title 'v1.0.0'",
130
+ "command": "notion agents versions create --name 'v1.0.0' --project-id PROJECT_PAGE_ID",
121
131
  "properties": {
122
132
  "Name": "v1.0.0",
123
133
  "Project": "PROJECT_PAGE_ID",
124
- "Status": "Planned"
125
- }
134
+ "Status": "Planning"
135
+ },
136
+ "note": "PROJECT_PAGE_ID comes from 'notion agents projects create' response (id field)"
126
137
  }
127
138
  }
128
139
 
@@ -137,20 +148,14 @@ TASKS_DB_SCHEMA = {
137
148
  "Status": {
138
149
  "type": "select",
139
150
  "required": True,
140
- "options": ["Todo", "In Progress", "Done", "Cancelled"],
141
- "default": "Todo"
151
+ "options": ["Backlog", "Claimed", "In Progress", "Completed", "Cancelled"],
152
+ "default": "Backlog"
142
153
  },
143
154
  "Version": {
144
155
  "type": "relation",
145
156
  "required": True,
146
157
  "target": "Versions",
147
- "description": "Version this task belongs to (REQUIRED)"
148
- },
149
- "Target Version": {
150
- "type": "relation",
151
- "required": False,
152
- "target": "Versions",
153
- "description": "Version where task should be implemented"
158
+ "description": "Version this task belongs to (requires version PAGE ID)"
154
159
  },
155
160
  "Dependencies": {
156
161
  "type": "relation",
@@ -174,13 +179,14 @@ TASKS_DB_SCHEMA = {
174
179
  }
175
180
  },
176
181
  "example_creation": {
177
- "command": "notion pages create --parent TASKS_DB_ID --title 'Fix login bug'",
182
+ "command": "notion agents tasks create --title 'Fix login bug' --version-id VERSION_PAGE_ID",
178
183
  "properties": {
179
184
  "Name": "Fix login bug",
180
- "Status": "Todo",
185
+ "Status": "Backlog",
181
186
  "Version": "VERSION_PAGE_ID",
182
187
  "Priority": "High"
183
- }
188
+ },
189
+ "note": "VERSION_PAGE_ID comes from 'notion agents versions create' response (id field)"
184
190
  }
185
191
  }
186
192
 
@@ -229,23 +235,24 @@ ORGANIZATION_CONCEPT = Concept(
229
235
  "database_schema": ORGANIZATIONS_DB_SCHEMA,
230
236
  "creation": {
231
237
  "command": "notion agents orgs create --name 'Org Name' --slug 'org-slug'",
232
- "alternative": "notion pages create --parent ORG_DB_ID --title 'Org Name' --properties '{...}'",
233
- "required_properties": ["Name"],
234
- "property_types": {
235
- "Name": "title (required)",
236
- "Slug": "rich_text (optional, URL-friendly identifier)",
237
- "Status": "select [Active, Inactive] (optional, default: Active)",
238
- "Website": "url (optional)"
238
+ "returns": "JSON with 'id' field containing organization PAGE ID",
239
+ "required_flags": {"--name": "Organization name (required)"},
240
+ "optional_flags": {
241
+ "--slug": "URL-friendly identifier (optional)",
242
+ "--description": "Organization description (optional)",
243
+ "--repository-url": "Git repository URL (optional)",
244
+ "--status": "Active or Inactive (default: Active)"
239
245
  }
240
246
  },
241
247
  "listing": {
242
248
  "command": "notion agents orgs list",
243
- "description": "List all organizations in workspace"
249
+ "description": "List all organizations in workspace",
250
+ "returns": "JSON array of organizations with id, name, slug, status"
244
251
  }
245
252
  },
246
253
  relationships={
247
254
  "Projects": "One-to-many - organization contains multiple projects",
248
- "description": "All projects must belong to an organization"
255
+ "description": "All projects must belong to an organization",
249
256
  },
250
257
  )
251
258
 
@@ -253,21 +260,22 @@ TASK_CONCEPT = Concept(
253
260
  name="task",
254
261
  description=(
255
262
  "A task represents a unit of work that needs to be completed as part of "
256
- "a project version. Tasks have states (Todo, In Progress, Done, Cancelled) "
263
+ "a project version. Tasks have states (Backlog, Claimed, In Progress, Completed) "
257
264
  "and can depend on other tasks."
258
265
  ),
259
266
  properties={
260
267
  "required_properties": {
261
268
  "Title": "Task name (title property)",
262
- "Status": "Current state: Todo, In Progress, Done, Cancelled",
263
- "Version": "Relation to Version database (required)",
269
+ "Status": "Current state: Backlog, Claimed, In Progress, Completed, Cancelled",
270
+ "Version": "Relation to Version database (requires version PAGE ID)",
264
271
  },
265
272
  "optional_properties": {
266
- "Target Version": "Version where task should be implemented",
267
- "Dependencies": "Other tasks this task depends on",
268
- "Dependent Tasks": "Tasks that depend on this task",
273
+ "Type": "Task type: New Feature, Bug Fix, Refactor, Documentation, Testing, Other",
274
+ "Priority": "Low, Medium, High, Critical",
275
+ "Dependencies": "Other tasks this task depends on (comma-separated task IDs)",
276
+ "Estimated Hours": "Time estimate in hours",
269
277
  },
270
- "workflow": "Todo → In Progress → Done",
278
+ "workflow": "BacklogClaimed → In Progress → Completed",
271
279
  },
272
280
  relationships={
273
281
  "Version": "Required - each task must belong to one version",
@@ -284,13 +292,20 @@ PROJECT_CONCEPT = Concept(
284
292
  ),
285
293
  properties={
286
294
  "required_properties": {
287
- "Title": "Project name",
288
- "Organization": "Relation to organization (required)",
295
+ "Name": "Project name",
296
+ "Organization ID": "Organization PAGE ID from 'agents orgs create' response",
297
+ },
298
+ "optional_properties": {
299
+ "Slug": "URL-friendly identifier",
300
+ "Description": "Project description",
301
+ "Repository": "Git repository URL",
302
+ "Tech Stack": "Comma-separated technologies",
303
+ "Role": "Project role: Developer, Designer, PM, QA, DevOps (default: Developer)",
289
304
  },
290
305
  "contains": ["Versions", "Tasks", "Ideas", "Work Issues", "Incidents"],
291
306
  },
292
307
  relationships={
293
- "Organization": "Required - each project belongs to one organization",
308
+ "Organization": "Required - each project belongs to one organization (via org-id)",
294
309
  "Versions": "One-to-many - project contains multiple versions",
295
310
  },
296
311
  )
@@ -303,14 +318,20 @@ VERSION_CONCEPT = Concept(
303
318
  ),
304
319
  properties={
305
320
  "required_properties": {
306
- "Title": "Version name (e.g., v1.0.0)",
307
- "Project": "Relation to project (required)",
321
+ "Name": "Version name (e.g., v1.0.0)",
322
+ "Project ID": "Project PAGE ID from 'agents projects create' response",
323
+ },
324
+ "optional_properties": {
325
+ "Status": "Planning, In Progress, Released, Archived (default: Planning)",
326
+ "Type": "Major, Minor, Patch, Hotfix (default: Minor)",
327
+ "Branch": "Git branch name",
328
+ "Progress": "Progress percentage 0-100 (default: 0)",
308
329
  },
309
330
  "contains": ["Tasks"],
310
331
  "examples": ["v1.0.0", "v1.1.0", "v2.0.0-beta", "sprint-1"],
311
332
  },
312
333
  relationships={
313
- "Project": "Required - each version belongs to one project",
334
+ "Project": "Required - each version belongs to one project (via project-id)",
314
335
  "Tasks": "One-to-many - version contains multiple tasks",
315
336
  },
316
337
  )
@@ -439,20 +460,20 @@ CREATE_PROJECT_WORKFLOW = Workflow(
439
460
  purpose="Get database IDs and verify workspace exists",
440
461
  ),
441
462
  WorkflowStep(
442
- description="List organizations to find target",
463
+ description="List organizations to get organization ID",
443
464
  command="notion agents orgs list",
444
- purpose="Identify which organization the project belongs to",
465
+ purpose="Get the organization PAGE ID from the response",
445
466
  ),
446
467
  WorkflowStep(
447
- description="Create project with organization relation",
448
- command="notion agents projects create --org 'Org Name/Slug' --name 'Project Name'",
449
- purpose="Create project with Organization relation (required)",
468
+ description="Create project with organization ID",
469
+ command="notion agents projects create --name 'Project Name' --org-id ORG_PAGE_ID",
470
+ purpose="Create project with Organization relation (requires org PAGE ID, not name)",
450
471
  ),
451
472
  ],
452
473
  commands=[
453
474
  "agents info --parent-page PAGE_ID",
454
475
  "notion agents orgs list",
455
- "notion agents projects create --org 'WareflowX' --name 'Website Redesign'",
476
+ "notion agents projects create --name 'Website Redesign' --org-id ORG_PAGE_ID",
456
477
  ],
457
478
  prerequisites=["workspace_initialized", "organization_exists"],
458
479
  error_recovery={
@@ -461,12 +482,12 @@ CREATE_PROJECT_WORKFLOW = Workflow(
461
482
  "solution": "Run 'agents init --parent-page PAGE_ID' first to create workspace",
462
483
  },
463
484
  "organization_not_found": {
464
- "message": "Organization not found",
465
- "solution": "Create organization first with 'agents orgs create --name NAME'",
485
+ "message": "Organization ID not found",
486
+ "solution": "Run 'agents orgs list' to get valid organization IDs, or create org first with 'agents orgs create --name NAME'",
466
487
  },
467
- "missing_org_relation": {
468
- "message": "Project must have Organization relation",
469
- "solution": "Always specify --org flag when creating project",
488
+ "missing_org_id": {
489
+ "message": "Project requires --org-id (organization PAGE ID), not name",
490
+ "solution": "Use --org-id with the ID from 'agents orgs list' response",
470
491
  },
471
492
  },
472
493
  )
@@ -481,20 +502,20 @@ CREATE_VERSION_WORKFLOW = Workflow(
481
502
  purpose="Get database IDs and verify workspace exists",
482
503
  ),
483
504
  WorkflowStep(
484
- description="List projects to find target",
505
+ description="List projects to get project ID",
485
506
  command="notion agents projects list",
486
- purpose="Identify which project the version belongs to",
507
+ purpose="Get the project PAGE ID from the response",
487
508
  ),
488
509
  WorkflowStep(
489
- description="Create version with project relation",
490
- command="notion agents versions create --project 'Project Name' --name 'v1.0.0'",
491
- purpose="Create version with Project relation (required)",
510
+ description="Create version with project ID",
511
+ command="notion agents versions create --name 'v1.0.0' --project-id PROJECT_PAGE_ID",
512
+ purpose="Create version with Project relation (requires project PAGE ID, not name)",
492
513
  ),
493
514
  ],
494
515
  commands=[
495
516
  "agents info --parent-page PAGE_ID",
496
517
  "notion agents projects list",
497
- "notion agents versions create --project 'Website Redesign' --name 'v1.0.0'",
518
+ "notion agents versions create --name 'v1.0.0' --project-id PROJECT_PAGE_ID",
498
519
  ],
499
520
  prerequisites=["workspace_initialized", "organization_exists", "project_exists"],
500
521
  error_recovery={
@@ -503,12 +524,12 @@ CREATE_VERSION_WORKFLOW = Workflow(
503
524
  "solution": "Run 'agents init --parent-page PAGE_ID' first to create workspace",
504
525
  },
505
526
  "project_not_found": {
506
- "message": "Project not found",
507
- "solution": "Create project first with 'agents projects create --org ORG --name NAME'",
527
+ "message": "Project ID not found",
528
+ "solution": "Run 'agents projects list' to get valid project IDs, or create project first with 'agents projects create --name NAME --org-id ORG_ID'",
508
529
  },
509
- "missing_project_relation": {
510
- "message": "Version must have Project relation",
511
- "solution": "Always specify --project flag when creating version",
530
+ "missing_project_id": {
531
+ "message": "Version requires --project-id (project PAGE ID), not name",
532
+ "solution": "Use --project-id with the ID from 'agents projects list' response",
512
533
  },
513
534
  },
514
535
  )
@@ -523,18 +544,20 @@ CREATE_TASK_WORKFLOW = Workflow(
523
544
  purpose="Get database IDs and verify workspace exists",
524
545
  ),
525
546
  WorkflowStep(
526
- description="Identify target Version",
527
- purpose="Tasks must belong to a Version (required relation)",
547
+ description="List versions to get version ID",
548
+ command="notion agents versions list",
549
+ purpose="Get the version PAGE ID from the response",
528
550
  ),
529
551
  WorkflowStep(
530
- description="Create task page with proper properties",
531
- command="notion pages create --parent TASKS_DB_ID --title 'Task Name' --properties '{...}'",
532
- purpose="Create task with Status and Version relation",
552
+ description="Create task with version ID",
553
+ command="notion agents tasks create --title 'Task Name' --version-id VERSION_PAGE_ID",
554
+ purpose="Create task with Version relation (requires version PAGE ID, not name)",
533
555
  ),
534
556
  ],
535
557
  commands=[
536
558
  "agents info --parent-page PAGE_ID",
537
- "notion pages create --parent TASKS_DB_ID --title 'Task' --properties '{\"Status\": \"Todo\", \"Version\": \"VERSION_ID\"}'",
559
+ "notion agents versions list",
560
+ "notion agents tasks create --title 'Fix login bug' --version-id VERSION_PAGE_ID",
538
561
  ],
539
562
  prerequisites=["workspace_initialized"],
540
563
  error_recovery={
@@ -542,9 +565,13 @@ CREATE_TASK_WORKFLOW = Workflow(
542
565
  "message": "No workspace detected in page",
543
566
  "solution": "Run 'agents init' first to create workspace",
544
567
  },
545
- "missing_version_relation": {
546
- "message": "Task must have a Version relation",
547
- "solution": "Always specify Version property when creating task",
568
+ "version_not_found": {
569
+ "message": "Version ID not found",
570
+ "solution": "Run 'agents versions list' to get valid version IDs, or create version first with 'agents versions create --name NAME --project-id PROJECT_ID'",
571
+ },
572
+ "missing_version_id": {
573
+ "message": "Task requires --version-id (version PAGE ID), not name",
574
+ "solution": "Use --version-id with the ID from 'agents versions list' response",
548
575
  },
549
576
  },
550
577
  )
@@ -638,27 +665,30 @@ ORGS_COMMAND = Command(
638
665
  "list": {
639
666
  "purpose": "List all organizations in workspace",
640
667
  "usage": "notion agents orgs list",
641
- "output": "Returns list of organizations with their IDs and properties"
668
+ "output": "Returns JSON array with organization objects containing id, name, slug, status"
669
+ },
670
+ "get": {
671
+ "purpose": "Get organization by ID",
672
+ "usage": "notion agents orgs get ORG_PAGE_ID",
673
+ "output": "Returns organization details"
642
674
  },
643
675
  "create": {
644
676
  "purpose": "Create a new organization",
645
- "usage": "notion agents orgs create --name NAME [--slug SLUG] [--status STATUS]",
677
+ "usage": "notion agents orgs create --name NAME [--slug SLUG] [--description DESC] [--repository-url URL] [--status STATUS]",
646
678
  "required_flags": {
647
679
  "--name": "Organization name (required)"
648
680
  },
649
681
  "optional_flags": {
650
682
  "--slug": "URL-friendly identifier (optional)",
683
+ "--description": "Organization description (optional)",
684
+ "--repository-url": "Git repository URL (optional)",
651
685
  "--status": "Active or Inactive (default: Active)"
652
686
  },
687
+ "returns": "JSON with 'id' field containing organization PAGE ID (needed for creating projects)",
653
688
  "examples": [
654
689
  "notion agents orgs create --name 'WareflowX'",
655
690
  "notion agents orgs create --name 'WareflowX' --slug 'wareflowx' --status 'Active'"
656
691
  ]
657
- },
658
- "info": {
659
- "purpose": "Get organization details",
660
- "usage": "notion agents orgs info --org ORG_NAME_OR_SLUG",
661
- "output": "Returns organization details with projects count"
662
692
  }
663
693
  }
664
694
  )
@@ -669,28 +699,39 @@ PROJECTS_COMMAND = Command(
669
699
  purpose="Projects management - belongs to organizations",
670
700
  description=(
671
701
  "Projects represent software development efforts. "
672
- "Every project must belong to an organization."
702
+ "Every project must belong to an organization (requires org PAGE ID)."
673
703
  ),
674
704
  subcommands={
675
705
  "list": {
676
706
  "purpose": "List all projects (optionally filtered by organization)",
677
- "usage": "notion agents projects list [--org ORG_NAME]",
678
- "output": "Returns list of projects with their organizations"
707
+ "usage": "notion agents projects list [--org-id ORG_PAGE_ID]",
708
+ "output": "Returns JSON array with project objects containing id, name, slug, status, organization_id"
709
+ },
710
+ "get": {
711
+ "purpose": "Get project by ID",
712
+ "usage": "notion agents projects get PROJECT_PAGE_ID",
713
+ "output": "Returns project details"
679
714
  },
680
715
  "create": {
681
716
  "purpose": "Create a new project in an organization",
682
- "usage": "notion agents projects create --org ORG_NAME --name NAME",
717
+ "usage": "notion agents projects create --name NAME --org-id ORG_PAGE_ID [--slug SLUG] [--description DESC] [--repository REPO] [--tech-stack STACK]",
683
718
  "required_flags": {
684
- "--org": "Organization name or slug (required)",
685
- "--name": "Project name (required)"
719
+ "--name": "Project name (required)",
720
+ "--org-id": "Organization PAGE ID (required) - use ID from 'agents orgs list' or 'agents orgs create' response"
686
721
  },
722
+ "optional_flags": {
723
+ "--slug": "URL-friendly identifier (optional)",
724
+ "--description": "Project description (optional)",
725
+ "--repository": "Git repository URL (optional)",
726
+ "--tech-stack": "Comma-separated tech stack (optional)",
727
+ "--status": "Active, On Hold, Completed, Archived (default: Active)",
728
+ "--role": "Developer, Designer, PM, QA, DevOps (default: Developer)"
729
+ },
730
+ "returns": "JSON with 'id' field containing project PAGE ID (needed for creating versions)",
687
731
  "examples": [
688
- "notion agents projects create --org 'WareflowX' --name 'Website Redesign'"
689
- ]
690
- },
691
- "info": {
692
- "purpose": "Get project details",
693
- "usage": "notion agents projects info --project PROJECT_NAME"
732
+ "notion agents projects create --name 'Website Redesign' --org-id org_12345"
733
+ ],
734
+ "note": "IMPORTANT: Use --org-id with organization PAGE ID, not organization name"
694
735
  }
695
736
  }
696
737
  )
@@ -701,25 +742,37 @@ VERSIONS_COMMAND = Command(
701
742
  purpose="Versions management - releases and milestones",
702
743
  description=(
703
744
  "Versions represent releases or milestones. "
704
- "Every version must belong to a project."
745
+ "Every version must belong to a project (requires project PAGE ID)."
705
746
  ),
706
747
  subcommands={
707
748
  "list": {
708
749
  "purpose": "List all versions (optionally filtered by project)",
709
- "usage": "notion agents versions list [--project PROJECT_NAME]",
710
- "output": "Returns list of versions with their projects"
750
+ "usage": "notion agents versions list [--project-id PROJECT_PAGE_ID]",
751
+ "output": "Returns JSON array with version objects containing id, name, status, type, project_id"
752
+ },
753
+ "get": {
754
+ "purpose": "Get version by ID",
755
+ "usage": "notion agents versions get VERSION_PAGE_ID",
756
+ "output": "Returns version details"
711
757
  },
712
758
  "create": {
713
759
  "purpose": "Create a new version in a project",
714
- "usage": "notion agents versions create --project PROJECT_NAME --name VERSION",
760
+ "usage": "notion agents versions create --name NAME --project-id PROJECT_PAGE_ID [--type TYPE] [--status STATUS]",
715
761
  "required_flags": {
716
- "--project": "Project name (required)",
717
- "--name": "Version name e.g. v1.0.0 (required)"
762
+ "--name": "Version name e.g. v1.0.0 (required)",
763
+ "--project-id": "Project PAGE ID (required) - use ID from 'agents projects list' or 'agents projects create' response"
764
+ },
765
+ "optional_flags": {
766
+ "--status": "Planning, In Progress, Released, Archived (default: Planning)",
767
+ "--type": "Major, Minor, Patch, Hotfix (default: Minor)",
768
+ "--branch": "Git branch name (optional)",
769
+ "--progress": "Progress percentage 0-100 (default: 0)"
718
770
  },
771
+ "returns": "JSON with 'id' field containing version PAGE ID (needed for creating tasks)",
719
772
  "examples": [
720
- "notion agents versions create --project 'Website Redesign' --name 'v1.0.0'",
721
- "notion agents versions create --project 'Website Redesign' --name 'sprint-1'"
722
- ]
773
+ "notion agents versions create --name 'v1.0.0' --project-id proj_12345"
774
+ ],
775
+ "note": "IMPORTANT: Use --project-id with project PAGE ID, not project name"
723
776
  }
724
777
  }
725
778
  )
@@ -729,35 +782,67 @@ TASKS_COMMAND = Command(
729
782
  name="tasks",
730
783
  purpose="Tasks management - units of work in versions",
731
784
  description=(
732
- "Tasks represent work items. Every task must belong to a version. "
785
+ "Tasks represent work items. Every task must belong to a version (requires version PAGE ID). "
733
786
  "Tasks can have dependencies on other tasks."
734
787
  ),
735
788
  subcommands={
736
789
  "list": {
737
790
  "purpose": "List all tasks (optionally filtered by version or status)",
738
- "usage": "notion agents tasks list [--version VERSION] [--status STATUS]",
739
- "output": "Returns list of tasks with their versions and status"
791
+ "usage": "notion agents tasks list [--version-id VERSION_PAGE_ID] [--status STATUS]",
792
+ "output": "Returns JSON array with task objects containing id, title, status, type, priority, version_id"
793
+ },
794
+ "get": {
795
+ "purpose": "Get task by ID",
796
+ "usage": "notion agents tasks get TASK_PAGE_ID",
797
+ "output": "Returns task details"
740
798
  },
741
799
  "create": {
742
800
  "purpose": "Create a new task in a version",
743
- "usage": "notion agents tasks create --version VERSION_NAME --name TASK_NAME",
801
+ "usage": "notion agents tasks create --title TITLE --version-id VERSION_PAGE_ID [--type TYPE] [--priority PRIORITY] [--dependencies DEP_IDS]",
744
802
  "required_flags": {
745
- "--version": "Version name (required)",
746
- "--name": "Task name (required)"
803
+ "--title": "Task name (required)",
804
+ "--version-id": "Version PAGE ID (required) - use ID from 'agents versions list' or 'agents versions create' response"
747
805
  },
748
806
  "optional_flags": {
749
- "--status": "Todo, In Progress, Done (default: Todo)",
750
- "--priority": "Low, Medium, High, Critical (default: Medium)"
807
+ "--status": "Backlog, Claimed, In Progress, Completed, Cancelled (default: Backlog)",
808
+ "--type": "New Feature, Bug Fix, Refactor, Documentation, Testing, Other (default: New Feature)",
809
+ "--priority": "Low, Medium, High, Critical (default: Medium)",
810
+ "--dependencies": "Comma-separated dependency task IDs (optional)",
811
+ "--estimate": "Estimated hours (optional)"
751
812
  },
813
+ "returns": "JSON with 'id' field containing task PAGE ID",
752
814
  "examples": [
753
- "notion agents tasks create --version 'v1.0.0' --name 'Fix login bug'",
754
- "notion agents tasks create --version 'v1.0.0' --name 'Add feature' --status 'Todo' --priority 'High'"
755
- ]
815
+ "notion agents tasks create --title 'Fix login bug' --version-id ver_12345",
816
+ "notion agents tasks create --title 'Add feature' --version-id ver_12345 --priority 'High' --type 'New Feature'"
817
+ ],
818
+ "note": "IMPORTANT: Use --version-id with version PAGE ID, not version name"
756
819
  },
757
820
  "next": {
758
821
  "purpose": "Find next available task to work on",
759
- "usage": "notion agents tasks next [--version VERSION]",
760
- "description": "Finds tasks with status 'Todo' and no incomplete dependencies"
822
+ "usage": "notion agents tasks next [--project-id PROJECT_PAGE_ID]",
823
+ "description": "Finds tasks with status 'Backlog' or 'Claimed' and no incomplete dependencies",
824
+ "output": "Returns task object or message if no tasks available"
825
+ },
826
+ "claim": {
827
+ "purpose": "Claim a task (transition to Claimed status)",
828
+ "usage": "notion agents tasks claim TASK_PAGE_ID",
829
+ "output": "Returns updated task with agent ID"
830
+ },
831
+ "start": {
832
+ "purpose": "Start working on a task (transition to In Progress)",
833
+ "usage": "notion agents tasks start TASK_PAGE_ID",
834
+ "output": "Returns updated task with agent ID",
835
+ "note": "Will fail if task has incomplete dependencies"
836
+ },
837
+ "complete": {
838
+ "purpose": "Complete a task (transition to Completed)",
839
+ "usage": "notion agents tasks complete TASK_PAGE_ID [--actual-hours HOURS]",
840
+ "output": "Returns completed task with actual hours"
841
+ },
842
+ "can-start": {
843
+ "purpose": "Check if a task can start (all dependencies completed)",
844
+ "usage": "notion agents tasks can-start TASK_PAGE_ID",
845
+ "output": "Returns boolean and lists incomplete dependencies if any"
761
846
  }
762
847
  }
763
848
  )
@@ -802,11 +887,14 @@ AGENTS_SCHEMA = Schema(
802
887
  "Always run 'agents info' before operations to verify workspace state",
803
888
  "Use --skip flag to safely check for existing workspaces (prevents duplicates)",
804
889
  "Use --reset flag only when you need to recreate workspace (causes data loss)",
890
+ "IMPORTANT: Child entities require parent PAGE IDs, not names",
891
+ "Save the 'id' field from create responses - you need it for creating child entities",
892
+ "Use 'agents orgs/projects/versions list' to get valid entity IDs",
805
893
  "Create organization before creating projects",
806
894
  "Create project before creating versions",
807
895
  "Create version before creating tasks",
808
- "Tasks must have a Version relation (required)",
809
- "Projects must have an Organization relation (required)",
896
+ "Tasks must have a Version relation (required via --version-id)",
897
+ "Projects must have an Organization relation (required via --org-id)",
810
898
  "Use 'agents tasks next' to find next available task",
811
899
  ],
812
900
  examples={
@@ -823,38 +911,70 @@ notion agents init --parent-page PAGE_ID --skip""",
823
911
  notion agents init --parent-page PAGE_ID --reset""",
824
912
 
825
913
  "complete_lifecycle": """# Complete workflow: Org → Project → Version → Task
914
+ # IMPORTANT: Each command returns an ID that the next command needs!
826
915
 
827
- # 1. Create organization
916
+ # 1. Create organization - SAVE THE ID from response!
828
917
  notion agents orgs create --name "WareflowX" --slug "wareflowx"
918
+ # Response: {id: "org_abc123", "name": "WareflowX", ...}
919
+ # Save: ORG_ID="org_abc123"
829
920
 
830
- # 2. Create project in organization
831
- notion agents projects create --org "WareflowX" --name "Website Redesign"
921
+ # 2. Create project - requires org PAGE ID, not name!
922
+ notion agents projects create --name "Website Redesign" --org-id "org_abc123"
923
+ # Response: {id: "proj_def456", "name": "Website Redesign", ...}
924
+ # Save: PROJECT_ID="proj_def456"
832
925
 
833
- # 3. Create version in project
834
- notion agents versions create --project "Website Redesign" --name "v1.0.0"
926
+ # 3. Create version - requires project PAGE ID, not name!
927
+ notion agents versions create --name "v1.0.0" --project-id "proj_def456"
928
+ # Response: {id: "ver_ghi789", "name": "v1.0.0", ...}
929
+ # Save: VERSION_ID="ver_ghi789"
835
930
 
836
- # 4. Create task in version
837
- notion agents tasks create --version "v1.0.0" --name "Fix login bug" --priority "High".""",
931
+ # 4. Create task - requires version PAGE ID, not name!
932
+ notion agents tasks create --title "Fix login bug" --version-id "ver_ghi789" --priority "High\"""",
838
933
 
839
- "query_and_create": """# List existing organizations
934
+ "list_and_filter": """# List all organizations
840
935
  notion agents orgs list
841
936
 
842
- # List projects in organization
843
- notion agents projects list --org "WareflowX"
937
+ # List all projects (unfiltered)
938
+ notion agents projects list
939
+
940
+ # List all versions (unfiltered)
941
+ notion agents versions list
844
942
 
845
- # List tasks in version
846
- notion agents tasks list --version "v1.0.0"
943
+ # List tasks in a specific version
944
+ notion agents tasks list --version-id "ver_ghi789"
847
945
 
848
946
  # Find next task to work on
849
- notion agents tasks next --version "v1.0.0\"""",
947
+ notion agents tasks next""",
948
+
949
+ "task_workflow": """# Find a task
950
+ notion agents tasks next
951
+
952
+ # Claim a task (uses task ID from list or next)
953
+ notion agents tasks claim task_xyz123
954
+
955
+ # Start working on task (fails if dependencies not complete)
956
+ notion agents tasks start task_xyz123
957
+
958
+ # Complete task
959
+ notion agents tasks complete task_xyz123 --actual-hours 3.5""",
960
+
961
+ "get_entity_by_id": """# Get organization details
962
+ notion agents orgs get org_abc123
963
+
964
+ # Get project details
965
+ notion agents projects get proj_def456
966
+
967
+ # Get version details
968
+ notion agents versions get ver_ghi789
969
+
970
+ # Get task details
971
+ notion agents tasks get task_xyz123""",
850
972
 
851
- "create_task": """# Create task using agents command (recommended)
852
- notion agents tasks create --version "v1.0.0" --name "Fix login bug"
973
+ "check_dependencies": """# Check if task can start (all deps complete?)
974
+ notion agents tasks can-start task_xyz123
975
+ # Returns: {can_start: false, incomplete_dependencies: [...]}
853
976
 
854
- # Alternative: Create task directly with pages command
855
- notion pages create \\
856
- --parent TASKS_DB_ID \\
857
- --title "Fix login bug" \\
858
- --properties '{"Status": "Todo", "Version": "VERSION_ID", "Priority": "High"}'""",
977
+ # List tasks with dependencies
978
+ notion agents tasks list --version-id ver_ghi789""",
859
979
  },
860
980
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: better-notion
3
- Version: 1.7.0
3
+ Version: 1.8.0
4
4
  Summary: A high-level Python SDK for the Notion API with developer experience in mind.
5
5
  Project-URL: Homepage, https://github.com/nesalia-inc/better-notion
6
6
  Project-URL: Documentation, https://github.com/nesalia-inc/better-notion#readme
@@ -113,7 +113,7 @@ better_notion/plugins/state.py,sha256=jH_tZWvC35hqLO4qwl2Kwq9ziWVavwCEUcCqy3s5wM
113
113
  better_notion/plugins/official/__init__.py,sha256=rPg5vdk1cEANVstMPzxcWmImtsOpdSR40JSml7h1uUk,426
114
114
  better_notion/plugins/official/agents.py,sha256=OHX-vmEsab8b-tMljXJLOB9YRpq1oG125FTK7mtm23A,50667
115
115
  better_notion/plugins/official/agents_cli.py,sha256=8l6e1zJCAT4DdAO-QfdjK_vrrrik3pmrojwakE32ZNY,53048
116
- better_notion/plugins/official/agents_schema.py,sha256=1efMpTrGGuUbulrk7IO5iDIw93CZjv_YkpVPcXIHheI,32267
116
+ better_notion/plugins/official/agents_schema.py,sha256=NQRAJFoBAXRuxB9_9Eaf-4tVth-1OZh7GjmN56Yp9lA,39867
117
117
  better_notion/plugins/official/productivity.py,sha256=_-whP4pYA4HufE1aUFbIdhrjU-O9njI7xUO_Id2M1J8,8726
118
118
  better_notion/plugins/official/agents_sdk/__init__.py,sha256=luQBzZLsJ7fC5U0jFu8dfzMviiXj2SBZXcTohM53wkQ,725
119
119
  better_notion/plugins/official/agents_sdk/managers.py,sha256=0zMZPu63zhdyqiudO2gKsmM3YOJh0nFAR9FrMlwkV2A,31186
@@ -132,8 +132,8 @@ better_notion/utils/agents/rbac.py,sha256=8ZA8Y7wbOiVZDbpjpH7iC35SZrZ0jl4fcJ3xWC
132
132
  better_notion/utils/agents/schemas.py,sha256=eHfGhY90FAPXA3E8qE6gP75dgNzn-9z5Ju1FMwBKnQQ,22120
133
133
  better_notion/utils/agents/state_machine.py,sha256=xUBEeDTbU1Xq-rsRo2sbr6AUYpYrV9DTHOtZT2cWES8,6699
134
134
  better_notion/utils/agents/workspace.py,sha256=nS7BNa0-RFCxeAKa0inmBZcPfRKTMB11pi9OW4WzvQ4,15915
135
- better_notion-1.7.0.dist-info/METADATA,sha256=u205QxZNPO8eTf7S29XGFFx9QPSnYyCp5m4Cy7okHnk,11096
136
- better_notion-1.7.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
137
- better_notion-1.7.0.dist-info/entry_points.txt,sha256=D0bUcP7Z00Zyjxw7r2p29T95UrwioDO0aGDoHe9I6fo,55
138
- better_notion-1.7.0.dist-info/licenses/LICENSE,sha256=BAdN3JpgMY_y_fWqZSCFSvSbC2mTHP-BKDAzF5FXQAI,1069
139
- better_notion-1.7.0.dist-info/RECORD,,
135
+ better_notion-1.8.0.dist-info/METADATA,sha256=6HwsgB9jczxjDz6qehycler3WfqBs2MLbUz89VWnDYg,11096
136
+ better_notion-1.8.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
137
+ better_notion-1.8.0.dist-info/entry_points.txt,sha256=D0bUcP7Z00Zyjxw7r2p29T95UrwioDO0aGDoHe9I6fo,55
138
+ better_notion-1.8.0.dist-info/licenses/LICENSE,sha256=BAdN3JpgMY_y_fWqZSCFSvSbC2mTHP-BKDAzF5FXQAI,1069
139
+ better_notion-1.8.0.dist-info/RECORD,,