SuperAPI AI Directory

getnote-note

Security & auditing

View repository

Updated 10-15 22:38

About this skill

Dedao Brain Notes

Through the official getnote CLI to perform real operations. Do not construct OpenAPI requests, IDs, or note links yourself; for machine calls, prefer -o json, and judge results by the exit code and the result contract below.

Unified result determination

For the JSON result of all API commands, first look at the structure below, then read the data field specified for each command:

{
  "success": true,
  "data": {},
  "request_id": "可选"
}

A failure result is success=false or the command exit code is non-0; read error.code、error.message、error.reason、error.retryable and the optional request_id. HTTP success, upload completion, the appearance of a task ID, or obtaining an empty note link cannot replace the final successful result.

Intent routing

Intent Command entry
Save text, links, or local images getnote save
Query asynchronous save tasks getnote task
View recent notes getnote notes
View details or fields getnote note
Quote/link/text original text getnote note original
Audio, meeting, or class transcription getnote note transcript
Image, audio, and file attachments getnote note attachments
Audio or meeting timeline getnote note timeline
Chapter timeline in the summary getnote note chapters
Audio note highlights (independent data) getnote marks <note_id>
List sprout reports by month getnote sprouts <YYYY-MM>
Read the original text of a sprout report getnote sprout <id>
Audio quick notes gnote note quick, legacy fallback getnote note quick-note
Derived to-dos in the meeting summary getnote note todos
Modify notes getnote note update
Delete notes getnote note delete
Public sharing getnote note share

When unsure about parameters, first run the target command --help。

Source filtering, lightweight locating, and original text

The list API only returns locating information; then use the detail API to read the complete note.display_title is the display title and does not override the original title; it is normal for quote notes to have an empty title.preview is a locating snippet with source and truncation markers, not the full text.

getnote notes --source dedao --note-type ref --page-size 20 -o json
getnote note '<note_id>' -o json
getnote note original '<note_id>' -o json
note_type Original text field Semantics of content
ref ref_content User comment, not the quoted original text
plain_text content User body text
link web_page.content Usually a summary
audio / local_audio audio.original Usually a summary

original reads the above fields only by the actual type and returns original_source; a missing original text or unsupported type will error, and comments or locating snippets must not be padded in as the original text. In the list, content_state indicates that the body text is omitted; the detail API returns the complete body text and metadata. Use metadata_state.reference/topics to distinguish complete, partial, and unavailable metadata; do not guess and fill in missing authors, book IDs, or source URLs.

When an article or course has no knowledge base, existing candidates can be precisely looked up after reading the real reference from details or search results. When there is only a course name/manuscript name or a comment, and no candidate yet, first execute the search Skill's “Course, Manuscript, and Comment Locating”: after semantic search finds no source match, list locating information by source in pages and then match metadata; do not ask the user to provide internal IDs, and do not give up because of topics=[] . After obtaining a candidate, look it up precisely:

getnote notes --source dedao --note-type ref --reference-type course_article --reference-id '<reference.resource_id>' --all -o json
# 缺少资源 ID,但有 reference.article.url 时,可改用精确文章 URL
getnote notes --source dedao --note-type ref --article-url '<reference.article.url>' --all -o json

The platform value is taken from reference.source; the resource type is taken from reference.resource_type, do not guess the enum from tags or internal ptype.--reference-id You must pass both --source and --reference-type. The course transcript's resource_id points to a single transcript, and you cannot use it to retrieve the entire course; the entire course must be traversed by matching the course source from the search reference. The referenced resource_id、original_note_id, book ID, and note ID are all different identities; always use them as the returned strings. The course homepage and transcript URL are not interchangeable; when the user provides the course homepage, match it according to the search reference reference.url, and do not pass it to --article-url. URLs retain query/fragment; do not remove parameters on your own. The same article can have multiple different original_note_id, and they must not be merged into a single highlight by article ID.

Creation, body editing, and record updating are three independent timelines. Use --created-from/to、--edited-from/to、--record-updated-from/toas needed; the value must be RFC3339 with a time zone; the interval's from is inclusive and to is exclusive. Do not treat updated_at as the body editing time. Convert the boundaries for "today/last week" according to the user's current date and time zone; the save time is not the article publication date, and do not arbitrarily interpret "recent" as a fixed one month. When the user also restricts the course/knowledge base, retain these conditions.

New parameters require the server-side corresponding meta.capabilities and applied_filters to be consistent with the request; when unsupported, stop that query and explain the need to upgrade the service/client, and do not automatically remove the filter. Validate the full set according to the pagination rules in the knowledge base reference; if you only fetch one page or perform one semantic search, you cannot say "all found."

Save workflow

Text and long-form content

  1. Preserve the user's original intent; do not expand on your own; when unspecified, do not add a knowledge base, parent note, tags, or public sharing.
  2. Short text can be passed as a parameter. Long text, Markdown, or content containing complex quotation marks or line breaks must use --content-file or --stdinto avoid truncation and escaping corruption.
  3. When retrying the same creation, reuse the same --idempotency-key。
  4. Only when the command exit code is 0 and a non-empty string data.note.note_id、data.note.title、data.note.note_urlexists in the final structure should you reply that the save succeeded.

Links

  1. When it starts with http:// or https:// and the user expresses an intent to save, save it as a link and do not treat it as ordinary text.
  2. The CLI will poll the asynchronous task. During processing, you can tell the user "fetching and generating the note," but you must not give a success conclusion in advance.
  3. Final success must satisfy the three fields for text saving, and data.note must already be readable; do not concatenate the link yourself.

