Updated for compatibility with prod
Plugin is now agnostic between Rightbrain staging and production environments. Updated README for production environment and to encourage use of Obsidians graph features.
This commit is contained in:
parent
e3d0207787
commit
113a8ed4d2
|
@ -21,7 +21,7 @@ This plugin is deeply integrated with [RightBrain.ai](https://rightbrain.ai) to
|
||||||
|
|
||||||
**2. Create your RightBrain API Client**
|
**2. Create your RightBrain API Client**
|
||||||
|
|
||||||
* Navigate to your RightBrain API Clients page: [https://stag.leftbrain.me/preferences?tab=api-clients](https://stag.leftbrain.me/preferences?tab=api-clients).
|
* Navigate to your RightBrain API Clients page: [https://app.rightbrain.ai/preferences?tab=api-clients](https://app.rightbrain.ai/preferences?tab=api-clients).
|
||||||
* Click **Create OAuth Client**.
|
* Click **Create OAuth Client**.
|
||||||
* Give it a descriptive name (e.g., "Obsidian Plugin").
|
* Give it a descriptive name (e.g., "Obsidian Plugin").
|
||||||
* For "Token Endpoint Auth Method," select **Client Secret Basic (client_credentials)**.
|
* For "Token Endpoint Auth Method," select **Client Secret Basic (client_credentials)**.
|
||||||
|
@ -65,6 +65,7 @@ Please be aware that your `Client Secret` is stored in plaintext in this file. T
|
||||||
* **Handle Difficult Sources:** Some subprocessor lists are buried in PDFs, hard-to-parse web pages, or not publicly available at all. The **`Manually Add Subprocessor List URL`** and **`Input Subprocessor List from Text`** features allow you to point the AI directly at a URL or simply paste the text to ensure nothing is missed.
|
* **Handle Difficult Sources:** Some subprocessor lists are buried in PDFs, hard-to-parse web pages, or not publicly available at all. The **`Manually Add Subprocessor List URL`** and **`Input Subprocessor List from Text`** features allow you to point the AI directly at a URL or simply paste the text to ensure nothing is missed.
|
||||||
* **AI-Powered Verification & Extraction:** Uses RightBrain to verify if a URL is a genuine, current subprocessor list and then extracts the names of all third-party vendors and internal company affiliates.
|
* **AI-Powered Verification & Extraction:** Uses RightBrain to verify if a URL is a genuine, current subprocessor list and then extracts the names of all third-party vendors and internal company affiliates.
|
||||||
* **Automated Note Creation & Linking:** Creates a central, linked note for each processor and subprocessor. A processor's note lists its subprocessors; a subprocessor's note lists who it's "Used By."
|
* **Automated Note Creation & Linking:** Creates a central, linked note for each processor and subprocessor. A processor's note lists its subprocessors; a subprocessor's note lists who it's "Used By."
|
||||||
|
* **Visualize Your Supply Chain:** Because all notes are inter-linked, you can use Obsidian's native Graph View to get an instant, interactive map of your vendor relationships. This makes complex data supply chains easier to understand and allows you to dive in and out of particular nodes of interest.
|
||||||
* **AI-Powered Deduplication:** Run a command on your processors folder to find and merge duplicate entities, combining their relationships automatically.
|
* **AI-Powered Deduplication:** Run a command on your processors folder to find and merge duplicate entities, combining their relationships automatically.
|
||||||
* **Compliance Document Enrichment:** Right-click any processor file to automatically find and link to that company's public DPA, Terms of Service, and Security pages.
|
* **Compliance Document Enrichment:** Right-click any processor file to automatically find and link to that company's public DPA, Terms of Service, and Security pages.
|
||||||
|
|
||||||
|
@ -94,7 +95,7 @@ Please be aware that your `Client Secret` is stored in plaintext in this file. T
|
||||||
|
|
||||||
### 🌱 Future Development & Feedback
|
### 🌱 Future Development & Feedback
|
||||||
|
|
||||||
This is the first release of Processor Processor. The "Enrich" features are just the beginning of a larger plan to build a suite of automated due diligence tools.
|
This is the first release of Processor Processor. The "Enrich" features are just the beginning of a larger plan to build a suite of automated due diligence tools. I am also actively exploring enhancements to the graph visualization to make these relationship maps even more powerful.
|
||||||
|
|
||||||
Your feedback is invaluable for guiding what comes next! If you have ideas for new features or improvements, please share them by raising an issue on the plugin's GitHub repository.
|
Your feedback is invaluable for guiding what comes next! If you have ideas for new features or improvements, please share them by raising an issue on the plugin's GitHub repository.
|
||||||
|
|
||||||
|
|
13
main.ts
13
main.ts
|
@ -18,6 +18,8 @@ interface ProcessorProcessorSettings {
|
||||||
rightbrainClientSecret: string;
|
rightbrainClientSecret: string;
|
||||||
rightbrainOrgId: string;
|
rightbrainOrgId: string;
|
||||||
rightbrainProjectId: string;
|
rightbrainProjectId: string;
|
||||||
|
rightbrainApiUrl: string;
|
||||||
|
rightbrainOauth2Url: string;
|
||||||
rightbrainVerifyUrlTaskId: string;
|
rightbrainVerifyUrlTaskId: string;
|
||||||
rightbrainExtractEntitiesTaskId: string;
|
rightbrainExtractEntitiesTaskId: string;
|
||||||
rightbrainExtractInputField: string;
|
rightbrainExtractInputField: string;
|
||||||
|
@ -43,6 +45,8 @@ const DEFAULT_SETTINGS: ProcessorProcessorSettings = {
|
||||||
rightbrainClientSecret: '',
|
rightbrainClientSecret: '',
|
||||||
rightbrainOrgId: '',
|
rightbrainOrgId: '',
|
||||||
rightbrainProjectId: '',
|
rightbrainProjectId: '',
|
||||||
|
rightbrainApiUrl: 'https://app.rightbrain.ai/api/v1',
|
||||||
|
rightbrainOauth2Url: 'https://oauth.rightbrain.ai',
|
||||||
rightbrainVerifyUrlTaskId: '',
|
rightbrainVerifyUrlTaskId: '',
|
||||||
rightbrainExtractEntitiesTaskId: '',
|
rightbrainExtractEntitiesTaskId: '',
|
||||||
rightbrainExtractInputField: 'page_text',
|
rightbrainExtractInputField: 'page_text',
|
||||||
|
@ -533,7 +537,7 @@ export default class ProcessorProcessorPlugin extends Plugin {
|
||||||
new Notice("RightBrain Org ID or Project ID not set.");
|
new Notice("RightBrain Org ID or Project ID not set.");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const tasksUrl = `https://stag.leftbrain.me/api/v1/org/${this.settings.rightbrainOrgId}/project/${this.settings.rightbrainProjectId}/task`;
|
const tasksUrl = `${this.settings.rightbrainApiUrl}/org/${this.settings.rightbrainOrgId}/project/${this.settings.rightbrainProjectId}/task`;
|
||||||
const headers = { 'Authorization': `Bearer ${rbToken}` };
|
const headers = { 'Authorization': `Bearer ${rbToken}` };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -558,7 +562,7 @@ export default class ProcessorProcessorPlugin extends Plugin {
|
||||||
* @returns The created task object or null if an error occurs.
|
* @returns The created task object or null if an error occurs.
|
||||||
*/
|
*/
|
||||||
private async createRightBrainTask(rbToken: string, taskDefinition: any): Promise<any | null> {
|
private async createRightBrainTask(rbToken: string, taskDefinition: any): Promise<any | null> {
|
||||||
const createUrl = `https://stag.leftbrain.me/api/v1/org/${this.settings.rightbrainOrgId}/project/${this.settings.rightbrainProjectId}/task`;
|
const createUrl = `${this.settings.rightbrainApiUrl}/org/${this.settings.rightbrainOrgId}/project/${this.settings.rightbrainProjectId}/task`;
|
||||||
const headers = {
|
const headers = {
|
||||||
'Authorization': `Bearer ${rbToken}`,
|
'Authorization': `Bearer ${rbToken}`,
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
@ -1468,7 +1472,7 @@ export default class ProcessorProcessorPlugin extends Plugin {
|
||||||
return (this as any)._rbToken;
|
return (this as any)._rbToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
const tokenUrl = 'https://oauth.leftbrain.me/oauth2/token'; // Corrected based on PDF
|
const tokenUrl = `${this.settings.rightbrainOauth2Url}/oauth2/token`;
|
||||||
|
|
||||||
const bodyParams = new URLSearchParams();
|
const bodyParams = new URLSearchParams();
|
||||||
bodyParams.append('grant_type', 'client_credentials');
|
bodyParams.append('grant_type', 'client_credentials');
|
||||||
|
@ -1747,8 +1751,7 @@ export default class ProcessorProcessorPlugin extends Plugin {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const taskRunUrl = `https://stag.leftbrain.me/api/v1/org/${this.settings.rightbrainOrgId}/project/${this.settings.rightbrainProjectId}/task/${taskId}/run`;
|
const taskRunUrl = `${this.settings.rightbrainApiUrl}/org/${this.settings.rightbrainOrgId}/project/${this.settings.rightbrainProjectId}/task/${taskId}/run`; const headers = {
|
||||||
const headers = {
|
|
||||||
'Authorization': `Bearer ${rbToken}`,
|
'Authorization': `Bearer ${rbToken}`,
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'User-Agent': `ObsidianProcessorProcessorPlugin/${this.manifest.version}`
|
'User-Agent': `ObsidianProcessorProcessorPlugin/${this.manifest.version}`
|
||||||
|
|
Loading…
Reference in New Issue