Images

  1. Use the local image path explicitly provided by the user in this turn; do not save the filename as text, and do not include historical images.
  2. The CLI will validate the actual file format, upload the image, and poll the recognition task.
  3. Only when the final note details return a valid note_id/title/note_url does it count as success; "the image has been uploaded" is not "the note has been generated."

Asynchronous timeouts and safe retries

  • getnote save ... -o json normally waits for the final result; if the exit code is non-zero and the output contains task_id、status=pending|processing, the operation result is still uncertain.
  • When the result is uncertain, use getnote task <task_id> -o json to query the original task.done|success and after there is a valid note_id , then read the note; whenfailed , display error_msg or msg。
  • After a timeout, stream interruption, or network error, do not directly save again; first query the original task or the most recent note. Only retry when the CLI/API explicitly retryable=true and it has been confirmed that the original operation did not succeed.

Querying and deep reading

  1. "Recent, list, what" uses getnote notes; when there is an explicit book title or citation source, look it up via the source/knowledge base route above; only vague topics are handed to the search Skill.
  2. When the user provides an ID, read the details directly; pass snowflake IDs through as strings exactly as they are at all times. "This note" only reuses the string ID already returned by the CLI and verified in the current session. If the current CLI cannot directly accept a certain kind of private link, first ask the user to provide the ID; do not extract, guess, or convert it to a number on your own.
  3. When the user only wants a list, display the title, string ID, and real note_url. When the user explicitly wants the highlights, original text, or comments of a certain note or a certain source, after locating the matching candidate, read the details directly to fulfill the request without additionally waiting for the user to choose; ask the user to choose only when the candidate is still ambiguous and the target cannot be confirmed.
  4. When unsure of the note type, first read getnote note <id> -o json:
    • Quotes/links/text originals:original;
    • Recordings, meetings, class verbatim transcripts:transcript;
    • Images, audio, files:attachments;
    • Chapter timestamps and meeting process:chapters, read chapter_timeline.items, preserving the rule-parsed source source; recording moments use timeline, the two are not the same data;
    • User's on-the-spot quick notes:quick-note;
    • Meeting to-dos:todos, must preserve source, and must not describe rule-parsed results as upstream native to-dos.
  5. Do not take content the AI summaries in it and pass them off as the original text.
  6. Marks are read from getnote marks the data.marks[] of, and do not use the Timeline's count or content as a substitute. For sprouts, list reports from getnote sprouts , then use getnote sprout to read the body;has_sprout=false truthfully indicates that there is no readable report, and do not treat marks or note summaries as sprouts.

Modify, delete, and share

  1. First read the target note and the current version to confirm the object the user is referring to.
  2. Appending or prepending content must use the corresponding incremental semantics in the CLI's current help, not overwriting to simulate appending.
  3. Overwriting the body, replacing all tags, deleting, and public sharing must be confirmed first; only after confirmation use --yes。
  4. When sharing recording-type notes, the confirmation wording must state whether the public link includes audio; when the user does not want the audio made public, use the --exclude-audioin the CLI help. Do not decide the audio's public scope on the user's behalf by default.
  5. When the user has not requested public sharing, only return the private note_url, and do not automatically generate a share link.

Result and reply format for each command

Command Successful result must contain Reply rule
getnote save … -o json success=true、data.note.note_id/title/note_url Reply "Saved《Title》" and the real link. For links/images, when only task_id is obtained, it is not yet successful; continue checking the task.
getnote task <task_id> -o json data.task_id/status/note_id?/msg?/error_msg? Only done/success and with note_id is it complete;pending/processing is processing;failed explains the real reason.
getnote notes -o json data.notes[].note_id/title/note_url; new filter responses additionally have pagination Return the title, string ID, and real link. New filters paginate by pagination.has_more/next_cursor ; old responses with only no pagination paginate by has_more/cursor. Old total cannot be taken as the filtered count.
getnote note <id> -o json data.note.note_id/title/note_url/note_type, read as needed content Provide the summary and link first; expand the private full text only when the user explicitly requests it.
getnote note original <id> -o json data.note_id/title/original/original_source Only treat original as the original text; if the original text is unavailable, it fails, and comments or summaries must not be used to fill it in.
getnote note transcript <id> -o json data.note_id/title/transcript Available only for audio-type notes; if unavailable, state so truthfully.
getnote note attachments <id> -o json data.note_id/title/attachments[] List the actual attachments; do not pass off the note cover as an attachment.
getnote note timeline <id> -o json data.note_id/title/timeline Display only when an audio/meeting timeline exists.
getnote note chapters <id> -o json data.note_id/title/chapter_timeline items[].start_ms is in milliseconds; an empty array means there are no parseable chapters, and markers must not be used to fill it in.
gnote note quick <id> -o json data.note_id/title/quick_note Return on-site quick notes; fall back in older environments to getnote note quick-note。
getnote note todos <id> -o json data.note_id/title/meeting_todos[] Keep each item's source; this is parsed by rule from explicit meeting summary sections, and must not be described as an upstream native to-do.
getnote note update <id> … -o json success=true、data? Before modifying the body text or all tags, you must --yes; when the final content needs to be displayed, read note。
getnote note delete <id> --yes -o json success=true、data? You can only say "moved to trash", not permanently deleted.
getnote note share <id> --yes -o json success=true、data.note_id/share_id/share_url Return only the real share_url, and make clear that it is a public link.

On API failure, reply with the failed step,error.message/reason, whether it can be retried, and request_id; HTTP 200 must not be treated as business success.

In group chats or shared sessions, only show the necessary title and link first, and do not proactively expand the private full text.